Hi, i'm trying to create a screenshot from a video, at the resolution the video is encoded at, however when taking the screenshot, it appears to ignore the Aspect ratios, so that the screenshot appears stretched slightly (I believe because the pixel shape is stretched?. is there any way to compensate for this within the ffmpeg command (ideally in a manner that's not specific to each individual video)?
The command i'm using is:
And the video's properties are:Code:fffmpeg -ss 00:10:00 -t 1 -i Video.ts -f mjpeg 101.jpg
The aspect ratio of the screenshot I want is 4:3, when taking a screenshot with VLC (which gives me the correct aspect ratio) the resolution is: 720x540, yet the screenshot i'm getting from ffmpeg is 720x480Code:Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Just to clarify, this is for a script, so I can't know the fixed (720x540 in this case) resolution as I could be taking screenshots from a variety of videos, so the solution can't involve specifying the fixed resolution by hand, i'd need to calcuate it using the resolution reported by FFMPEG.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
Last edited by bergqvistjl; 12th Aug 2014 at 12:07.
-
Technically, the proper way of scaling is the width only. So a 720x480 4:3 DVD would scale to 640x480, not 720x540. When you have interlaced sources, vertical scaling can be very tricky (you can use il flag in ffmpeg, but there are no restrictions to horizontal scaling of interlaced material)
Code:-vf scale=w=(sar*iw):h=ih
-
Because it's doing "incorrectly." That the choice some players make. MPCHC does it that way as well. Potplayer/kmplayer will give 640x480, Quicktime as well
Eitherway the AR is the same 640/480 = 4:3 , 720/540 = 4:3 , so in either case AR is correct. But 640w : 480h is technically "more correct" from its NTSC roots, and because of the possible interlaced issue