I am using FFmpeg to convert a video from one format to another. I need to extract the aspect ratio of the video first. How can I find that information?
相关问题
- Improving accuracy of Google Cloud Speech API
- MP4 codec support in Chromium
- Streaming video (C# using FFmpeg AutoGen) sends mu
- How do I decode opus file to pcm file using libavc
- ffmpeg for Android: neon build has text relocation
相关文章
- Handling ffmpeg library interface change when upgr
- How to use a framework build of Python with Anacon
- c++ mp3 library [closed]
- Passing a native fd int to FFMPEG from openable UR
- FFmpeg - What does non monotonically increasing dt
- ffmpeg run from shell runs properly, but does not
- Issues in executing FFmpeg command in Java code in
- Terminal text becomes invisible after terminating
Just run
and details about the video stream/s contained in the file will be printed to the screen. Two of the parameters listed for each video stream will be the PAR (Pixel Aspect Ratio) and DAR(Display Aspect Ratio). You'll see something like this:
The DAR is what ratio the final displayed video will have. The PAR indicates how the pixels have to be sized to achieve this. For example, in the case I just showed,
(720*64)/(576*45) = 16/9
.Many times, PAR will be equal to 1:1, which means that the DAR should be equal to the ratio of the video resolution.
ffprobe is preferable for getting media information. When using ffmpeg -i file and no other arguments, ffmpeg returns an error status.