Convert: Unterschied zwischen den Versionen

Aus SchnallIchNet
Wechseln zu: Navigation, Suche
Zeile 80: Zeile 80:
  
 
  mencoder vcd://2 -o "New.avi" -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000
 
  mencoder vcd://2 -o "New.avi" -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000
 +
 +
=== dvd2avi ===
 +
 +
to do this you will have to run the following command-tripple:
 +
 +
# get the black border dimensions to cut them off
 +
# run pass 1 with mencoder to create the 'divx2pass.log', which is needed by pass 2 run
 +
# run pass 2
 +
 +
1)
 +
 +
play TRACK 1 (dvd://1), chapter 3
 +
 +
mplayer dvd://1 -chapter 3 -vf cropdetect
 +
...
 +
[CROP] Crop area: X: 0..719  Y: 70..505  (-vf crop=720:432:0:72).0
 +
...
 +
 +
2)
 +
do the 1st pass with mencoder<br/>
 +
set '''-vf crop=''' to the value mplayer puts out to console <br/>
 +
while running the 1st command
 +
 +
mencoder dvd://1 -vf crop=720:432:0:72,scale=704:304 -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=658:pass=1
 +
  -oac copy -o /dev/null
 +
 +
* scale=704:304 ==> nice for 16:9<br/>if you change that, be sure the values both are dividable by 16!!
 +
 +
3)
 +
 +
2nd pass run...<br/>
 +
be sure the divx2pass.log file is in CWD where you start mencoder...
 +
 +
mencoder dvd://1 -vf crop=720:416:0:80,scale=704:304 -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=658:pass=2
 +
  -alang de -oac mp3lame -lameopts br=96:cbr:vol=6 -o FILM.avi
  
  

Version vom 27. September 2011, 13:02 Uhr

Source: VIA

Converting Files with Linux September 21st, 2011 No Comments

The following tipps work under a linux terminal:


Image Files

If you want to change image files via terminal, ImageMagick is a good choice.


Resize Images to a maximum resolution

convert "YourOldPicture.jpg" -resize 1600x1600 "YourNewPicture.jpg"


Create a Black-and-white picture and compress it

djpeg "YourOldPicture.jpg" | ppmtopgm | cjpeg -qual 70 >"YourNewPicture.jpg"


Rename Pictures

rename -n ’s/\.jpg$/\.JPG/’ *.jpg


Audio Files

Normalize Audio

Give all mp3 songs the same sound level (it’s called Audio normalization)

mp3gain -a *.mp3


Merge mp3 audio files to one

mp3wrap merged.mp3 one.mp3 two.mp3


wav2mp3

Convert all *.wav-files in one folder two *.mp3-files and remove the *.wav-files

for i in *.wav;do lame "$i" "${i%wav}mp3"; rm "$i"; done


Video Files

For quite a lot purposes is the command line tool FFmpeg with its lots of options a good choice. For others might MEncoder be better. You might also want to install some codecs first:

sudo apt-get install libavcodec-extra-52 libavdevice-extra-52 libavformat-extra-52 libavutil-extra-50 \
                     libpostproc-extra-51 libswscale-extra-0 libavcodec-unstripped-52 ubuntu-restricted-extras


Merge many video files to one

cat One.mpg Two.mpg Three.mpg | ffmpeg -f mpeg -i - -vcodec copy -acodec copy "Merged.mpg"


avi2mpg

ffmpeg -i "Original.avi" "New.mpg"


mp42mpg

ffmpeg -i "Original.mp4" -target ntsc-vcd "New.mpg"


mod2avi

?


vcd2avi

mencoder vcd://2 -o "New.avi" -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000

dvd2avi

to do this you will have to run the following command-tripple:

  1. get the black border dimensions to cut them off
  2. run pass 1 with mencoder to create the 'divx2pass.log', which is needed by pass 2 run
  3. run pass 2

1)

play TRACK 1 (dvd://1), chapter 3

mplayer dvd://1 -chapter 3 -vf cropdetect
...
[CROP] Crop area: X: 0..719  Y: 70..505  (-vf crop=720:432:0:72).0
...

2) do the 1st pass with mencoder
set -vf crop= to the value mplayer puts out to console
while running the 1st command

mencoder dvd://1 -vf crop=720:432:0:72,scale=704:304 -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=658:pass=1 
 -oac copy -o /dev/null
  • scale=704:304 ==> nice for 16:9
    if you change that, be sure the values both are dividable by 16!!

3)

2nd pass run...
be sure the divx2pass.log file is in CWD where you start mencoder...

mencoder dvd://1 -vf crop=720:416:0:80,scale=704:304 -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=658:pass=2 
 -alang de -oac mp3lame -lameopts br=96:cbr:vol=6 -o FILM.avi


ogv2avi

mencoder "Original.ogv" -ovc xvid -oac mp3lame -xvidencopts pass=1 -o "New.avi"

wmv2mpg

aspect=16/9 should eventually be changed to 4/3 or other aspects

mencoder -of avi -ofps 25 \
 -oac mp3lame -lameopts cbr:br=112:aq=3:mode=0:vol=0 \
 -vf hqdn3d,softskip,harddup \
 -ovc xvid \
 -xvidencopts bitrate=501:max_key_interval=37:aspect=16/9:turbo:nochroma_me:notrellis:max_bframes=0:vhq=0 \
 Original.wmv \
 -o New.avi

mkv2avi

mencoder "Original.mkv" -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=6000 -oac mp3lame -lameopts vbr=3 -o "New.avi"