Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
5th December 2009, 18:15 | #1 | Link |
Registered User
Join Date: Oct 2009
Posts: 10
|
Reduce the size (spatial resolution) of YUV file
Hi,
I need to reduce the spatial resolution of YUV files by a factor of 2, i.e from 352x288 to 176x144. Can ffmpeg do this? How? I'm looking especially for a piece of code that can be used under linux in a batch mode. Is there any solution please? Thank you! |
5th December 2009, 18:33 | #2 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
And RTFM: http://ffmpeg.org/ffmpeg-doc.html#SEC9 |
|
5th December 2009, 20:27 | #5 | Link |
Registered User
Join Date: Oct 2009
Posts: 10
|
[user@localhost ffmpeg]$ ./ffmpeg -i flower_cif.yuv -s qcif flower_qcif.yuv
FFmpeg version SVN-r20584, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Nov 22 2009 17:57:57 with gcc 4.1.2 20080704 (Red Hat 4.1.2-44) configuration: libavutil 50. 4. 0 / 50. 4. 0 libavcodec 52.41. 0 / 52.41. 0 libavformat 52.39. 2 / 52.39. 2 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 picture size invalid (0x0) [rawvideo @ 0x8ef6420]Could not find codec parameters (Video: rawvideo, yuv420p) flower_cif.yuv: could not find codec parameters |
5th December 2009, 21:14 | #6 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
./ffmpeg -s cif -i flower_cif.yuv -s qcif flower_qcif.yuv |
|
5th December 2009, 22:34 | #8 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
But you can select a specific filter with parameter -sws_flags: Code:
$ ffmpeg -h [...] SWScaler AVOptions: -sws_flags <flags> E.V.. scaler/cpu flags fast_bilinear E.V.. fast bilinear bilinear E.V.. bilinear bicubic E.V.. bicubic experimental E.V.. experimental neighbor E.V.. nearest neighbor area E.V.. averaging area bicublin E.V.. luma bicubic, chroma bilinear gauss E.V.. gaussian sinc E.V.. sinc lanczos E.V.. lanczos spline E.V.. natural bicubic spline print_info E.V.. print info accurate_rnd E.V.. accurate rounding mmx E.V.. MMX SIMD acceleration mmx2 E.V.. MMX2 SIMD acceleration 3dnow E.V.. 3DNOW SIMD acceleration altivec E.V.. AltiVec SIMD acceleration bfin E.V.. Blackfin SIMD acceleration full_chroma_int E.V.. full chroma interpolation full_chroma_inp E.V.. full chroma input bitexact E.V.. |
|
|
|