openSUSE Forums > Archives > SLS Archives > ARCHIVES - SuSE Linux > ARCHIVES - Multimedia » Linux Video Format (and Other) Conversions

Go Back   openSUSE Forums > Archives > SLS Archives > ARCHIVES - SuSE Linux > ARCHIVES - Multimedia
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.

 
Page 2 of 4 1 2 34
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 14-Oct-2006, 13:33
oldcpu
Guest
 
Posts: n/a
Default

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.
  #12 (permalink)  
Old 15-Nov-2006, 14:21
oldcpu
Guest
 
Posts: n/a
Default

Quote:
Does anyone have any suggestions of useful command lines to use, to convert .avi to .mpeg? [/b]
I spotted these two examples of AVI to MPEG on the mplayer site:
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
  #13 (permalink)  
Old 18-Dec-2006, 15:06
FeatherMonkey
Guest
 
Posts: n/a
Default

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
Just need to chmod u+x

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
  #14 (permalink)  
Old 18-Dec-2006, 15:18
microchip
Guest
 
Posts: n/a
Default

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
  #15 (permalink)  
Old 18-Dec-2006, 16:39
oldcpu
Guest
 
Posts: n/a
Default

Quote:
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[/b]
Thanks, ... I played with it briefly ... its WELL BEYOND my level of expertise when it comes to selecting different filters, different algorithms, etc .... But I have an out of town windows friend who is always grumbling that linux doesn't have the sort of features he likes (re: filters, algorithms, etc ... when converting to avi) so next time he drops by our city for a day or two, I'll show it to him. He has tried a few times to convert to Linux, but has always gone back to windows, due to disastisfaction with Linux multimedia support (for such advanced features). ... Maybe this time he might find something of interest.
  #16 (permalink)  
Old 18-Dec-2006, 17:22
microchip
Guest
 
Posts: n/a
Default

Quote:
Thanks, ... I played with it briefly ... its WELL BEYOND my level of expertise when it comes to selecting different filters, different algorithms, etc .... But I have an out of town windows friend who is always grumbling that linux doesn't have the sort of features he likes (re: filters, algorithms, etc ... when converting to avi) so next time he drops by our city for a day or two, I'll show it to him. He has tried a few times to convert to Linux, but has always gone back to windows, due to disastisfaction with Linux multimedia support (for such advanced features). ... Maybe this time he might find something of interest.
[/b]
well, those scripts are actually written for people like me who understand and want to play with their settings to find the perfect encoding options and quality. My scripts have default values so you can use them, if you don't understand what all filters do. I also include in the package a brief tutorial (README.encoding) on encoding and which options you should never leave out if you are concerned about quality
  #17 (permalink)  
Old 18-Dec-2006, 18:06
oldcpu
Guest
 
Posts: n/a
Default

Quote:
My scripts have default values so you can use them, if you don't understand what all filters do. [/b]
Indeed! and thats a most appreciated feature.

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.
  #18 (permalink)  
Old 18-Dec-2006, 18:15
microchip
Guest
 
Posts: n/a
Default

Quote:
Indeed! and thats a most appreciated feature.

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.
[/b]
well I encode DVDs for years now, so i got used to all MEncoder options (i only use MEncoder for the job) and then I decided to write a script which will take away all the MEncoder options I have to write on the console every time I wanted to convert a DVD to either XviD or the much better H.264 format. I found my scripts very useful to me, so i thought to host them on SourceForge so other people can use them too
  #19 (permalink)  
Old 26-Mar-2007, 16:01
oldcpu
Guest
 
Posts: n/a
Default

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.
  #20 (permalink)  
Old 29-Mar-2007, 06:09
sodsm live
Guest
 
Posts: n/a
Default

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.


 
Page 2 of 4 1 2 34

Bookmarks

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2