Originally Posted by
michael37
Example, this file has 8k bitrate (way too high)
% avconv -i MyAristaFile.mpg
...
Duration: 00:00:07.90, start: 0.287267, bitrate: 8979 kb/s
Ok, great news that avconv can grab all the info I should need. The results I get are:
Code:
avconv -i *.mpgavconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:00:59 with gcc 4.6.3
[mpeg @ 0x9b83240] max_analyze_duration reached
[NULL @ 0x9b857a0] start time is not set in estimate_timings_from_pts
Input #0, mpeg, from 'ABC Song in the Clouds (ZED version) - YouTube [720p].mpg':
Duration: 00:01:40.02, start: 1.000000, bitrate: 899 kb/s
Stream #0.0[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 192 kb/s
Stream #0.1[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x406 [PAR 1:1 DAR 360:203], 4000 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbc
At least one output file must be specified
So I have tried to modify my oneliner, attempting to break the avconv command down to basics to begin with:
Code:
find . -type f -name "*.mp4" -exec bash -c 'avconv -i "$0" -b 900k "${0/%mp4/mpg}"' '{}' \;
but I continue to get the error:
Code:
[mp2 @ 0x96f2740] bitrate 900 is not allowed in mp2
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
I based the -b 900k flag value on the 899kb/s listed by avconv's inquiry of the Arista file's .mpg. The flag value also appear consistent with examples listed in the avconv man page, so I am at a bit of a loss. I wonder if when specifying a bit rate (-b) if other specified params are req'd along with it?
any advice much appreciated.
Bookmarks