Skip to content

Instantly share code, notes, and snippets.

@Luzifer
Last active December 28, 2015 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Luzifer/672890087ecac97772d1 to your computer and use it in GitHub Desktop.
Save Luzifer/672890087ecac97772d1 to your computer and use it in GitHub Desktop.
Werbung aus einem Film schneiden mit ffmpeg

Werbung aus einem Film schneiden mit ffmpeg

Cutlist

[Cut0]
Start=584.32
Duration=1221.96
StartFrame=14608
DurationFrames=30549
[Cut1]
Start=2307.04
Duration=1334.44
StartFrame=57676
DurationFrames=33361
[Cut2]
Start=3904.76
Duration=1305.32
StartFrame=97619
DurationFrames=32633
[Cut3]
Start=5576.16
Duration=1364.92
StartFrame=139404
DurationFrames=34123
[Cut4]
Start=7352.32
Duration=442.2
StartFrame=183808
DurationFrames=11055

Video-Schnitt

# Film-Teile ohne Werbung extrahieren
$ ffmpeg -i Two_Worlds_-_Zwischen_den_Welten_15.04.06_14-30_tele5_130_TVOON_DE.mpg.HQ.avi \
  -c copy -ss 584.32 -t 1221.96 c0.avi \
  -c copy -ss 2307.04 -t 1334.44 c1.avi \
  -c copy -ss 3904.76 -t 1305.32 c2.avi \
  -c copy -ss 5576.16 -t 1364.92 c3.avi \
  -c copy -ss 7352.32 -t 442.2 c4.avi

# Liste von Filmteilen erstellen
$ ls -1 c*.avi | sed "s/^/file '/;s/\$/'/" > list.txt

# Film wieder zusammen setzen
$ ffmpeg -f concat -i list.txt \
  -c:a libvo_aacenc -b:a 160k \
  -c:v libx264 -crf 20 -x264opts level=4.1:vbv-bufsize=78125:vbv-maxrate=62500 \
  Two_Worlds_-_Zwischen_den_Welten_15.04.06_14-30_tele5_130_TVOON_DE.m4v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment