1

I am using ffmpeg to first trim and crop the video, then take the output and concatenate a reverse of that onto the video. The way I'm doing it now requires me to run two commands. Is there a way to simplify it into a single command?

Currently, I'm running ffmpeg -i MVI_0289.mov -ss 00:00:10.50 -t 3 -vf "crop=720:720:600:80" -movflags +faststart -an OUTPUT.mp4

and then ffmpeg -i OUTPUT.mp4 -filter_complex "[0:v]reverse,fifo[r];[0:v][r] concat=n=2:v=1 [v]" -map "[v]" OUTPUT2.mp4

Update#1: Running ffmpeg -ss 00:00:10.50 -t 3 -i MVI_0289.mov -filter_complex "reverse,fifo[r];[0:v][r] concat=n=2:v=1,crop=720:720:600:80[v]" -map "[v]" OUTPUT2.mp4 gives the following error: ffmpeg -ss 00:00:10.50 -t 3 -i MVI_0289.mov ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.38) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MVI_0289.mov': Metadata: major_brand : qt
minor_version : 537331968 compatible_brands: qt CAEP com.apple.quicktime.make: Canon com.apple.quicktime.model: Canon EOS 70D com.apple.quicktime.rating.user: 0.000000 creation_time : 2017-12-09T23:42:21.000000Z Duration: 00:00:19.19, start: 0.000000, bitrate: 25320 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25277 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 48k tbc (default) Metadata: creation_time : 2017-12-09T23:42:21.000000Z timecode : 00:16:56:04 Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default) Metadata: creation_time : 2017-12-09T23:42:21.000000Z timecode : 00:16:56:04 At least one output file must be specified -filter_complex "reverse,fifo[r];[0:v][r] concat=n=2:v=1,crop=720:720:600:80[v]" -map "[v]" OUTPUT2.mp4 -bash: -filter_complex: command not found

1

Run

ffmpeg -ss 00:00:10.50 -t 3 -i MVI_0289.mov -filter_complex "reverse,fifo[r];[0:v][r] concat=n=2:v=1,crop=720:720:600:80[v]" -map "[v]" OUTPUT2.mp4
  • I get an error At least one output file must be specified and then -bash: -vf: command not found. – smartbean Dec 15 '17 at 20:34
  • @smartbean Change -vf to -filter_complex. If that doesn't work show your full command and the complete console output. – llogan Dec 15 '17 at 21:45
  • @LordNeckbeard That did not work either. Please see update to the question. – smartbean Dec 16 '17 at 1:41
  • @smartbean You were actually splitting the command in half and trying to run each half independently. The linebreak was for readability and should be removed before executing the command. Try the updated command. – llogan Dec 16 '17 at 3:42
  • Oops, forgot to change the -vf in the original. – Gyan Dec 16 '17 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.