how to convert avi (xvid) to mkv or mp4 (h264)
Posted
by
bcsteeve
on Ask Ubuntu
See other posts from Ask Ubuntu
or by bcsteeve
Published on 2013-11-04T04:07:37Z
Indexed on
2013/11/04
4:13 UTC
Read the original article
Hit count: 336
Very noob when it comes to video. I'm trying to make sense of what I"m finding via Google... but its mostly Greek to me.
I have a bunch of Avi files that won't play in my WD TV Play box. Mediainfo tells me they are xvid. Specs for the box show that should be fine... but digging through forums says its hit-and-miss. So I'd like to try converting them to h264 encoded MKV or mp4 files.
I gather avconv is the tool, but reading the manual just has me really really confused.
I tried the very basic example of:
avconv -i file.avi -c copy file.mp4
it took less than 4 seconds. And it worked... sort of. It "played" in that something came up on the screen... but there was horrible artifacting and scenes would just sort of melt into each other. I want to preserve quality if possible.
I'm not concerned about file size. I'm not terribly concerned with the time it takes either, provided I can do them in a batch.
Can someone familiar with the process please give me a command with the options?
Thank you for your help.
I'm posting the mediainfo in case it helps:
General
Complete name : \\SERVER\Video\Public\test.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 189 MiB
Duration : 11mn 18s
Overall bit rate : 2 335 Kbps
Writing application : Lavf52.32.0
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced Simple@L5
Format settings, BVOP : 2
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Muxing mode : Packed bitstream
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 11mn 18s
Bit rate : 2 129 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.206
Stream size : 172 MiB (91%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Duration : 11mn 18s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 15.5 MiB (8%)
Alignment : Aligned on interleaves
Interleave, duration : 24 ms (0.72 video frame)
© Ask Ubuntu or respective owner