[FFmpeg-user] Properly download/trim a hls-stream which reports invalid timestamps

Reino Wijnsma rwijnsma at xs4all.nl
Thu Nov 23 01:21:15 EET 2017


On 19-11-2017 14:01, Reino Wijnsma <rwijnsma at xs4all.nl> wrote:
> On 19-11-2017 13:14, Moritz Barsnick <barsnick at gmx.net> wrote:
>> Because it wasn't clear whether you were just using ffmpeg to download
>> the original, or you wanted to use ffmpeg to actually process it. (If
>> the former: You can't avoid remuxing with ffmpeg.)
> I use FFmpeg to download and process, as can be seen in my first post <https://lists.ffmpeg.org/pipermail/ffmpeg-user/2017-November/037892.html>.
>
>> Yes, so ffmpeg apparently has problems processing this file. The result
>> gets out of sync, you say? Do any players play the original (test.ts)
>> fine?
> The output doesn't get out of sync and it plays just fine, but... well, have a look yourself <http://rwijnsma.home.xs4all.nl/files/test/Snowden%20-%20niets-te-verbergen-drogreden.ts>.
> It's an excerpt of:
>
> ffmpeg.exe -ss 2000 -i
> "http://manifest.us.rtl.nl/10/v166/aes/adaptive/components/videorecorder/38/389438/389439/0bf68d1e-97f6-3c3e-9498-e1a3ffa8a13a.ssm/0bf68d1e-97f6-3c3e-9498-e1a3ffa8a13a.ism/0bf68d1e-97f6-3c3e-9498-e1a3ffa8a13a-audio_eng=125437-video=3877000.m3u8" -ss 15 -t 29 -c copy "Snowden - niets-te-verbergen-drogreden.ts"
>
> (the url isn't available anymore)
>
> MediaInfo says the container-duration is '28s 0ms', the videostream-duration is '28s 40ms' and the audiostream-duration is '28s 842ms'.
> Everytime the video starts over (loops), when I play it with MPC-HC, the image is frozen during the first second. The audio doesn't start until the first second as well.
> Time-seeking: audio plays immediately, the video catches up 1 or 2 seconds later.
>
> -- Reino

Can anyone explain the "Invalid timestamps"-errors (the heart of the problem) in my initial post?

On 19-11-2017 13:14, Moritz Barsnick <barsnick at gmx.net> wrote:
>> [mpegts @ 04c93de0] Invalid timestamps stream=1, pts=975600, dts=979200, size=16711
>> [mpegts @ 04c93de0] Invalid timestamps stream=1, pts=982800, dts=986400, size=15911
> Yes, so ffmpeg apparently has problems processing this file.
Do you have any idea on how to fix that?

-- Reino


More information about the ffmpeg-user mailing list