Directshow capture and get error aspect ratio.

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
zoro5722
New Cone
New Cone
Posts: 5
Joined: 03 Jul 2008 10:31

Directshow capture and get error aspect ratio.

Postby zoro5722 » 03 Jul 2008 10:48

I am trying to capture from a VGA capture card.

Here's my command line:

vlc dshow:// :dshow-size="1280x720" :dshow-fps=25.000000 :sout=#transcode{vcodec=mp4v,vb=2048,scale=1,acodec=mp4a,ab=192,channels=2}:duplicate{dst=display,dst=std{access=file,mux=mp4,dst="D:\test.mp4"}}

The correct aspect ratio should be 16:9. However, it showed in 4:3 while play.

I checked the test.mp4 with GSpot and suprisly found the frame size is correct: 1280x720, but display ratio is 4:3. How could I fix it?

GSpot give the following check result:
pic size: 1280x720
storage aspect ratio: 16:9
pixel aspect ratio: 3:4
display aspect ratio: 4:3

zoro5722
New Cone
New Cone
Posts: 5
Joined: 03 Jul 2008 10:31

Re: Directshow capture and get error aspect ratio.

Postby zoro5722 » 03 Jul 2008 11:10

I tried several parameters and still failed to fix it.

Add --sout-transcode-canvas-aspect=16:9 Same error aspect ratio
Add --sout-transcode-canvas-width -height -aspect Aspect is correct but the pic looks like being cropped to 4:3 and then pad to 16:9

zoro5722
New Cone
New Cone
Posts: 5
Joined: 03 Jul 2008 10:31

Re: Directshow capture and get error aspect ratio.

Postby zoro5722 » 04 Jul 2008 06:22

I retried with -vvv. I found these in debug messages.

Code: Select all

stream_out_transcode debug: decoder aspect is 576000:432000 stream_out_transcode debug: source pixel aspect is 0.750000:1 stream_out_transcode debug: scaled pixel aspect is 0.750000:1 stream_out_transcode debug: source 1280x720, crop 1280x720, destination 1280x720, padding 1280x720 stream_out_transcode debug: encoder aspect is 576000:432000 main debug: looking for encoder module: 10 candidates
As I said in the last post, GSpoted report the result file
source aspect 16:9
pixel aspect 3:4(==0.75)
display aspect 4:3( == source aspect * pixel aspect )

So I guess the error came from the error "source pixel aspect"

But how could I control the pixel aspect ratio? Many thanks in advance!


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 70 guests