Paulo Barretto
Paulo Barretto

Reputation: 175

How to save frame from VOB with correct size?

I am saving single frames from a vob file with ffmpeg.

ffprobe shows for my vob file:

Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 8:9 DAR 4:3], Closed Captions, 3750 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

My command line is

ffmpeg -i File1.vob -ss 10 -q:v 2 -vframes 1 -an -sn frame10s.jpg

My jpeg files are being saved with 720x480, horizontally stretched. How can I make them be saved with correct display ratio 640x480?

Upvotes: 1

Views: 137

Answers (1)

Gyan
Gyan

Reputation: 93018

Use

ffmpeg -i File1.vob -ss 10 -vf scale=iw*sar:ih,setsar=1 -q:v 2 -vframes 1 frame10s.jpg

The scaler multiples the input width by the stored pixel aspect ratio to produce a square pixel representation.

Image formats don't support audio or subtitles so disabling those isn't necessary.

Upvotes: 1

Related Questions