ffmpeg: concat without temp files? Is it possible to concat without temp files using ffmpeg?
eg;
# nice ffmpeg -v error -f concat \
  -ss &quot;52.519&quot; -copyts -to &quot;53.153&quot; -i in.mkv \
  -ss &quot;53.186&quot; -copyts -to &quot;390.690&quot; -i in.mkv \
  -ss &quot;464.264&quot; -copyts -to &quot;2831.331&quot; -i in.mkv \
  -c copy out.mkv &lt; /dev/null
Invalid duration specification for ss: &quot;52.519&quot;

if so, what is ffmpeg version 4.2.4 complaining about?
the &quot;duration specification&quot; is valid when using temp files followed by concat.
mkvtoolnix is able to do this btw.
If I understand the question correctly: yes! You can create a file that is a concatenation of different parts of the input video.
The script you're looking for is something like:
ffmpeg \
-i &quot;$INPUT_FILE&quot; \
-filter_complex \
&quot;[0:v]trim=start=5:duration=10,setpts=PTS-STARTPTS[v0]; \
 [0:a]atrim=start=5:duration=10,asetpts=PTS-STARTPTS[a0]; \
 [0:v]trim=start=20:duration=10,setpts=PTS-STARTPTS[v1];
 [0:a]atrim=start=20:duration=10,asetpts=PTS-STARTPTS[a1]; \
 [v0][a0][v1][a1]concat=n=2:v=1:a=1[final]&quot; \
-map &quot;[final]&quot; concat-video.mp4

You can read a little bit more about this on this blog post
(Disclaimer: I'm one of the co-founder of https://mediamachine.io)
Hope this helps!