Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
c3tracker:repair [2019/07/03 17:23] – [Cur the last second off a recording] bjoern | c3tracker:repair [2025/09/14 12:38] (current) – v0tti | ||
---|---|---|---|
Line 21: | Line 21: | ||
Zum Reparieren der Timestamps wird das vorhandene, aber " | Zum Reparieren der Timestamps wird das vorhandene, aber " | ||
- | ffmpeg -i / | + | ffmpeg -i /video/fuse/ |
Anschließend mit dem Reparaturprozess (nächster Abschnitt) fortfahren. | Anschließend mit dem Reparaturprozess (nächster Abschnitt) fortfahren. | ||
Line 29: | Line 29: | ||
Das reparierte Material wird im gleichen Format wie das Capture zur Verfügung gestellt, also MPEG2-TS mit 4 Audiospuren etc.pp. Dabei wird im Prozess zwar noch vor dem Schnitt eingesetzt, ein Abstecken mit KDEnlive erfolgt aber **nicht** nochmal. Das Material sollte also bereits zugeschnitten sein (siehe auch nächster Abschnitt). Allerdings darf das ersetzte Material **nicht** bereits Intro oder Outro beinhalten, da dies beim Encoding angefügt wird. | Das reparierte Material wird im gleichen Format wie das Capture zur Verfügung gestellt, also MPEG2-TS mit 4 Audiospuren etc.pp. Dabei wird im Prozess zwar noch vor dem Schnitt eingesetzt, ein Abstecken mit KDEnlive erfolgt aber **nicht** nochmal. Das Material sollte also bereits zugeschnitten sein (siehe auch nächster Abschnitt). Allerdings darf das ersetzte Material **nicht** bereits Intro oder Outro beinhalten, da dies beim Encoding angefügt wird. | ||
- | Die Vorgehensweise wird vom Tracker etwas unterstützt. Das Material ist als handelsübliche Videodatei (z.B. MPEG2-TS, h264 mp4) im Verzeichnis '' | + | Die Vorgehensweise wird vom Tracker etwas unterstützt. Das Material ist als handelsübliche Videodatei (z.B. MPEG2-TS, h264 mp4) im Verzeichnis '' |
Direkt im Anschluss kann/muss das Ticket nochmal geschnitten werden, also den Cutting-Status durchlaufen. Es wird **nur** der Status im Tracker durchlaufen, | Direkt im Anschluss kann/muss das Ticket nochmal geschnitten werden, also den Cutting-Status durchlaufen. Es wird **nur** der Status im Tracker durchlaufen, | ||
Ab hier läuft dann die Pipeline ganz normal weiter. | Ab hier läuft dann die Pipeline ganz normal weiter. | ||
+ | |||
+ | Wenn es einen Fuse/ | ||
+ | |||
+ | === Camera backup Audio stereo to 2x stereo | ||
+ | |||
+ | Soll der Kameraton benutzt werden liegt dieser meist als L: original R: translation vor. Das muss im repair.ts auf 2 stereo streams geaendert werden das sollte mit dieser zeile funktionieren: | ||
+ | < | ||
+ | ffmpeg -i repair_rl.ts -filter_complex " | ||
+ | </ | ||
+ | |||
+ | === Hints for simple .ts repairs with ffmpeg | ||
+ | |||
+ | For basic repairs (for example, removing sections from the middle of a recording), you can use '' | ||
+ | |||
+ | First, determine the start and end timestamps of the sections you want to keep, relative to '' | ||
+ | |||
+ | < | ||
+ | ffmpeg -i uncut.ts -ss 00:02:46.20 -to 00:17:25.18 -map 0 -c copy part1.ts | ||
+ | ffmpeg -i uncut.ts -ss 00:19:12.12 -to 00:52:27.23 -map 0 -c copy part2.ts | ||
+ | </ | ||
+ | |||
+ | After that, you can easily combine the parts with '' | ||
+ | |||
+ | < | ||
+ | cat part1.ts part2.ts > combined.ts | ||
+ | </ | ||
+ | |||
+ | Finally, repair the timestamps with '' | ||
+ | |||
+ | < | ||
+ | ffmpeg -i combined.ts -c copy -map 0 repair.ts | ||
+ | </ | ||
+ | |||
+ | Place this file in the repair directory of your current event and follow the steps as described above. With this method, there is no need to use KDEnlive or Shotcut for cutting anymore. | ||
+ | |||
== Hints for repairing / manual cutting with KDEnlive | == Hints for repairing / manual cutting with KDEnlive | ||
Line 48: | Line 83: | ||
**Achtung** da die Software " | **Achtung** da die Software " | ||
- | === Convert to TS | + | |
+ | === Lokal schneiden, remote rendern | ||
+ | |||
+ | Dafür muss auf dem Encoder (oder der Server auf dem gerendert wird), muss melt installiert werden: `sudo apt install melt`. Beim Schneiden mit KDEnvlive sollten die Quelldateien schon an gleicher stelle wie auf dem Encoder liegen. | ||
+ | |||
+ | Wenn man fertig ist im KDEnlive auf rendern klicken, das Profil `VOC H.264 main video track with audio` auswählen, den richtigen Exportpfad setzen und auf `Generate Script` klicken. Jetzt sollte in `$HOME/ | ||
+ | |||
+ | == Convert to TS | ||
(Not necessary for repairing) | (Not necessary for repairing) | ||
Line 63: | Line 105: | ||
</ | </ | ||
- | === remux TS file | + | === Convert intro without audio to ts |
+ | Input can be any file that can be read by ffmpeg. The intro needs a audio track in order to be compatible with the tracker pipeline. | ||
+ | |||
+ | < | ||
+ | ffmpeg -loop 1 -i 123.mp4 -ar 48000 -ac 1 -f s16le -i /dev/zero -ar 48000 -ac 1 -f s16le -i /dev/zero -ar 48000 -ac 1 -f s16le -i /dev/zero -ar 48000 -ac 1 -f s16le -i / | ||
+ | </ | ||
+ | |||
+ | == remux TS file | ||
< | < | ||
ffmpeg -v verbose -y \ | ffmpeg -v verbose -y \ | ||
Line 69: | Line 118: | ||
-c copy \ | -c copy \ | ||
-f mpegts / | -f mpegts / | ||
+ | </ | ||
+ | |||
+ | === source replacement with remapped audio streams + av-delay | ||
+ | |||
+ | < | ||
+ | ffmpeg -i / | ||
</ | </ | ||
+ | |||
+ | ==Audio Stream Reihenfolge reparieren via Jobfile.xml | ||
+ | Issue: Audio Spuren vertauscht, Translation + Main in falscher Reihenfolge | ||
+ | Ausgangslagen: | ||
+ | - Sich selbst als encoding worker zuweisen | ||
+ | - Track nach Wiki Anleitung schneiden | ||
+ | - Warten bis Recording auf finalized steht | ||
+ | - TS- HD master mp4 aufrufen | ||
+ | - Job file runterladen | ||
+ | - Audio spuren in encoding teil vom Jobfile richtig einsortieren | ||
+ | - z.B. Audiospuren 1 und 2 sind vertauscht < | ||
+ | -map ' | ||
+ | -map ' | ||
+ | - Schnittmarken + AV delay macht der Tracker automatisch | ||
+ | - auf ein einem worker anmelden und auf voc user wechseln | ||
+ | - Angepasste encoding ffmpeg Zeile aus dem Jobfile ausführen | ||
+ | - | ||
+ | |||
+ | |||
+ | |||
== Audiospur bearbeiten | == Audiospur bearbeiten | ||
Line 90: | Line 165: | ||
</ | </ | ||
+ | Weitere Audiospuren als nicht default markieren: | ||
+ | < | ||
+ | ffmpeg -i 10223-hd.mp4.orig -i / | ||
+ | </ | ||
+ | |||
+ | Manuelles AV/Delay mit ffmpeg von 200ms korrigieren: | ||
+ | < | ||
+ | ffmpeg -i 10397-hd-async.mp4 -itsoffset 0.200 -i 10397-hd-async.mp4 -c copy -map 0:v:0 -map 0:v:1 -map 1:a:0 -map_metadata 0 10397-hd.mp4 | ||
+ | </ | ||
== Copyright aus audio mit hilfe von YouTube entfernen | == Copyright aus audio mit hilfe von YouTube entfernen | ||
Line 134: | Line 218: | ||
Now place a '' | Now place a '' | ||
- | == Cur the last second off a recording | + | == Cut the last second off a recording |
When the outro has additional frames (bacause of a non empty output folder after a --debug run) the files can be shortened by downloading them from media and using the fowllowing script. | When the outro has additional frames (bacause of a non empty output folder after a --debug run) the files can be shortened by downloading them from media and using the fowllowing script. | ||
Line 141: | Line 225: | ||
#!/bin/bash | #!/bin/bash | ||
- | for video in *.mp4; do | + | EXT=" |
+ | |||
+ | for video in *${EXT}; do | ||
echo " | echo " | ||
DURATION=$(ffprobe -v quiet -print_format json -show_format $video | jq ' | DURATION=$(ffprobe -v quiet -print_format json -show_format $video | jq ' | ||
DURATIONX2=$(ffprobe -v quiet -print_format json -show_format $video | jq ' | DURATIONX2=$(ffprobe -v quiet -print_format json -show_format $video | jq ' | ||
- | VIDEONAME=$(basename $video | + | VIDEONAME=$(basename $video |
- | REPAIRNAME=repair/ | + | REPAIRNAME=repair/ |
echo "OLD: $DURATION" | echo "OLD: $DURATION" | ||
echo "NEW: ${DURATIONX2}" | echo "NEW: ${DURATIONX2}" | ||
- | echo ffmpeg -hide_banner -t $DURATIONX2 -i ${VIDEONAME}.mp4 -map 0 -c copy ${REPAIRNAME} | + | echo ffmpeg -hide_banner -t $DURATIONX2 -i ${VIDEONAME}${EXT} |
- | ffmpeg -hide_banner -t $DURATIONX2 -i ${VIDEONAME}.mp4 -map 0 -c copy ${REPAIRNAME} | + | ffmpeg -hide_banner -t $DURATIONX2 -i ${VIDEONAME}${EXT} |
done | done | ||
</ | </ | ||
+ | |||
+ | == ReLive to fusemount | ||
+ | |||
+ | If you for example screwed up a recording, it could be useful to use the ReLive-Snippets as a source for the fuse-ts. This python-script might help you. The Fahplan-ID has to be given as a argument. | ||
+ | |||
+ | < | ||
+ | import os | ||
+ | import sys | ||
+ | |||
+ | files = os.listdir('/ | ||
+ | relive_folder = '/ | ||
+ | fuse_folder = '/ | ||
+ | |||
+ | i = 0 | ||
+ | |||
+ | for file in files: | ||
+ | filename = relive_folder+sys.argv[1]+'/' | ||
+ | if filename[-3: | ||
+ | file = file.split(' | ||
+ | new_filename = relive_folder+sys.argv[1]+'/ | ||
+ | os.rename(filename, | ||
+ | i += 1 | ||
+ | |||
+ | print(" | ||
+ | </ | ||
+ | |||
+ |