Timeline for Resizing videos with ffmpeg/avconv to fit into static sized player
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 21, 2016 at 6:34 | comment | added | Nisarg | @slhck Please check this | |
Oct 20, 2016 at 6:08 | comment | added | Nisarg | @slhck Hey, I am trying in android but it doesn't seem to be working,can you help me with it !!! ffmpeg -i input.mp4 -filter:v scale=640*min(700/640,400/360):360*min(700/640,400/360),pad=700:400:(700-640*min(700/640,400/360))/2:(400-360*min(700/640,400/360))/2 output.mp4 | |
Nov 20, 2015 at 16:26 | comment | added | schieferstapel | Thanks for the starting point! However, to get a proper aspect ratio for videos with a sample aspect ratio != 1, every occurance of "iw" needs to be multiplied by "sar", so replacing EVERY occurance of "iw" with "(sar*iw)" in the filter expression works for me. | |
Feb 9, 2015 at 21:06 | comment | added | slhck |
@jdi This won't work if you are downscaling, because it'll result in negative values for ow-iw .
|
|
Dec 18, 2014 at 1:19 | comment | added | jdi |
You could shorten the pad filter to this, I think: pad=$width:$height:(ow-iw)/2:(oh-ih)/2"
|
|
Feb 6, 2013 at 18:08 | comment | added | llogan |
@JamieTaylor Consider adding -movflags +faststart to slhck's example. It will allow your progressively downloaded video to begin playback before it is completely downloaded, and also see the FFmpeg and x264 Encoding Guide and FFmpeg and AAC Encoding Guide for more encoding instructions and examples.
|
|
Feb 6, 2013 at 15:08 | history | edited | slhck | CC BY-SA 3.0 |
added 970 characters in body
|
Feb 6, 2013 at 14:51 | vote | accept | Jamie Taylor | ||
Nov 7, 2016 at 15:54 | |||||
Feb 6, 2013 at 14:36 | history | answered | slhck | CC BY-SA 3.0 |