[FFmpeg-trac] #3179(FFmpeg:new): Transcoding a "concatenated" video stream with -copyts does not work

FFmpeg trac at avcodec.org
Thu Nov 28 14:05:39 CET 2013


#3179: Transcoding a "concatenated" video stream with -copyts does not work
----------------------------------+---------------------------------------
             Reporter:  aurelien  |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  FFmpeg    |                  Version:  unspecified
             Keywords:  copyts    |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+---------------------------------------
 Hello,

 I have a sample I specialy crafted to reproduce a problem I'm facing with
 some streams I'm using.

 I split an MPEG-TS file in half and put the second part before the first
 so timestamps suddenly jumps to a very old value (or very far in the
 future if we consider there was a timestamp wrap).

 When transcoded with ffmpeg it gets stuck just like in ticket #3176
 (nb_frames in do_video_out() is huge and ffmpeg duplicates a frame
 "forever").

 If I remove -copyts it does not get stuck.

 I uploaded the sample copyts_concatenated_stream.ts on the FTP.

 How to reproduce:
 {{{
 % ffmpeg -copyts -i /dump/copyts_concatenated_stream.ts -vcodec libx264
 -profile:v baseline -r 12 -g 36 -preset ultrafast -filter:v yadif -f
 mpegts -y /dev/null
 ffmpeg version N-58512-g2459318 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Nov 28 2013 12:27:19 with gcc 4.7 (Debian 4.7.2-5)
   configuration: --prefix=/home/aurelien/local --enable-postproc --enable-
 nonfree --enable-gpl --enable-libfaac --enable-shared --enable-libx264
 --extra-cflags=-I/home/aurelien/local/include --extra-
 ldflags=-L/home/aurelien/local/lib --enable-version3 --disable-
 optimizations --enable-libfreetype --disable-stripping --enable-libaacplus
 --enable-libfdk-aac
   libavutil      52. 55.100 / 52. 55.100
   libavcodec     55. 44.100 / 55. 44.100
   libavformat    55. 21.102 / 55. 21.102
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     3. 91.100 /  3. 91.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 [mp3 @ 0x18135c0] Header missing
 [mpeg2video @ 0x1812b60] Invalid frame dimensions 0x0.
 [mp3 @ 0x1814a80] Header missing
 [mpeg2video @ 0x1812b60] Invalid frame dimensions 0x0.
     Last message repeated 4 times
 [mpegts @ 0x180eb00] PES packet size mismatch
 Input #0, mpegts, from '/dump/copyts_concatenated_stream.ts':
   Duration: 26:28:51.62, start: 863.036433, bitrate: 0 kb/s
   Program 1230
     Stream #0:0[0x8aa]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
 yuv420p(tv), 544x576 [SAR 32:17 DAR 16:9], max. 5200 kb/s, 25 fps, 25 tbr,
 90k tbn, 50 tbc
     Stream #0:1[0x90e](fra): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
 stereo, s16p, 192 kb/s
     Stream #0:2[0x972](fra): Subtitle: dvb_teletext ([6][0][0][0] /
 0x0006)
     Stream #0:3[0x9d6](qad): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
 stereo, s16p, 192 kb/s
 [libx264 @ 0x1815c80] using SAR=32/17
 [libx264 @ 0x1815c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
 AVX AVX2 FMA3 LZCNT BMI2
 [libx264 @ 0x1815c80] profile Constrained Baseline, level 2.2
 Output #0, mpegts, to '/dev/null':
   Metadata:
     encoder         : Lavf55.21.102
     Stream #0:0: Video: h264 (libx264), yuv420p, 544x576 [SAR 32:17 DAR
 16:9], q=-1--1, 90k tbn, 12 tbc
     Stream #0:1(fra): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video -> libx264)
   Stream #0:1 -> #0:1 (mp2 -> mp2)
 Press [q] to stop, [?] for help
 [mp2 @ 0x18135c0] Header missing
 Error while decoding stream #0:1: Invalid data found when processing input
 [mp2 @ 0x18135c0] Header missing
 Error while decoding stream #0:1: Invalid data found when processing input
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 28
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 29
 [mpeg2video @ 0x1812b60] 00 motion_type at 18 24
 [mpeg2video @ 0x1812b60] invalid mb type in B Frame at 3 32
 [mpeg2video @ 0x1812b60] 00 motion_type at 1 33
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 34
 [mpeg2video @ 0x1812b60] ac-tex damaged at 1 35
 [mpeg2video @ 0x1812b60] 00 motion_type at 19 10
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 11
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 12
 [mpeg2video @ 0x1812b60] 00 motion_type at 7 13
 [mpeg2video @ 0x1812b60] invalid mb type in B Frame at 1 30
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 31
 [mpeg2video @ 0x1812b60] 00 motion_type at 15 14
 [mpeg2video @ 0x1812b60] invalid cbp -1 at 3 15
 [mpeg2video @ 0x1812b60] slice mismatch
 [mpeg2video @ 0x1812b60] 00 motion_type at 1 17
 [mpeg2video @ 0x1812b60] invalid cbp -1 at 0 18
 [mpeg2video @ 0x1812b60] ac-tex damaged at 0 19
 [mpeg2video @ 0x1812b60] invalid cbp 0 at 0 20
 [mpeg2video @ 0x1812b60] invalid mb type in B Frame at 4 21
 [mpeg2video @ 0x1812b60] 00 motion_type at 5 22
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 23
 [mpeg2video @ 0x1812b60] 00 motion_type at 1 24
 [mpeg2video @ 0x1812b60] 00 motion_type at 2 25
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 26
 [mpeg2video @ 0x1812b60] 00 motion_type at 0 27
 [mpeg2video @ 0x1812b60] Warning MVs not available
 [mpeg2video @ 0x1812b60] concealing 884 DC, 884 AC, 884 MV errors in B
 frame

 <<< need to Ctrl-C twice to kill ffmpeg from here >>>
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3179>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list