[Libav-user] Using libavformat for LowLatency Dash
If I use ffmpeg to produce -f ldash it takes a long time to sync, and I need to first produce an h264 output stream and then feed that back into ffmpeg to pass to the dash encoder. I have an h264 stream coming in, and I don't want to re-encode.
So I now want to use code written based on the remuxing example to take the stream in and output low latency dash. I have set up a dictionary with all the options I had from the command line for ffmpeg and all seems to be working, yet i can't play the stream (the FFmpeg stream does play).
I've compared the two .mpd files and have noticed a few differences, the most significant of these being:
1) bandwidth: ffmpeg produces what appears to be a genuine number, libavformat gets told it's 6Mbps and is a static number despite the somewhat varying bitrate.
2) in the SegmentTimeline the s and d values are quite different t=unix time stamp in the libavformat case (1541276893), and seems to be an offset from 0 in the ffmpeg case (23855872), and d is 12800 in the ffmpeg case and 1080000 in the libavformat case.
Can anyone help with a) getting a bitrate measure from the libav libraries?
b) explaining the s and d values in the mpd file, and what significance their differences might be causing?
Am Di., 3. März 2020 um 19:02 Uhr schrieb Simon Brown <[hidden email]>:
> Can anyone help with a) getting a bitrate measure from the libav libraries?
I may misunderstand but in general you cannot know the bitrate of a (raw)
input stream (and libavformat does not read through the whole file only
to find out).
Thank you, Carl. It's actually a live stream so I need to calculate it as it comes in. I was hoping there might be a means of helping to calculate it, work out size of each frame as it's come in.
Can anyone help with question b) then? "b) explaining the s and d values in the mpd file, and what significance their differences might be causing?" Where s and d are the parameters in the SegmentTimeline field.