I know really little about encoding and using avconv / ffmpeg. I am trying to downsample a video as follows:
avconv -i blah_in.avi -s 640x360 -pass 1 blah.avi avconv -i blah_in.avi -s 640x360 -pass 2 blah.avi I am aware that this is very simplistic, yet I can't figure out what the problem is. Here is the error message from pass 1:
avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers built on Jun 12 2012 16:37:58 with gcc 4.6.3 [avi @ 0x9fdd240] non-interleaved AVI Input #0, avi, from 'blah_in.avi': Metadata: encoder : MEncoder svn r34540 (Ubuntu), built with gcc-4.6 Duration: 01:21:59.24, start: 0.000000, bitrate: 8996 kb/s Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s File 'blah.avi' already exists. Overwrite ? [y/N] y [buffer @ 0x9fe1e00] w:1920 h:1080 pixfmt:yuv420p [scale @ 0x9fdcfa0] w:1920 h:1080 fmt:yuv420p -> w:640 h:360 fmt:yuv420p flags:0x4 Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt' [ac3 @ 0x9fdc740] invalid bit rate Output #0, avi, to 'blah.avi': Metadata: encoder : MEncoder svn r34540 (Ubuntu), built with gcc-4.6 Stream #0.0: Video: mpeg4, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, pass 1, 200 kb/s, 90k tbn, 23.98 tbc Stream #0.1: Audio: ac3, 44100 Hz, stereo, flt, 200 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> mpeg4) Stream #0:1 -> #0:1 (mp3 -> ac3) Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height I have tried a number of things, but either they end up with a similar error message, or the quality is extremely poor; not so much due to low resolution, but full of compression artifacts.
Now, what I would like to achieve is the same resolution / encoding as the following avi file, which plays fine on my kids video device:
Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 624x352 [PAR 1:1 DAR 39:22], 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
200 kb/sfor audio is quite a lot (especially when the input has lower bitrate) whereas for video it's way too little. You can also copy the stream unchanged (-acodec copyiirc).