[FFmpeg-devel] [PATCH] fix stream copy

Maksym Veremeyenko verem
Thu Jan 14 12:34:02 CET 2010


Maksym Veremeyenko ???????(??):
[...]
> So the only idea to find solution is to check if read and written 
> packets has proper pts values.
i think i was on right path :-)
attached patch fix a problem.

BEFORE:

[root at diva-proxy ffmpeg-r21211]# /home/enctools/bin/ffmpeg -i 
/home/diva/1/3/snoop_dog_105_d.mov -t 1.0 -an -vcodec copy -y 
/home/diva/1/3/CUT_t10_snoop_dog_105_d.mov
FFmpeg version SVN-r21010, Copyright (c) 2000-2010 Fabrice Bellard, et al.
   built on Jan  4 2010 11:21:04 with gcc 4.3.2 20081105 (Red Hat 4.3.2-7)
   configuration: --prefix=/home/enctools --enable-libfaac 
--enable-libfaad --enable-libmp3lame --enable-postproc --enable-pthreads 
--enable-libx264 --enable-libxvid 
--extra-cflags=-I/home/enctools/include 
--extra-ldflags=-L/home/enctools/lib --enable-shared --enable-gpl 
--enable-nonfree --enable-avfilter --enable-avfilter-lavf
   libavutil     50. 7. 0 / 50. 7. 0
   libavcodec    52.45. 0 / 52.47. 0
   libavformat   52.46. 0 / 52.46. 0
   libavdevice   52. 2. 0 / 52. 2. 0
   libavfilter    1.13. 0 /  1.15. 0
   libswscale     0. 7. 2 /  0. 8. 0
   libpostproc   51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'/home/diva/1/3/snoop_dog_105_d.mov':
   Duration: 00:03:02.28, start: 0.000000, bitrate: 30336 kb/s
     Stream #0.0(eng): Video: dvvideo, yuv420p, 720x576, 28800 kb/s, PAR 
767:720 DAR 767:576, 25 fps, 25 tbr, 600 tbn, 25 tbc
     Stream #0.1(eng): Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 
kb/s
Output #0, mov, to '/home/diva/1/3/CUT_t10_snoop_dog_105_d.mov':
     Stream #0.0(eng): Video: dvvideo, yuv420p, 720x576 [PAR 212:199 DAR 
265:199], q=2-31, 28800 kb/s, 600 tbn, 600 tbc
Stream mapping:
   Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  600 fps=  0 q=-1.0 Lsize=   84378kB time=23.96 
bitrate=28847.1kbits/s
video:84375kB audio:0kB global headers:0kB muxing overhead 0.003558%

AFTER:

[root at diva-proxy ffmpeg-r21211]# ./ffmpeg_g -i 
/home/diva/1/3/snoop_dog_105_d.mov -t 1.0 -an -vcodec copy -y 
/home/diva/1/3/CUT_t10_snoop_dog_105_d.mov
FFmpeg version SVN-r21211, Copyright (c) 2000-2010 Fabrice Bellard, et al.
   built on Jan 14 2010 13:16:31 with gcc 4.3.2 20081105 (Red Hat 4.3.2-7)
   configuration: --prefix=/home/enctools --enable-libfaac 
--enable-libfaad --enable-libmp3lame --enable-postproc --enable-pthreads 
--enable-libx264 --enable-libxvid 
--extra-cflags='-I/home/enctools/include -DDEBUG' 
--extra-ldflags=-L/home/enctools/lib --enable-shared --enable-gpl 
--enable-nonfree --enable-avfilter --enable-avfilter-lavf --enable-debug=3
   libavutil     50. 7. 0 / 50. 7. 0
   libavcodec    52.47. 0 / 52.47. 0
   libavformat   52.46. 0 / 52.46. 0
   libavdevice   52. 2. 0 / 52. 2. 0
   libavfilter    1.15. 0 /  1.15. 0
   libswscale     0. 8. 0 /  0. 8. 0
   libpostproc   51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'/home/diva/1/3/snoop_dog_105_d.mov':
   Duration: 00:03:02.28, start: 0.000000, bitrate: 30336 kb/s
     Stream #0.0(eng): Video: dvvideo, yuv420p, 720x576, 28800 kb/s, PAR 
767:720 DAR 767:576, 25 fps, 25 tbr, 600 tbn, 25 tbc
     Stream #0.1(eng): Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 
kb/s
Output #0, mov, to '/home/diva/1/3/CUT_t10_snoop_dog_105_d.mov':
     Stream #0.0(eng): Video: dvvideo, yuv420p, 720x576 [PAR 212:199 DAR 
265:199], q=2-31, 28800 kb/s, 600 tbn, 600 tbc
Stream mapping:
   Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=   25 fps=  0 q=-1.0 Lsize=    3516kB time=0.96 
bitrate=29954.4kbits/s
video:3516kB audio:0kB global headers:0kB muxing overhead 0.021500%

After the patch NTSC mov files starts to cut in proper duration.

-- 
________________________________________
Maksym Veremeyenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg_sync_opts_value_fix.patch
Type: text/x-patch
Size: 550 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100114/da7bfcae/attachment.bin>



More information about the ffmpeg-devel mailing list