[FFmpeg-user] Slow HLS Stream Download FFmpeg
barsnick at gmx.net
Fri Jan 20 15:09:57 EET 2017
On Fri, Jan 20, 2017 at 12:41:22 +0100, Carl Eugen Hoyos wrote:
> You may want to download the parts of the hls stream and
> concatenate them with "cat".
> (Is there really no script that does this?)
I have programmed, or rather hacked, such a downloader for myself.
Before youtube-dl started handling my favorite sites. ;-)
Indeed, up until now, I thought that youtube-dl always somehow creates
an MP4 file out of the TS segments. That is incorrect - it *thinks*
it's an MP4, while it actually creates a proper MPEG-TS as desired:
$ youtube-dl --verbose --hls-prefer-native --fixup never URL.m3u8
If you don't use "--hls-prefer-native", ffmpeg may be invoked to read
the m3u8 (which we wanted to avoid).
If you don't use "--fixup never", ffmpeg may be invoked because
youtube-dl detects a "malformated aac bitstream" (ADTS). It's not
actually malformed, ADTS is detected because it's inside MPEG-TS.
Thanks for making me check this: I like to feed my PVR (set-top box)
with MPEG-TS, as it handles seeking better with that format. And I
didn't appreciate the point that I downloaded HLS with MPEG-TS, just to
let ffmpeg remux it into MPEG-TS again. Now I can skip ffmpeg. ;-)
(ffmpeg's MPEG-TS muxer may have a lot of limitations, but for my PVR,
it's quite fine anyway.)
More information about the ffmpeg-user