I cannot manage createing DASH manifest with ON_DEMAND profile from MP4 representation.
I can create DASH manifest with LIVE profile from fMP4 representation while referencing
Getting status of failed manifest have little information to debug this issue.
Is there any example code that do this?
I tried the following Ruby code (omitted to relevant part)
concatenated_video_stream = enc.streams.build(name: "concatenated video stream")
concatenated_video_stream.codec_configuration = codec_config_720_700
concatenated_video_stream.build_input_stream(input_stream_id: response_hash.dig('data', 'result', 'id'))
concatenated_video_stream.save!
concatenated_audio_stream = enc.streams.build(name: "concatenated audio stream")
concatenated_audio_stream.codec_configuration = audio_config
concatenated_audio_stream.build_input_stream(input_stream_id: response_hash.dig('data', 'result', 'id'))
concatenated_audio_stream.save!
# Muxing configration
mp4_muxing_concatenated = enc.muxings.mp4.build(name: 'concatenated')
mp4_muxing_concatenated.build_output(output_id: OUTPUT_ID, output_path: "#{OUTPUT_DIR}/concatenated_mp4")
mp4_muxing_concatenated.streams << concatenated_video_stream.id
mp4_muxing_concatenated.streams << concatenated_audio_stream.id
mp4_muxing_concatenated.save!
enc.start!
# wait for completing encoding
# monkey-patched to support `profile`
manifest = Bitmovin::Encoding::Manifests::DashManifest.new(
name: TEST_ID, manifest_name: "manifest.mpd", profile: "ON_DEMAND"
)
manifest.outputs << Bitmovin::Encoding::StreamOutput.new(
output_id: OUTPUT_ID, output_path: "#{OUTPUT_DIR}/manifest"
)
manifest.save!
period = manifest.build_period()
period.save!
video_adaptationset = period.build_video_adaptationset()
video_adaptationset.save!
# audio_adaptationset = period.build_audio_adaptationset({lang: 'en'})
# audio_adaptationset.save!
# Ruby SDK does not have a method for adding MP4 representaton
Bitmovin.client.post do |post|
post.url "/v1/encoding/manifests/dash/#{manifest.id}/periods/#{period.id}/adaptationsets/#{video_adaptationset.id}/representations/mp4"
post.body = {
encodingId: enc.id, muxingId: mp4_muxing_concatenated.id, filePath: "concatenated_mp4/concatenated.mp4"#, type: "TEMPLATE"
}
end
manifest.start!
My use case for DASH manifest is to get duration of outputted MP4 by mediaPresentationDuration
.
If there is any other measure to get duration, I also appreciate that.