I have used the command
ffmpeg -i input.webm -q:v 10 -c:a copy out.mp4
I also tried using avconv
instead of ffmpeg.
The conversion is successful but the quality is bad. Also it takes a lot of time. It also does not play with Windows Media Player. (The reason for this is the mpegv1 to which the file is converted.) How do I add an option to convert it to mpegv2?
Following is the command line output:
avconv version 0.8.16-4:0.8.16-0ubuntu0.12.04.1, Copyright (c) 2000-2014 the Libav developers
built on Sep 16 2014 18:33:49 with gcc 4.6.3
[matroska,webm @ 0xe737a0] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'test.webm':
Duration: 00:00:08.57, start: 0.000000, bitrate: N/A
Stream #0.0: Video: vp8, yuv420p, 1536x768, PAR 1:1 DAR 2:1, 1k fps, 1k tbr, 1k tbn, 1k tbc (default)
Stream #0.1: Audio: vorbis, 44100 Hz, stereo, s16 (default)
[buffer @ 0xee38e0] w:1536 h:768 pixfmt:yuv420p
Output #0, mp4, to 'c2.mp4':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mpeg4, yuv420p, 1536x768 [PAR 1:1 DAR 2:1], q=2-31, 200 kb/s, 1k tbn, 1k tbc (default)
Stream #0.1: Audio: libvorbis, 44100 Hz, stereo (default)
Stream mapping:
Stream #0:0 -> #0:0 (vp8 -> mpeg4)
Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
frame= 8572 fps=342 q=10.0 Lsize= 90902kB time=8.56 bitrate=86984.0kbits/s dup=8438 drop=0
video:90823kB audio:0kB global headers:0kB muxing overhead 0.086778%
Answer
ffmpeg version 1.2.6-7:1.2.6-1~trusty1
ffmpeg -i one.webm -r 10 -cpu-used 5 -c:v libx264 -crf 20 -c:a aac -strict experimental -loglevel error /tmp/one.mp4
This works very well. Converted 1 hour video in 10 minutes.
Comments
Post a Comment