Jay Taylor's notes
back to listing indexffmpeg - Correct aspect ratio without re-encoding video file - Super User
[web search]$h
- resolution heightx
- aspect ratio widthy
- aspect ratio height
Notes:
If you put
-aspect x:y
without-vf scale=$w:$h
, the output will only have the change on display aspect ratio.If you put
-vf scale=$w:$h
without-aspect x:y
, the output will only have the change on the resolution.The command
-vf scale=$w:-1
orscale=-1:$h
will not always provide the expected output so to make sure you get both change on resolution and aspect ratio, you can just use the above command line.
** I only tried this with input.mkv and output.mkv files since this is only what I am working on at the moment. Feel free to try this with the other file types.
ffmpeg 4.3.2 -bsf:v h264_metadata=sample_aspect_ratio=x/y
gives an error on DNxHR coded Quicktime files while MP4Box writes a second line of PAR into the metadata.
Width : 720 pixels Height : 540 pixels Display aspect ratio : 16:9 Original display aspect ratio : 4:3
I tested multiple players and even an NLE and so far all display the correct aspect ratio.
Your Answer
Not the answer you're looking for? Browse other questions tagged or ask your own question.
- Featured on Meta
-
- Hot Meta Posts
-
15
-
3
Related
Hot Network Questions
- Geometry question about a six-pack of beer
- Can front gear be replaced on a Retrospec Judd folding bicycle?
- Viewport Shader Render different from 1 computer to another
- Do known physical systems all have a unique time evolution?
- Was Paul's Washing in Acts 9:18 a Ritual Purification Rather Than a Christian Baptism?
- Cleaning chain a few links at a time
- Are there examples of triple entendres in English?
- SMTP Header confusion - Delivered-To: and To: are different
- Why is it 'capacité d'observation' (without article) but 'sens de l'observation' (with article)?
- Different outdir directories in one Quantum ESPRESSO run
- Is it better to show fake sympathy to maintain a good atmosphere?
- Rear shifter cable wont stay in anything but the highest gear
- A chess engine in Java: generating white pawn moves - take II
- Is it unfair to retroactively excuse a student for absences?
- Is the zero vector necessary to do quantum mechanics?
- Does it matter if a fuse is on a positive or negative voltage?
- Why we use trace-class operators and bounded operators in quantum mechanics?
- What does ‘a grade-hog’ mean?
- Can I get a refund for ICE due to cancelled regional bus service?
- Sangaku problem involving eight circles
- Navigation on Mars without Martian GPS
- Is there any legal justification for content on the web without an explicit licence being freeware?
- Were there engineers in airship nacelles, and why were they there?
- Correlation for Small Dataset?