[FFmpeg-user] Is there a way to modify every mpegts file when downloading a m3u8 stream?

accelerator0099 accelerator0099 at gmail.com
Sat Feb 11 17:03:14 EET 2023


When you run

ffmpeg -i "https://url.to.some.videos/some_stream.m3u8" -o whatever.mp4


Sometimes you get a m3u8 file with non-standard mpegts parts, for 
example, mpegts parts with small jpeg images at their beginnings.

|----jpeg----|---------------------------------mpegts---------------------------------|

Normal decoders see that jpeg image and treats the file as an image, 
totally ignoring the rest part, which is the real video part.


FFmpeg will say those packets are "corrupted".


So is their a way, to let me "decode" the retrieved video parts before 
sending them to decoders?



More information about the ffmpeg-user mailing list