Hello,
I can't figure out why the following command doesn't scale the video down from 1200 pixels to 640 pixels as expected:
What am I doing wrong?Code:ffmpeg.exe -i input.mov -preset faster -t 15 -c:v libx264 -vf scale=-640:-1,lutyuv=y=val*1.30,format=pix_fmts=yuv420p -c:a aac -b:a 128k -ac 2 -ar 44100 -af "volume=0.3" -threads 2 -f mp4 output.mp4
Thank you.
---
Edit: In case I'd like to speed up the video by 50%, how should I add the setting below?
"setpts=0.5*PTS"
+ Reply to Thread
Results 1 to 11 of 11
-
Last edited by yetanotherlogin; 26th Aug 2017 at 05:54.
-
-
Yes, indeed, a typo
What about speeding it up? How should I insert "setpts=0.5*PTS" into the vf option? -
Like you separated the other filters: with a comma.
( 50% speedup would be *0.75, I think.) -
Thank you.
--
Edit: Appartently, speeding up a video isn't as simple as adding "setpts=0.5*PTS" to the "-vf" switch: The video stops halfway through while the audio keeps going
--
Edit: This doesn't work. The video is neither scaled down to 720:whatever nor sped up"
Code:ffmpeg -i input.mp4 -filter_complex "scale=720:404;[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -c:a aac -b:a 128k -ac 2 -ar 44100 -threads 2 -f mp4 output.mp4
Last edited by yetanotherlogin; 25th Aug 2017 at 15:53.
-
The work-around is to run the command twice:
Code:ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -f mp4 output.sped.up.mp4 ffmpeg -i output.sped.up.mp4 -vf "scale=720:404" -crf 18 -f mp4 output.sped.up.resized.mp4
-
Of course you can add scale... bellow is example (without PTS manipulation but this should not be a problem).
Code:-vf "eq=contrast=256/220:brightness=1/512:saturation=256/224:gamma=16/16,scale=640:-4:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:sws_dither=0:in_range=1:out_range=1,hqdn3d=8,tblend=all_mode=average,smartblur=lr=1.75:ls=-0.50:lt=-5.5:cr=0.5:cs=1.0:ct=0.5,minterpolate=fps=25:mi_mode=mci:me_mode=bidir:me=ntss:vsbmc=1,xbr=2,scale=s=320x256:force_original_aspect_ratio=decrease:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:sws_dither=2:in_range=1:out_range=1,format=pix_fmts=yuv420p"
-
The problem is that speeding up video+audio requires a complex filter:
Code:ffmpeg -i input.mp4 -vf "scale=640:-1,format=pix_fmts=yuv420p" -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output.mp4 Filtergraph 'scale=640:-1,format=pix_fmts=yuv420p' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph. -vf/-af/-filter and -filter_complex cannot be used together for the same stream.
-
works for me...
Code:@set OUTDIR="out" @if not exist %OUTDIR% (mkdir %OUTDIR%) @ffmpeg -i "%1" -vf "scale=720:404,setpts=0.5*PTS" -af "atempo=2.0" -c:a pcm_s16le -c:v huffyuv -f matroska "%OUTDIR%\output.sped.up.mkv"
-
Similar Threads
-
Simple software powered by FFmpeg to combine audio and video track
By adelta in forum Video ConversionReplies: 3Last Post: 24th Jun 2017, 11:23 -
ffmpeg - How to combine two Filters ... Black Bands and DVB Subtitles
By mapg in forum Newbie / General discussionsReplies: 4Last Post: 27th Jul 2015, 12:18 -
xmedia Recode - Combine multiple videos?
By TYLER08027 in forum Video ConversionReplies: 3Last Post: 20th Apr 2015, 17:55 -
FFMPEG - How to record multiple RTMP streams into multiple files
By wwwmaster2k in forum Capturing and VCRReplies: 1Last Post: 11th Jul 2014, 12:51 -
[ffmpeg] Right way to combine PNG + MP3 into an MP4 file?
By yetanotherlogin in forum EditingReplies: 3Last Post: 8th Dec 2013, 04:49