|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Multimedia Don't know how to watch DVDs using mplayer? Asking yourself what the heck mplayer is? This is the right place to ask. |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
This thread is getting old, so I thought I would bump it.
Does anyone have any suggestions of useful command lines to use, to convert .avi to .mpeg? I suspect this may consist of more than one line, as I have seen various programs first strip out the audio, then convert video to mpeg, and then re-insert the audio. |
|
|||
|
Quote:
http://www.mplayerhq.hu/DOCS/HTML/en...feat-mpeg.html Code:
mencoder input.avi -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=2000 -o output.mpg -oac lavc -ovc lavc -lavcopts acodec=mp2:abitrate=224:vcodec=mpeg1video:vbitrate=1152:keyint=15:mbd=2:aspect=4/3 |
|
|||
|
This might help someone.
Code:
#!/bin/bash where=`kdialog --title "Base Directory" --inputbox "Where is File? i.e /home/$USER/Documents/here.avi" "/home/$USER/Documents"` what=`kdialog --menu "Format Type" 1 "PAL" 2 "NTSC"` echo $what if [ $what = "1" ] then ****what="-ofps 25" ****iso="pal" else ****what="-ofps 29.97" ****iso="ntsc" fi channel=`kdialog --title "Choose Transformation" --menu**"Select Transformation:" 1 "WMV to AVI**(Mencoder)" 2 "AVI to WMV**(Mencoder)" 3 "AVI to MPEG**(Mencoder)" 4 "MPEG to AVI**(Mencoder)" 5 "QuickTime to AVI**(.mov to .avi Mencoder)" 6 "AVI to Quicktime**(.avi to .mov Mencoder)" 7 "Flash to AVI**(.flv to .avi FFmpeg)" 8 "AVI to Flash**(.avi to .flv FFmpeg)" 9 "Rotate 90 Degrees" 10 "Compliant DVD ISO**(FFmpeg)" 11 "Compliant VCD ISO**(FFmpeg)" 12 "Compliant SVCD ISO**(ffmpeg)"` here=`kdialog --title "File Out Name" --inputbox "Path to File Out, leave off extension" "/home/$USER/Documents/"` if [ $channel = "1" ] then ****echo `mencoder -ovc lavc $what -oac pcm $where -o "$here.avi"` elif [ $channel = "2" ] then ****echo `mencoder -ovc lavc $what -oac pcm $where -o "$here.wmv"` elif [ $channel = "3" ] then ****echo `mencoder $where -ovc lavc $what -oac lavc -o "$here.mpg"` elif [ $channel = "4" ] then ****echo `mencoder $where -ovc lavc $what -oac lavc -o "$here.avi"` elif [ $channel = "5" ] then ****echo `mencoder $where -ovc lavc $what -oac pcm -o "$here.avi" ` elif [ $channel = "6" ] then ****echo `mencoder "$where" -ovc lavc $what -oac pcm -o "$here.mov"` elif [ $channel = "7" ] then ****echo `ffmpeg -i $where -ab 56 -ar 22050 -b 500 -s 320x240 $here.avi` ****echo `rm gmon.out` elif [ $channel = "8" ] then ****echo `ffmpeg -i $where -ab 56 -ar 22050 -b 500 -s 320x240 $here.flv` ****echo `rm gmon.out` elif [ $channel = "9" ] then ****echo `mencoder $where -o "$here.avi" -oac copy -ovc lavc $what -vf rotate=2` elif [ $channel = "10" ] then ****echo `mkdir here` ****echo `ffmpeg -i $where -target "$iso"-dvd "$here.mpg" && dvdauthor -o here "$here.mpg" && dvdauthor -o here -T && mkisofs -dvd-video -o dvd.iso here` ****echo `rm -r here` ****echo `rm "$here.mpg"` ****echo `rm gmon.out` elif [ $channel = "11" ] then ****echo `mkdir here` ****echo `ffmpeg -i $where -target "$iso"-vcd "$here.mpg" && mkisofs -o vcd.iso "$here.mpg"` ****echo `rm -r here` ****echo `rm "$here.mpg"` ****echo `rm gmon.out` elif [ $channel = "12" ] then ****echo `mkdir here` ****echo `ffmpeg -i $where -target "$iso"-svcd "$here.mpg" && mkisofs -o $here.iso "$here.mpg"` ****echo `rm -r here` ****echo `rm "$here.mpg"` ****echo `rm gmon.out` fi Its simple and has no error checking, I also discovered along the way that 64bit is throwing up some errors for example whilst mencoder -ovc lavc -ofps 25 -oac pcm input-file.??? -o output.??? This does seem to convert most things thrown at it, I even gave it an ISO which seemed to be converted, but when it came to the .rm I got no where even trying to using lavc vcodec=ffrv10 etc, which as a 64bit said not available. On looking to see what's compiled natively with ==> mplayer --help -vfm help It is certainly not native, So if someone knows of a work around it may help someone in the future. It maybe a ? of a 32bit Mencoder and codecs. Edit Also needs KDE as its using kde's dialogs. But perhaps it'll give someone a base to continue with
|
|
|||
|
if you want to convert DVDs to either XviD or H.264 format using MEncoder, just get my own scripts from SourceForge. They are full CLI interfaces for MEncoder and support a lot of features like DVD cropping, deinterlacing, subtitle inclusion, software scaling, various audio codecs (MP2, MP3, AAC, AC3, PCM, ADPCM, COPY) and much more
support for 1-pass, 2-pass and fixed quant (constant quality) is also available.... Just click on one of the links below in my signature to get them
|
|
|||
|
Quote:
|
|
|||
|
Quote:
|
|
|||
|
Quote:
I took a youtube 320x240 music video (.flv format) and used your script to convert it to a 640x480 avi file (which I think is a reasonable challenge) and using mostly defaults (and a coin toss for areas with no default, that I didn't understand), and I was most impressed with the resultant 640x480 avi file output. Many thanks. |
|
|||
|
Quote:
|
|
|||
|
I had a real media audio file I wanted to convert to .wav file. All I needed to do was type:
mplayer -ao pcm audio-file.rm (where audio-file.rm was my .rm file). That created a file on my hard drive called audiodump.wav, which was the converted audio-file.rm file, now a .wav file. |
|
|||
|
this is how i ripped the holy trilogy for use on a single dvd5(going to bed dvd):
pop new hope in the drive and extract title 1 $ mencoder dvd://1 -o swch4.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000 -vf pp=fd extract the audio to a wav file $ mplayer -vc null -vo null -ao pcm:fast -ao pcm:file=swch4.wav swch4.avi normalize it $ normalize swch4.wav convert the wav to mp2 $ toolame -s 48000 -b 128 -p 2 swch4.wav swch4.mp2 convert the video to mpeg2 elementary video stream $ avidemux2 --load swch4.avi --output-format ES --video-codec XDVD --video-conf 2pass=1000 --save swch4.mpg --quit i scripted the whole process to do all 3 at once(except for the actual rip from dvd...no matter how hard i try i can't make bash take out a disc and put in a new one). i'm sure i can consolidate some steps and eliminate some redundancy but this how i did this particular disc. i'll try and fix it before i do LOTR trilogy. the last step is to author the dvd. i currently use dvdlabpro2 through crossover because it's just unrivaled. if you want a going to bed compilation disc, make sure you [end link] a play all button to itself so the sucker will just play all night. |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|