[FFmpeg-user] codec copy fails with malformed bitstreams in mpegts

Rares Pop raresp at axz.ro
Wed Sep 19 19:13:53 CEST 2012


Hi,

Every now and then ffmpeg fails when remuxing a mpegts file with the following error:

[mpegts @ 0x1677a60] H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)
av_interleaved_write_frame(): Invalid argument

The file I am remuxing can be downloaded here: https://www.dropbox.com/sh/b8v81l4l7lhjgj0/6Klxfejcki

I am thinking this is a bug and even if there is an error in the stream the remuxing shouldn't break. I am able to play this file just fine.

The comand and output:

/usr/local/bin/ffmpeg -i /cutchup/record/channel7/_/2012-09-17.00.00.7-0.rec/00066.ts -vcodec copy -an -y /cutchup/record/channel7/_/2012-09-17.00.00.7-0.rec/00066.ts-video.ts
ffmpeg version git-2012-08-27-60924df Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep  1 2012 18:38:17 with gcc 4.5.3 (GCC) 20120403 (ALT Linux 4.5.3-alt1.M60P.1)
  configuration: --enable-gpl --enable-libfdk-aac --enable-libvo-aacenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libx264 --enable-nonfree --enable-version3 --enable-yasm
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 54.100 / 54. 54.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 13.101 /  3. 13.101
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[h264 @ 0x1674140] mmco: unref short failure
    Last message repeated 3 times
[mp3 @ 0x1674a40] Header missing
[h264 @ 0x1674140] mmco: unref short failure
    Last message repeated 1 times
[mpegts @ 0x1670240] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x1670240] PES packet size mismatch
Input #0, mpegts, from '/cutchup/record/channel7/_/2012-09-17.00.00.7-0.rec/00066.ts':
  Duration: 00:12:23.66, start: 77203.089300, bitrate: 2256 kb/s
  Program 132 
    Stream #0:0[0x2be]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x2bf](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 128 kb/s
[mpegts @ 0x1677a60] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to '/cutchup/record/channel7/_/2012-09-17.00.00.7-0.rec/00066.ts-video.ts':
  Metadata:
    encoder         : Lavf54.25.104
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 720x576 [SAR 12:11 DAR 15:11], q=2-31, 50 fps, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x1677a60] H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)
av_interleaved_write_frame(): Invalid argument
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the ffmpeg-user mailing list