[FFmpeg-devel] [PATCH] incorrect stream index for bitstream filter when doing stream copy

Andreas Öman andreas
Tue Jan 8 21:52:09 CET 2008


Hi

If doing stream copy, the bitstream filter is not correctly applied if
the stream index does not happen to match between the input and output
format.

The attached patch fixes the issue. I believe it's the correct way of
fixing the bug.

Still, the produced file is not playable by ffplay. It seems the
generated SPS/PPS has messed up NAL start codes. I'll have a look
at that separately.

Example:
$ ./ffmpeg -i /storage/lab/nasa_shuttle-r_m720p.mov -vbsf 
h264_mp4toannexb -vcodec copy -an -y test.h264
FFmpeg version SVN-r11433, Copyright (c) 2000-2008 Fabrice Bellard, et al.
   configuration: --cc=ccache gcc --enable-libmp3lame --enable-libfaad 
--enable-gpl
   libavutil version: 49.6.0
   libavcodec version: 51.49.0
   libavformat version: 52.3.0
   built on Jan  6 2008 13:42:21, gcc: 4.1.3 20070929 (prerelease) 
(Ubuntu 4.1.2-16ubuntu2)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8423fb4]negative ctts, ignoring

Seems stream 1 codec frame rate differs from container frame rate: 
2997.00 (2997/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'/storage/lab/nasa_shuttle-r_m720p.mov':
   Duration: 00:01:00.9, start: 0.000000, bitrate: 6333 kb/s
     Stream #0.0(eng): Audio: mpeg4aac, 44100 Hz, stereo
     Stream #0.1(eng): Video: h264, yuv420p, 1280x720 [PAR 0:1 DAR 0:1], 
29.97 tb(r)
Output #0, h264, to 'test.h264':
     Stream #0.0(eng): Video: avc1 / 0x31637661, yuv420p, 1280x720 [PAR 
0:1 DAR 0:1], q=2-31, 2997.00 tb(c)
Stream mapping:
   Stream #0.1 -> #0.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bsf.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080108/1768c1aa/attachment.bin>



More information about the ffmpeg-devel mailing list