LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-06-2009, 12:45 PM   #1
m.lp.ql.m
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Rep: Reputation: 0
Converting video files to be able to play on Windows.


Why is it so difficult for me to render or convert any kind video file in Linux to anything that will play correctly in Windows? Even the basic mpeg1 file that I make plays corrupted, either the video, or the audio, or both. What's the secret? I'm pretty sure I've tried just about everything, ffmpeg, avidemux, a couple other command line options I've read on the net. It's almost enough to force me to torrent a cracked Adobe Premier and work in Windows. Help!
 
Old 04-07-2009, 03:16 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Whoops, double post, sorry...

Last edited by rylan76; 04-07-2009 at 03:18 AM.
 
Old 04-07-2009, 03:18 AM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Hmm you are not specifying how you get the file or from where you want to convert it.

I use the MPlayer package, it has a very powerful encoder that comes along with it called mencoder.

I would suggest you download this, compile and install it, and try it out... just google "mplayer". Or check you favourite pacakage manager (though I always would suggest you compile it from source yourself - you have more control that way)

I have successfully created Windows playable files with mencoder (in the DivX4 codec standard) using the following command line. It takes all .jpg files in the directory, and outputs a 25fps DivX4 / 5 compliant MPEG:

Code:
# mencoder "mf://*.jpg" -mf fps=25:type=jpg -o out.mpg -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=900:vrc_eq=tex:naq:ilme:trell:cbp:preme=1:keyint=132:mbd=0:qns=1:vme=4:dia=2 -noskip
This file can then be played in Windows if you have the DivX codec / player installed there.

Additionally, I have used mencoder to make DVD rips into .avi files that are fully playable in Windows it you have DivX4 / 5 codec and / or player installed.

This makes a medium quality DivX 4 / 5 compatible .avi from the Title 1 of the DVD in the DVD drive when this is executed on the BASH commandline in a terminal. Rips title 1 off the DVD to the file bob_part_a.avi, taking the English language track for the audio, with mencoder:

Code:
mencoder dvd://1 -alang en -o bob_part_a.avi -oac mp3lame -lameopts vol=8 -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:aspect=1.78/1:vbitrate=1800:vrc_eq=tex:naq:ilme:trell:cbp:preme=1:keyint=132:mbd=0:qns=1:vme=4:dia=2 -noskip
This, for example, "transcodes" an XViD encoded avi file (not playable on my Windows XP install) with relatively little loss of quality to a Windows playable DivX4 / 5 coded .avi with mencoder (that DOES play on my Windows XP install):

Code:
mencoder /mnt/cdrom/sw1.avi -o sw1.avi -oac mp3lame -lameopts vol=8 -ovc lavc -ffourcc DX50 -lavcopts
vcodec=mpeg4:aspect=1.78/1:vbitrate=1800:vrc_eq=tex:naq:ilme:trell:cbp:preme=1:keyint=132:mbd=1:qns=1:vme=4:dia=2 -noskip
For very high quality transcodes or encodes, also try

Code:
mencoder /mnt/cdrom/sw1.avi -o sw1.avi -oac mp3lame -lameopts vol=8 -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:aspect=1.78/1:vbitrate=1800:vrc_eq=tex:naq:ilme:trell:cbp:preme=2:subq=8:keyint=132:mbd=1:qns=3:vme=4:dia=3 -noskip
i. e. instead of

Code:
vrc_eq=tex:naq:ilme:trell:cbp:preme=1:keyint=132:mbd=1:qns=1:vme=4:dia=2 -noskip
this results in better quality, but longer encode time:

Code:
vrc_eq=tex:naq:ilme:trell:cbp:preme=2:subq=8:keyint=132:mbd=1:qns=3:vme=4:dia=3 -noskip
Also bringing the bitrate down will result in a smaller file with progressively more loss of quality the lower you set the vbitrate mencoder option.

Hope this helps... the application you are looking for is definitely mencoder IMO.
 
Old 04-11-2009, 05:00 PM   #4
m.lp.ql.m
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you so much for you detailed reply-- it sure helped. It seems I basically have 2 problems:
1) that all the GUI tools I use for video work don't work too well for some reason. But the command line ones do. mencoder does work like a charm, (so did ffmpeg) once you know what you need to convert to, and
2) it seems MSWindows only plays certain types of encodings, but doesn't really tell you which ones. For instance, it'll play one type of .mpg but not another type, or an .avi that is a wrapper for one type of encoded file, but not another type of encoded file. And finding out exactly what types will play on MSWindows, and what those types really are (because Linux tools seem to call things by their real names), takes quite a bit of Googling and experimentation.

So I'm off to brush up on the subject, but at least I now know that it can be done.
 
  


Reply

Tags
avi, dvd, encoding, mencoder, mpg, ripping, transcode, vlc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting audio and video files. LinuxNoob75 Linux - Desktop 3 08-28-2007 09:49 AM
Converting Video files? Snump Mandriva 5 04-11-2007 06:41 PM
a strange problem when converting video files to dvd-compatable files d00bid00b Slackware 0 12-01-2006 11:43 AM
Batch converting video files rudlavibizon Linux - Desktop 6 12-01-2006 04:25 AM
For people how want to play WMA files without converting MP3 files waelaltaqi Linux - Software 15 11-17-2005 08:30 AM


All times are GMT -5. The time now is 07:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration