2
5
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%
What do we do to use it in Ubuntu 14.04? – dfordevy – 2015-02-07T13:18:11.087
You can do exactly the same thing in Ubuntu 14.04 but with
– slhck – 2015-02-07T13:21:47.930libavcodec-extra-54. As for the file being "still MP4v1", you need to tell me what exactly you did and upload the full command line output somewhere (e.g. http://pastebin.com/).I have pasted the output of: avconv -i input.webm -c:v libx264 -crf 20 -c:a aac -strict experimental test_1min_no_preset.mp4 here: http://pastebin.com/SQdbvM0Y. when I do file test_1min_no_preset.mp4, test_1min_no_preset.mp4: ISO Media, MPEG v4 system, version 1
– dfordevy – 2015-02-09T05:27:08.657I don't think avconv or ffmpeg can write
mp42tags. Why do you actually need it? Is MP4v1 not good enough? – slhck – 2015-02-09T07:30:30.240Any tag is ok for me but I just need that to play them using Windows Media Player. – dfordevy – 2015-02-09T07:33:14.433
That solely depends on the version of Windows Media Player and Windows: http://support.microsoft.com/kb/316992?wa=wsignin1.0 — only the newest WMP can play H.264/AAC at all. For older WMP versions you need additional codecs.
– slhck – 2015-02-09T07:42:18.700I need those codecs too, I need it to be supported on old Windows Media Players. What do I need to do for that? – dfordevy – 2015-02-09T11:16:58.773
See http://superuser.com/questions/314694/how-do-i-tell-ffmpeg-to-transcode-to-a-video-codec-supported-by-windows-media-pl and http://superuser.com/questions/435941/which-codecs-are-most-suitable-for-playback-with-windows-media-player-on-windows and http://superuser.com/questions/418945/convert-video-into-format-which-is-most-likely-playable-on-a-windows-system
– slhck – 2015-02-09T11:18:28.580http://pastebin.com/MR2gkNjA this is what the output looks like on my trusty machine where converted file is showing me black video. With the same command as above. The only change is that I have tried to just copy the audio. – dfordevy – 2015-02-09T11:27:41.127
You haven't told me what command you're using though. Also, I would recommend you ask a new question (as this comment thread really should not be used as a substitute for chat), including the command, the command line output, and what player you're trying to view the video in. Thanks! – slhck – 2015-02-09T11:32:45.197