Page 1 of 1

Aspect ratio won't work with transcode

Posted: 04 May 2010 17:27
by tenbob
After some problems with the command line on Windows I'm finally ready to start transcoding. But I can't get the aspect-ratio option to work.

I have some files that are badly encoded with the wrong AR. If I play them in VLC the picture is all squashed. It's easy to change this in the GUI. Select 16:9 and the picture is perfect. So I want to transcode them to the correct aspect ratio. But it's impossible.

From the command line I can get the file to play on the screen in the correct AR using

Code: Select all

vlc vts_01_0.vob --aspect-ratio "16:9"
But whatever I do I can't get it to transcode to the correct AR. I thought a command like this would work.

Code: Select all

vlc "vts_01_0.vob" --aspect-ratio "16:9" --sout "#transcode{vcodec=mp2v}:std{access=file,mux=ps,dst="vlcfile.mpg"}"
It doesn't work. The aspect ratio of the output file is still wrong.

I then tried duplicate so I could observe what was happening

Code: Select all

vlc "vts_01_0.vob" --aspect-ratio "16:9" --sout "#transcode{vcodec=mp2v}:duplicate{dst=std{access=file,mux=ps,dst="vlcfile.mpg"},dst=display}"
This produces the *correct* AR on the screen, but the *wrong* AR in the output file.

I read somewhere that it may be a bug in the current version. So I downloaded 1.2.0-git-20100502 ... etc, but it was no better.

Can anyone suggest how to do this.

Re: Aspect ratio won't work with transcode

Posted: 05 May 2010 00:44
by Jean-Baptiste Kempf
put aspect-ratio inside the transcode.

Re: Aspect ratio won't work with transcode

Posted: 05 May 2010 05:26
by tenbob
Hi j-b. I don't know the correct syntax to include the aspect ratio inside the transcode. I tried this but it didn't work.

Code: Select all

vlc "vts_01_0.vob" --sout "#transcode{vcodec=mp2v,aspect-ratio=16:9}:std{access=file,mux=ps,dst="vlcfile.mpg"}"
This gave an error in the message window as follows.

Code: Select all

main warning: option aspect-ratio is unknown
Since then I have tried using the canvas filter like this

Code: Select all

vlc "vts_01_0.vob" --sout "#transcode{vcodec=mp2v,vb=4096,vfilter=canvas{width=720,height=576,aspect=16:9}}:std{access=file,mux=ps,dst="vlcfile.mpg"}"
This is now giving me the correct aspect ratio. !!!!

But it is producing a lot of other errors. During transcoding the time jumps very jerkily and the output file is incomplete. I get many errors like this in the message window. The input file plays properly apart from having the wrong aspect ratio.

Code: Select all

avcodec warning: almost fed libavcodec with a frame in the past (current: 8437408078, last: 8449118567) avcodec warning: almost fed libavcodec with a frame in the past (current: 8437448078, last: 8449118567)
Can you tell me what is wrong now. I'm sorry to ask so many questions. It would not be necessary if the documentation was easier to understand.

Thanks, Bob