Avconv mp4 for webv libvorbis buffer overflow

Trying to convert a bunch of mp4 files to webm. So I run the following command. I tried a similar command with ffmpeg.

avconv -i input.mp4 -threads 8 -s 1280x720 -pre libvpx-720p -b 3900k -pass 2 -acodec libvorbis -b:a 128k -ac 2 -f webm -y output/webm 

Results in:

  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf52.32.0 Duration: 00:01:02.90, start: 0.000000, bitrate: 1649 kb/s Stream #0.0(und): Video: mpeg4 (Simple Profile), yuv420p, 640x480 [PAR 4:3 DAR 16:9], 1492 kb/s, PAR 853:640 DAR 853:480, 23.94 fps, 30 tbr, 30 tbn, 30 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 152 kb/s Metadata: creation_time : 1970-01-01 00:00:00 [buffer @ 0x1232600] w:640 h:480 pixfmt:yuv420p [scale @ 0x123c300] w:640 h:480 fmt:yuv420p -> w:1280 h:720 fmt:yuv420p flags:0x4 [libvpx @ 0x1256d60] v1.0.0 Output #0, webm, to 'output.webm': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 1970-01-01 00:00:00 encoder : Lavf53.21.0 Stream #0.0(und): Video: libvpx, yuv420p, 1280x720 [PAR 2559:2560 DAR 853:480], q=11-51, pass 2, 3900 kb/s, 1k tbn, 30 tbc Metadata: creation_time : 1970-01-01 00:00:00 Stream #0.1(und): Audio: libvorbis, 44100 Hz, stereo, s16, 152 kb/s Metadata: creation_time : 1970-01-01 00:00:00 Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> libvpx) Stream #0:1 -> #0:1 (aac -> libvorbis) Press ctrl-c to stop encoding [libvorbis @ 0x1221240] libvorbis: buffer overflow.Audio encoding failed 

Pay attention to a good mistake. buffer overflow in libvorbis.

Any help? Alternate conversion command?

UPDATE

The first pass is as follows:

  avconv -i input.mp4 -threads 8 -s 1280x720 -pre libvpx-720p -b 3900k -pass 1 -an -f webm -y output.webm 

Thanks!

+4
source share
2 answers

Turns out this is a problem with -pre vs -preset in avconv. All this ffmpeg fork avconv broke the community for everyone but the developers. Now a Google search for useful information on any tool is useless.

For those who get here on a similar issue, I translated mp4 to webm.

 avconv -i "$inputFile" -threads 8 -s 1280x720 -preset libvpx-720p -b 3900k -pass 1 -an -f webm -y "$outputFile" avconv -i "$inputFile" -threads 8 -preset libvpx-720p -pass 2 -b 3900k -acodec libvorbis -ar 44100 -ac 2 -ab 128k -f webm -y "$outputFile" 

This is for 720P mp4 to 720P WEBM. You can easily configure 1080P, preset exists.

+7
source

I do this to convert from my camcorder to a 720p website in one go:

 avconv -i videoIn.MTS -c:v libvpx -b:v 6000k -qmin 10 -qmax 42 -maxrate 500k -bufsize 1500k -threads 8 -vf scale=-1:720 -c:a libvorbis -b:a 192k -f webm videoOut.webm 
+3
source

Source: https://habr.com/ru/post/1415026/


All Articles