Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
45
rated 0 times [  45] [ 0]  / answers: 1 / hits: 102508  / 2 Years ago, mon, february 28, 2022, 1:26:06

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 : SERVERVideoPublic est.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)

More From » video

 Answers
1

The standard command from http://manpages.ubuntu.com/manpages/precise/man1/avconv.1.html shows this:



avconv -i test.avi -c:v libx264 -c:a copy outputfile.mp4


This will re-encode your video to h264 (=AVC) and keep your sound unchanged which is mp3 and completely legal to the standard.



A few other options to consider with this commandline are:




  • Tweak the quality of the output video by using the -b parameter (bitrate) or use Constant Rate Factor (CRF) with something like -crf 22

  • Use a libx264 preset such as -preset veryslow for improved video



If you use these the options should be placed after -c:v libx264 option...



You may also look at the GUI programs winff and avidemux which will make things less complicated. (also handbrake is a good one but i never came to terms with it )


[#28579] Monday, February 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
reangi

Total Points: 213
Total Questions: 102
Total Answers: 114

Location: Namibia
Member since Wed, Jan 19, 2022
2 Years ago
reangi questions
;