[FFmpeg-user] Problem with -vf crop with current git

Steve Kenton skenton at ou.edu
Mon Oct 8 05:30:48 CEST 2012


It looks like -vf crop gets ignored for the raw video input stream file 
if followed on the command line by a raw audio stream input file but 
switching the order of the two inputs on the command line make it work. 
Am I doing something stupid or is this a bug? Test script and output below.

Thanks - Steve

#!/bin/bash
# zot script to demonstrate -vf problem with ffmpeg 1.0

# This gets encoded to mpeg at 720x486 - the crop is ignored
ffmpeg -threads auto -f rawvideo -vcodec rawvideo -video_size 720x486 
-pixel_format uyvy422 -framerate 30000/1001 -i clip1.raw -vf 
crop=320:240 -f s16le -acodec pcm_s16le -sample_rate 28000 -channels 2 
-i clip1.aud -y xxx1.mpg

# This gets encoded to mpeg at 320x240 - the crop is processed
ffmpeg -threads auto -f s16le -acodec pcm_s16le -sample_rate 28000 
-channels 2 -i clip1.aud -f rawvideo -vcodec rawvideo -video_size 
720x486 -pixel_format uyvy422 -framerate 30000/1001 -i clip1.raw -vf 
crop=320:240 -y xxx2.mpg

================= Output Below ====================

$ bash zot
ffmpeg version git-2012-10-05-5cdd3b9 Copyright (c) 2000-2012 the FFmpeg 
developers
   built on Oct  4 2012 23:24:41 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
   configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac 
--enable-libmp3lame --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-librtmp --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 
--enable-nonfree --enable-version3
   libavutil      51. 73.102 / 51. 73.102
   libavcodec     54. 63.100 / 54. 63.100
   libavformat    54. 29.105 / 54. 29.105
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 19.102 /  3. 19.102
   libswscale      2.  1.101 /  2.  1.101
   libswresample   0. 16.100 /  0. 16.100
   libpostproc    52.  1.100 / 52.  1.100
[rawvideo @ 0x240c820] Estimating duration from bitrate, this may be 
inaccurate
Input #0, rawvideo, from 'clip1.raw':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x486, 
29.97 tbr, 29.97 tbn, 29.97 tbc
[s16le @ 0x24158a0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, s16le, from 'clip1.aud':
   Duration: 00:00:17.16, start: 0.000000, bitrate: 896 kb/s
     Stream #1:0: Audio: pcm_s16le, 28000 Hz, stereo, s16, 896 kb/s
[mpeg @ 0x2417b60] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'xxx1.mpg':
   Metadata:
     encoder         : Lavf54.29.105
     Stream #0:0: Video: mpeg1video, yuv420p, 720x486, q=2-31, 200 kb/s, 
90k tbn, 29.97 tbc
     Stream #0:1: Audio: mp2, 32000 Hz, stereo, s16, 128 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
   Stream #1:0 -> #0:1 (pcm_s16le -> mp2)
Press [q] to stop, [?] for help
Truncating packet of size 4096 to 897608kB time=00:00:07.54 bitrate= 
660.1kbits/s
frame=  300 fps=211 q=31.0 Lsize=     956kB time=00:00:17.15 bitrate= 
456.5kbits/s
video:678kB audio:268kB subtitle:0 global headers:0kB muxing overhead 
1.014641%


ffmpeg version git-2012-10-05-5cdd3b9 Copyright (c) 2000-2012 the FFmpeg 
developers
   built on Oct  4 2012 23:24:41 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
   configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac 
--enable-libmp3lame --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-librtmp --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 
--enable-nonfree --enable-version3
   libavutil      51. 73.102 / 51. 73.102
   libavcodec     54. 63.100 / 54. 63.100
   libavformat    54. 29.105 / 54. 29.105
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 19.102 /  3. 19.102
   libswscale      2.  1.101 /  2.  1.101
   libswresample   0. 16.100 /  0. 16.100
   libpostproc    52.  1.100 / 52.  1.100
[s16le @ 0x2f4f700] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, s16le, from 'clip1.aud':
   Duration: 00:00:17.16, start: 0.000000, bitrate: 896 kb/s
     Stream #0:0: Audio: pcm_s16le, 28000 Hz, stereo, s16, 896 kb/s
[rawvideo @ 0x2f58700] Estimating duration from bitrate, this may be 
inaccurate
Input #1, rawvideo, from 'clip1.raw':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #1:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x486, 
29.97 tbr, 29.97 tbn, 29.97 tbc
[mpeg @ 0x2f59340] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'xxx2.mpg':
   Metadata:
     encoder         : Lavf54.29.105
     Stream #0:0: Video: mpeg1video, yuv420p, 320x240, q=2-31, 200 kb/s, 
90k tbn, 29.97 tbc
     Stream #0:1: Audio: mp2, 32000 Hz, stereo, s16, 128 kb/s
Stream mapping:
   Stream #1:0 -> #0:0 (rawvideo -> mpeg1video)
   Stream #0:0 -> #0:1 (pcm_s16le -> mp2)
Press [q] to stop, [?] for help
Truncating packet of size 4096 to 897366kB time=00:00:07.04 bitrate= 
425.8kbits/s
frame=  300 fps=0.0 q=6.8 Lsize=     642kB time=00:00:17.15 bitrate= 
306.5kbits/s
video:365kB audio:268kB subtitle:0 global headers:0kB muxing overhead 
1.439172%



More information about the ffmpeg-user mailing list