Aspect ratio won't work with transcode

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
tenbob
Blank Cone
Blank Cone
Posts: 11
Joined: 03 May 2010 00:43

Aspect ratio won't work with transcode

Postby tenbob » 04 May 2010 17:27

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Aspect ratio won't work with transcode

Postby Jean-Baptiste Kempf » 05 May 2010 00:44

put aspect-ratio inside the transcode.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

tenbob
Blank Cone
Blank Cone
Posts: 11
Joined: 03 May 2010 00:43

Re: Aspect ratio won't work with transcode

Postby tenbob » 05 May 2010 05:26

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


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests