[FFmpeg-user] ffprobe can’t show ts file information

Nicolas Gaullier nicolas.gaullier at cji.paris
Thu Feb 22 11:02:11 EET 2024

>De : ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> De la part de Zhengrong Zang
>Envoyé : mercredi 21 février 2024 01:53
>À : FFmpeg user questions <ffmpeg-user at ffmpeg.org>
>Objet : Re: [FFmpeg-user] ffprobe can’t show ts file information
>I am not sure if they are corrupt, is there such special mpegts format? Those ts files were downloaded from a movie and drama provider that provide huge amount videos, at the moment, I found two types ts file, one is with this >png header, one is as below:
>Input #0, mpegts, from '001.ts':
>  Duration: 00:00:12.04, start: 0.038000, bitrate: 942 kb/s
>  Program 1
>  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
>  Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 97 kb/s
I really think the file is corrupted (or cheated by a proprietary "extension").

>Thanks for your suggestion!
>I want to concat them to mp4, I use command for normal mpegts, ffmpeg -i 'concat:01.ts|02.ts|03.ts|' -c copy -bsf:a aac_adtstoasc 01.mp4
>for this special mpegts format, can I use command as below?
>ffmpeg -f mpegts -i 'concat:01.ts|02.ts|03.ts|' -c copy -bsf:a aac_adtstoasc 01.mp4

You can try. I think the -f mpegts will allow to overcome the PNG header of 01.ts if present. For the following 02.ts, 03.ts etc. in the presence of garbage (PNG header) the decoder should resync but it might raise some issues (maybe packet corruption flags etc.). Best thing is to test your use case in a worst-case-scenario (add the PNG header to all of your ts files to corrupt them by hand).


Note: do not top-post on this list (see ML usage).

More information about the ffmpeg-user mailing list