You are not logged in.
Pages: 1
Hello everyone.
I'm a bit of a media noob. I recently downloaded some TV episodes of a show that are in the .mkv container, compressed with h.264 for the video and AAC for the audio.
That's cool, they play fine with VLC and look great. The problem is that I still use an original xbox with xbmc to watch things on my TV. Apparently the h.264 compression is a bit much for that machine. The videos will play, but really slow. I don't hear much for the audio either, but it might because of the slowdown.
My question: is there a simple way to convert these over to xvid? I don't care about filesize going up, and I don't really care about loss in quality. The .mkv container should be fine, as long it can contain xvid? I dunno.
I started to research it on my own, and I got a lot of people talking about windows programs, and a lot of stuff I don't know a ton about.
Is this process even worth doing? Or should I just find a better source?
Thanks!
Offline
It should be easy enough with mencoder. Search with google, read the man for specific flags.
Offline
You could give xvidenc a try, it's in the AUR. You start it with xvidenc -2p -p uhq (-2p = 2-pass mode, uhq = ultra high quality - you can change these options of course, but I would use them, still pretty fast when encoding). Pretty nice cli app! Can handle DVDs and movie files
Offline
Here's a simple two-parter... just run the 1st command and once it finishes run the second. Of course, change the filenames, bitrates, width, etc. as needed:
mencoder originalfile.mkv -oac mp3lame -lameopts abr:br=128 -ovc xvid -xvidencopts bitrate=1000:pass=1 -vf pp=de,scale=480:-2 -o "/dev/null"
mencoder originalfile.mkv -oac mp3lame -lameopts abr:br=128 -ovc xvid -xvidencopts bitrate=1000:pass=2 -vf pp=de,scale=480:-2 -o "newfile.avi"
thayer williams ~ cinderwick.ca
Offline
Hey cool, thanks for the response.
I'm giving mencoder a go right now, I'll let you know how it goes.
Thayer, if you don't mind a newb question, why does there have to be 2 runs with the first going to /dev/null?
Offline
You can transcode in one pass, but the 2 pass method yields exponentially better quality video.
Offline
cschep,
The first pass is to analyze the data of the input file. That data is stored in a file to use for the second pass. This is done to increase the compression ratio. Basically, with some codecs and/or encoders this can produce a better quality to file size ratio. And, it also makes the final file size fairly predictable.
The reason why people use /dev/null as the output of the first pass is because they're not interested in having the encoder produce a video/audio file yet; they just want the data analysis for the second pass. Some software will even allow you to make a third pass. I've heard that it's nothing more than a waste of time.
Offline
To encode/transcode my videos I use Avidemux
It's a GUI that use mplayer to decode the video and mencoder to reencode it.
If you know windows' virtualDub, it's the same type of video editor. The interface is well made, you can't be lost
Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry
Offline
Thanks guys. I guess I was curious because I didn't see how the 2nd pass could use any data from the 1st pass if there was no output file. It must store something somewhere right? Or am I just confused about how video encoding works?
Also, this totally works and plays cleanly on my xbmc now. Woo hoo!
Offline
Thanks guys. I guess I was curious because I didn't see how the 2nd pass could use any data from the 1st pass if there was no output file. It must store something somewhere right? Or am I just confused about how video encoding works?
Look for a file called divx2pass.log in the directory from which you invoked mencoder.
Offline
Thanks guys. I guess I was curious because I didn't see how the 2nd pass could use any data from the 1st pass if there was no output file. It must store something somewhere right? Or am I just confused about how video encoding works?
It outputs it's finding to a log file in the current directory which will be used for the second pass. This is the same data that would have been used to do the compression for single pass. The second pass works better because the encoder now knows more about where the most detail is so it can use less compression there, and where the least detail is so it can use more. This technique works best for encoders that don't do the highest quality encoding the first time through. This includes xvid and most mpeg2 encoders. Some encoders like x264 when set up properly won't really gain much if any help from multiple passes.
I should have mentioned this before. For higher quality output when lowering the bit rate, it's best to use the same codecs as before. Conversions from lossy formats to other lossy formats (m4a-->mp3) reduces quality by huge amounts. Reducing the bit rate in the same format is far less destructive.
I also forgot to mention that the greatest place in the Universe to get answers about all of this stuff is:
Last edited by skottish (2008-10-03 18:08:31)
Offline
Pages: 1