ffmpeg -i "http://host/folder/file.m3u8" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4
-bsf:a aac_adtstoasc
- bsf = (bit stream filter)
- use
aac_adtstoasc
bsf fora
audio streams, this is need if.m3u8
file consists with.ts
files and output is.mp4
- reference https://ffmpeg.org/ffmpeg-bitstream-filters.html#aac_005fadtstoasc
-c copy -vcodec copy
- skip codec (encode and decode), just
demux
andmux
- I guess
.ts
and.mp4
, for video stream, they are both H.264 codec, just guess. - reference https://ffmpeg.org/ffmpeg.html#Stream-copy
-crf 50
- the example shows
-c:a copy
did not re-encode, guess this option is not needed here - And
0
is lossless,23
is the default, and51
is worst quality possible - reference https://trac.ffmpeg.org/wiki/Encode/H.264#CRFExample