Log in

View Full Version : Aspect ratio in avi file


Dawnman
23rd March 2008, 10:12
Hi People

I am trying to back up some Morse but the aspect ratio comes out wrong.

My script works fine for everything else. Is there a way to write the ratio in a avi header without having to encode again?

here is my script

#!/bin/bash

# remove old log

rm divx2pass.log

# Takes the input file $1 first then the cropping numbers $2 $3 $4 $5.
# audio id aid $6.

main="-aid $6 -mc 0 -vf crop=$2:$3:$4:$5 $1.vob -ovc lavc -oac mp3lame -lavcopts vcodec=mpeg4:vbitrate=1000:mbd=2:trell:v4mv:last_pred=2:dia=-1:vmax_b_frames=2:vb_strategy=1:cmp=3:subcmp=3: precmp=0:vqcomp=0.6:turbo:autoaspect:vlelim=-4:vcelim=9:vpass="

optionsP1="1 -o /dev/null"

optionsP2="2 -o $1.avi"


mencoder $main$optionsP1 && mencoder $main$optionsP2

exit

The command line reads mpeg4options Fat.Chance 688 560 16 10 128

I got the cropping figures from mplayer -vf cropdetect

The sound is also out but I have solved this with avisync.

:thanks:

p.s. I have played it back using mplayer -aspect 4:3 but would like it so I didn't have to alter the command line.

I have been experimenting and found the audio sync problem goes away if I let mencoder skip frames i.e. take out -mc 0

smok3
23rd March 2008, 20:28
try
http://forums.suselinuxsupport.de/index.php?showtopic=57784

Dawnman
23rd March 2008, 22:22
try
http://forums.suselinuxsupport.de/index.php?showtopic=57784

:thanks: Smok3


That was very useful.