Skip to content

Instantly share code, notes, and snippets.

@ChechoCZ
Created July 13, 2020 19:11
Show Gist options
  • Save ChechoCZ/b344c62883226ba93356360a71f6440d to your computer and use it in GitHub Desktop.
Save ChechoCZ/b344c62883226ba93356360a71f6440d to your computer and use it in GitHub Desktop.
FFMPEG command to create chunks
ffmpeg -i "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8" -filter_complex "[0:v:2]trim=0:2,setpts=PTS-STARTPTS[v0]; [0:a:2]atrim=0:2,asetpts=PTS-STARTPTS[a0]; [0:v:2]trim=4:6,setpts=PTS-STARTPTS[v1]; [0:a:2]atrim=4:6,asetpts=PTS-STARTPTS[a1]; [0:v:2]trim=8:10,setpts=PTS-STARTPTS[v2]; [0:a:2]atrim=8:10,asetpts=PTS-STARTPTS[a2]; [v0][v1][v2] concat=n=3:v=1:a=0 [outv]; [a0][a1][a2] concat=n=3:v=0:a=1[outa]" -map "[outv]" -map "[outa]" output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment