stream output aspect ratio

About encoding, codec settings, muxers and filter usage
theC
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Sep 2008 14:28

stream output aspect ratio

Postby theC » 03 Sep 2008 14:38

Hello,
I've some videos with an aspect-ratio of 16:9. I would like to transcode them to 4:3, so that there is a black area on top and bottom of the video.
I've allready tried many command line arguments but it was never the solution.
Could someone help me?

I'm using Windows Vista Ultimate and vlc 0.8.6i.
The input file is and XVID Video with mpga Audio.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: stream output aspect ratio

Postby dionoea » 03 Sep 2008 15:09

You need to use transcode's canvas option. See the output from "vlc.exe -H --advanced --help-verbose" for information about those options (will be saved to vlc-help.txt)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

theC
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Sep 2008 14:28

Re: stream output aspect ratio

Postby theC » 03 Sep 2008 15:52

canvas-aspect i've allready tried but vlc just opens a new console window wich says that the command line options couldn't be loaded (if i use ti like --canvas-aspect="4:3"). If I use :canvas-aspect="4:3" the option are accepted but not working.
where is vlc-help.txt saved?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: stream output aspect ratio

Postby dionoea » 03 Sep 2008 18:05

vlc-help.txt should be saved in the current directory.

What you need is something like this:

Code: Select all

vlc blabla...blabla --sout '#transcode{vcodec=something,vb=somethingelse,canvas-height=300,canvas-width=400,canvas-aspect=4:3}:...
I hope that helps. (Note that the canvas syntax is different if you're using 0.9.0 or later. See 0.9.* NEWS file for more details)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

theC
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Sep 2008 14:28

Re: stream output aspect ratio

Postby theC » 04 Sep 2008 10:04

Thank you,
now it works. I used canvas without the height and width settings. Now erverything works fine.

theC
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Sep 2008 14:28

Re: stream output aspect ratio

Postby theC » 18 Sep 2008 04:37

I've Downloaded the new vlc 0.9.2
Now I've some problems again.

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc.exe" file1.avi :sout="#transcode{vcodec=mpgv,scale=1,acodec=mpga,channels=2,canvas-width=576,canvas-height=432,canvas-aspect=4:3}:duplicate{dst=std{access=file,dst=file2.mpg}} :sout-transcode-width=576 :sout-transcode-height=432 :sout-transcode-fps=30
This produces a video with height=432 but with larger width then 576. If I use the command without :sout-transcode-height=432 the width is 576 but height is smaller then 432. Both videos are 16:9 but should be 4:3.
With the old Version 0.8.6i it worked, I used the same arguments, I just changed "standard" to "duplicate{dst=std".

Something else: I found a bug. If I use C:\"Program Files"\ViedoLAN\VLC\vlc.exe (worked with 0.8.6i) it interprets Files"\VideoLAN\VLC\vlc.exe as first argument. Throws an not playable error.

Edit: changed mpga to mp3. mpga will produce output file without hearable audio but with audio track.

Edit: I changed now canvas options in vfilter=canvas{width=576.... and tried vfilter=croppadd{paddtop=60... -> both didn't work.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: stream output aspect ratio

Postby dionoea » 18 Sep 2008 17:49

Using vfilter=canvas{width=something,height=something,aspect-ratio=something} should definitively work. Just make sure that you don't specify a transcode width and height. If that still doesn't work, please paste the new command line you're trying.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

theC
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Sep 2008 14:28

Re: stream output aspect ratio

Postby theC » 19 Sep 2008 02:06

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc.exe" file1.avi :sout="#transcode{vcodec=mpgv,scale=1,acodec=mpga,channels=2,vfilter=canvas{width=576,height=432,[b]aspect-ratio[/b]=4:3}}:duplicate{dst=std{access=file,dst=file2.mpg}} :sout-transcode-fps=30

Code: Select all

"C:\Program Files\VideoLAN\VLC\vlc.exe" file1.avi :sout="#transcode{vcodec=mpgv,scale=1,acodec=mpga,channels=2,vfilter=canvas{width=576,height=432,[b]aspect[/b]=4:3}}:duplicate{dst=std{access=file,dst=file2.mpg}} :sout-transcode-fps=30
Both don't work. The ouput file is too wide for the showed height, it's the same like vfilter=corppadd{paddtop=integer,paddbottom=integer}.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: stream output aspect ratio

Postby dionoea » 19 Sep 2008 02:46

Looks like canvas is messed up somehow. I'll investigate and try and fix it for 0.9.3 (should be out in a few days/week to fix the first big bugs)
Please post in this topic in a few days if you haven't heard anything new from me (in case I forget).

Cheers,
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

nereikianieko
Blank Cone
Blank Cone
Posts: 27
Joined: 24 May 2008 17:51

Re: stream output aspect ratio

Postby nereikianieko » 05 Oct 2009 23:44

Is this solved? Seems like problem remains in 1.0.2

nereikianieko
Blank Cone
Blank Cone
Posts: 27
Joined: 24 May 2008 17:51

Re: stream output aspect ratio

Postby nereikianieko » 08 Oct 2009 15:18

bump bump bump

abs302
New Cone
New Cone
Posts: 1
Joined: 28 Jun 2010 14:55

Re: stream output aspect ratio

Postby abs302 » 28 Jun 2010 14:58

My script works fine so: vlc --ttl=64 .... --sout "#transcode{vcodec=mpgv,vb=3500,fps=25,acodec=mpga,ab=128,channels=2,deinterlace,vfilter=canvas{no-padd,height=576,width=720,aspect=4:3}}:std{access=udp,mux=ts,dst=...}"


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 14 guests