c3tracker:cutting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
c3tracker:cutting [2022/02/27 13:27] – operation:cutting renamed to c3tracker:cutting andic3tracker:cutting [2026/04/11 16:59] (current) – [mpv/Tips]: fix wiki syntax nicoo
Line 1: Line 1:
-FIXME **Diese Seite wurde noch nicht vollständig übersetzt. Bitte helfen Sie bei der Übersetzung.**\\ //(diesen Absatz entfernen, wenn die Übersetzung abgeschlossen wurde)//+= Tracker Cutting Howto
  
-Cutting Howto+When we talk about "cutting a video", we mean a highly automated process how the intro and outro get added to a recorded lecture using the [[c3tracker:start|]]. 
 +Cutting in our case bascially only consists of setting the actual start and end of the lecture. 
 +Everything else is an automated process.
  
-Preconditions: +This page is meant to describe the steps involved when everything else is already prepared
- * Kdenlive (17.x or 18.x) or Shotcut and VLC was installed on own machine +See [[projects:intro-outro-generator|]] for a way to generate intros based on a talk schedule and [[c3tracker:setup|]] for the steps to set up a new tracker project (which is usually done by the "VOC event lead/ resposible person").
- * Access to VOC VLAN or ethernet network +
-   * via DHCP or +
-   * fixed IP form [[intern:ip]] configured as secondary ethernet interface +
- * Account on http://tracker.c3voc.de (c.f. [[:c3tracker]])+
  
  
-<bootnote>//storage.lan.c3voc.de// is to be read as a meta variable for the machine, the FUSE Mounts are created by the mount-for-cut worker. Within the [[:c3tracker#decentralised_aka_no-storage|decentral setup]] this role is often filled by //encoderX.lan.c3voc.de// or //minionX.lan.c3voc.de//. </bootnote>+== Cutting with FUSE
  
 +There are two main ways of cutting a video: Using the KDEnlive or Shotcut open source video editors or by manually writing frame numbers to obtained from a video player like mpv the in- and outframe files.
  
-== Cutting with FUSE and video editor+General preconditions: 
 +  * Access to VOC VLAN or ethernet network 
 +    * via DHCP or 
 +    * fixed IP configured as secondary ethernet interface 
 +  * Account on https://tracker.c3voc.de 
 +  * Have VLC installed 
 +  * On Linux: Install ''cifs-utils'' (or similar) to mount the SMB share 
 +  * On Linux: Install Shotcut (version 22.12.21 is known to work) or KDEnlive (version 17.x or 18.x) 
 +  * On Windows/ macOS: Install Shotcut as described at [[https://shotcut.org/download/|their website]] (Version 22.12.21 is known to work)
  
-Preperation: +=== General Workflow
-  * Linux: +
-      * <code>apt-get install cifs-utils</code> +
-      * Schnittprogramm installieren: Entweder KDEnlive oder Shotcut +
-      * Mounten des Fuse-Share (read-write!) <code>mkdir -p /video/fuse +
-sudo mount.cifs //storage.lan.c3voc.de/fuse /video/fuse -orw,guest,uid=$local_user</code> +
-  * macOS: +
-     * Shotcut von [[https://github.com/mltframework/shotcut/releases/tag/v18.10.08|Webseite]] (Aktuelle Version geht nicht) herunterladen und installieren  +
-     * Finder öffnen, "Connect to Server" (cmd+K) [[smb://voc@storage.lan.c3voc.de/fuse]] +
-  * Windows:  +
-     * Shotcut von Webseite herunterladen und installieren +
-     * per GUI mit Netzlaufwerk <nowiki>\\storage.lan.c3voc.de/video/</nowiki> verbinden +
  
-per Lecture: +<bootnote>The following commands will use //storage.lan.c3voc.de// as a placeholder for the machine with the FUSE mounts. Small events may use //encoderX.lan.c3voc.de// or //minionX.lan.c3voc.de// as storage share.</bootnote>
-    * Im Tracker Übersicht (Filter "Cutting") zu schneidenden Vortrag suchen +
-    * auf cut Button drücken +
-    * 4-stellige Fahrplan-ID merken +
-    * Ordner ''/video/fuse/<EVENT>/<RAUM>/<Fahrplan-ID>/'' per Nautilus/Finder/Explorer öffnen +
-    * ''uncut.ts'' mit VLC öffnen und schauen ob der Vortrag komplett enthalten ist. +
-      * **ACHTUNG** bei Events mit Übersetzerton: die Schnittprogramme spielen nur die erste Tonspur! Zum Prüfen der Sprachbelegung am Besten VLC verwenden, der Hotkey für die Audio-Umschaltung ist ''b'' +
-      * Sprache merken +
-    * ''project.kdenlive'' bzw''project_shotcut.mlt'' mit Schnittprogramm öffnen +
-      * Anfang und Ende vom Vortrag suchen und festlegen +
-        * Details siehe unten +
-    * Prüfen, ob A/V sync ist +
-    * im Tracker die real gehörte Sprache aus Dropdown auswählen und "Finish" klicken+
  
 +We use three different file share mounts, due to different read/write permissions. `$USER` is already set by your OS.
  
-=== Kdenlive+First of all, you need to mount the storage device's SMB file share to access the files: 
 +  * Linux: <code>sudo mkdir -p /video; sudo chown $USER /video  
 +mount -t cifs -o uid=$USER,password=,ro "//storage.lan.c3voc.de/video" /video 
 +mount -t cifs -o uid=$USER,password=,rw "//storage.lan.c3voc.de/tmp" /video/tmp 
 +mount -t cifs -o uid=$USER,password=,rw "//storage.lan.c3voc.de/fuse" /video/fuse 
 +</code> 
 +  * macOS: Open Finder, click "Connect to Server" (cmd+K) in the "Go To" menu and connect to `smb://Guest:@storage.lan.c3voc.de/fuse` 
 +  * Windows: Connect to the `\\storage.lan.c3voc.de/video/` network drive
  
-Anfang und Ende vom Vortrag suchen +If you can see files in ''<nowiki>fuse/<EVENT>/<ROOM>/<Talk-ID></nowiki>''you're ready to go.
- * mit der Maus auf den Rand des "Balkens" (alsodes gesamten Clips) gehen, es sollte ein grüner Pfeil auftauchen - mit diesem Pfeil den Balken auf die gewünschte Länge zusammenschieben +
-      * es gibt ein Snap am aktuellen Marker +
-      * NICHT den Vortrag auf der Timeline verschieben!+
  
-Ist die Verbindung zum Storage schlecht, sollten auf jeden Fall die Videound Audiothumbnails deaktiviert werdenDie Buttons dafür befinden sich am unteren Rand des Fensters auf der rechten Seite.+To cut a lecture: 
 +  * Open https://tracker.c3voc.de and open an event/ project 
 +  * Click "recording task to cut" on the right to get a list of open cutting tickets 
 +  * Press the "cut" button and remember the talk ID 
 +  * Open ''<nowiki>/video/fuse/<EVENT>/<ROOM>/<Talk-ID>/</nowiki>'' in some file explorer 
 +  * Open the ''uncut.ts'' with VLC: 
 +    * Check if the start and end are present in the fileIf not, go back to the tracker and click "extend timeline" 
 +    * If translations are provided at the event: Check which tracks contain audio and which languages are spoken 
 +  * Start cutting with KDEnlive, Shotcut or mpv (see below) 
 +  * Check if audio and video are in sync 
 +  * Go back to the tracker to finish cutting: 
 +    * Select language(s) from the drop-down using the right order (audio track 1, 2, 3) 
 +    * If there was A/V-delay, enable the corresponding checkbox and set the number (VLC and mpv values need to be inverted) 
 +    * click "finish"
  
-=== Shotcut+=== Notes on Using KDEnlive
  
-Anfang und Ende vom Vortrag suchen +Open the ''project.kdenlive'' project file to start cutting: 
-  * in und out im Clip-Monitor setzenz.Bdurch drücken von ''i'' und ''o'' +  * Find start and end of the lecture and resize the bar by dragging the start and end with your mouse 
-  * Wenn alles passt die Projektdatei abspeichern+    * When hovering over the endsa green arrow should appearUse this to change the lengthIt may snap at your current playback position. 
 +    * Be careful to not move the video in the timeline 
 +  * Save the project file
  
-Tastenkürzel Shotcut +If you have a poor connection to the storagedeactivate the video and audio thumbnails using the buttons on the right side of the lower window border.
-    i = Startpunkt (in) setzen +
-    o = Endpunkt (out) setzen +
-    <space> = play / pause +
-    <bild-up> <bild-down> +/- 1 Sekunde springen (mit <Ctrl> bzw <ALT> 2 bzw. 5 Sekunden) +
-    <ALT><Pfeil-links> Springe zum Anfang (Intro) +
-    <ALT><Pfeil-rechts> Springe zum Ende (Outro) +
-    <Pfeil-links> Springe 1 Frame zurück +
-    <Pfeil-rechts> Springe 1 Frame vorwärts +
-    j / l  spule zurück / vorwärts (je häufiger gedrücktdesto schneller)+
  
-Problem bei Shotcut-Installation: +=== Notes on Using Shotcut
-Fehlermeldung "This application failed to start because it could not find or load the Qt platform plugin "xcb" in [...]" lässt sich per <code>apt-get install libQt5Gui</code> beheben. Siehe z.B. auch http://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without+
  
-=== mpv+Open the ''project_shotcut.mlt'' project file to start cutting: 
 +  * Skim through the recording (use ''<space>'' for play/pause) 
 +    * Set start (in-point) with shortcut ''i'' 
 +    * Set end (out-point) with shortcut ''o'' 
 +  * Save the project file
  
-Mit der folgenden config in z.B. ~/.config/mpv/mpv.conf lassen sich im mpv die Frames anzeigen, die dann per Hand in inframe bzw. outframe im fuse-mount geschrieben werden können:+More shortcuts: 
 +  * ''i'':                          Set start/ in-point 
 +  * ''o'':                          Set endout-point 
 +  * ''<space>'':                    playpause 
 +  * ''<page-up> <page-down>'':      Jump +/- 1 second (combine <Ctrl> or <ALT> to jump 2 or 5 seconds) 
 +  * ''<ALT>+<arrow-left>''        Jump to start 
 +  * ''<ALT>+<arrow-right>'':        Jump to end 
 +  * ''<arrow-left> <arrow-right>'': Jump 1 frame back/ forwards 
 +  * ''j / l'':                      Fast back/ forwards (gets faster, if pressed multiple times)
  
 +Possible issues at installation:
 +  * Error "This application failed to start because it could not find or load the Qt platform plugin "xcb" in [...]":
 +    * <code>apt-get install libQt5Gui</code> (see http://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without)
 +
 +=== Notes on Using mpv
 +
 +''mpv'' is a command line media player, which can also be used in our cutting workflow.  [[user:nicoo]] wrote [[https://forgejo.c3voc.de/voc/mpv-scripts|an mpv script]] which automates our cutting workflow.
 +
 +See [[https://mpv.io/manual/master/#keyboard-control|the ''mpv'' manual]] for the default keybinds.
 +
 +==== Setup
 +
 +Install the script, typically by copying ''c3voc-cutter.lua'' to ''~/.config/mpv/scripts/'' If using a mountpoint other than ''/video'', it needs to be set in ''~/.config/mpv/script-opts/c3voc.conf''.
 +
 +The script does not add keybindings by default, and those must be configured in ''~/.config/mpv/input.conf'' like so:
 +<code>
 +% script-binding c3voc-cutter-jump-in
 +^ script-binding c3voc-cutter-jump-out
 +Ctrl+5 script-binding c3voc-cutter-set-in
 +Ctrl+6 script-binding c3voc-cutter-set-out
 +</code>
 +
 +mpv can also be configured to show frame numbers by adding these settings in ''~/.config/mpv/mpv.conf'':
 <code> <code>
 osd-level=3 osd-level=3
Line 82: Line 111:
 </code> </code>
  
 +If using nix / home-manager, the script repository is a flake providing the necessary configuration as NixOS and HM modules; just add the following to your (NixOS) imports, replacing ''nicoo'' with your local username:
 +<code>
 +{
 +  imports = [ c3voc-scripts.nixosModules.default ];
 +  home-manager.users.nicoo.imports = [ c3voc-scripts.homeModules.default ];
 +  c3voc.user = "nicoo";
 +}
 +</code>
 +==== Usage (with script)
  
-== Bekannte Probleme und ihre Lösungen+* Open ''uncut.ts'' in mpv to start cutting 
 +* Skim through the video to find the start 
 +  * mark it by hitting ''Ctrl+5'' (or whichever keybind you set) 
 +  * jump back to it with ''Shift+5'' 
 +  * you can hit ''Ctrl+5'' again at any point to set a new startpoint 
 +* Same for the end 
 +* ''mpv'' will write the ''inframe'' and ''outframe'' file when exiting or switching to a new file.
  
-Shotcut oder VLC zeigen beim Abspielen des uncut.ts keine Zeit an: 
-*  Das Recording wurde zu früh gestoppt, oder neu gestartet wodurch es Probleme mit den Timestamps im TS gibt. Siehe [[c3tracker:repair#defekte_timestamps|c3tracker:repair#defekte_timestamps]]. 
  
-macOS +==== Usage (manual) 
-* Problem mit OS X 10.11 El Capitan: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821730 + 
-   wenn man mit smbpasswd -a voc einen user anlegt kann man sich als user voc anstatt als guest einloggen.+Open the ''uncut.ts'' in mpv to start cutting: 
 +  * Skim through the video to find the start 
 +    * Write the frame number to the ''inframe'' file using ''echo <FRAME> > /video/fuse/<EVENT>/<ROOM>/<Talk-ID>/inframe'' 
 +  * Do the same for the end using the ''outframe'' file 
 + 
 +Using ''echo'' works best since some text editors like to create temporary lock files which isn't allowed on the FUSE file system. 
 + 
 +==== Tips 
 + 
 +  * [[https://github.com/po5/thumbfast|thumbfast]] can generate thumbnails live, for instance when hovering over a seek bar, which can help find the start and end of a talk faster(Note: it needs to be used with a UI script, and supports most MPV UIs) 
 +  * [[https://github.com/po5/evafast|evafast]] gives fast-forward and seeking on the same key, which is rather convenient
 +  [[https://github.com/CounterPillow/mpv-quack|quack]] reduces the volume when seeking, to avoid torturing one's ears during cutting 
 + 
 + 
 +For nix users: those are all packaged, and can be added with 
 + 
 +<code> 
 +programs.mpv.scripts = with pkgs.mpvScripts;
 +  evafast 
 +  quack 
 +  thumbfast # NOTE: useless on its own, combine with its builtin osc.lua, or with alt. OSCs like uosc 
 +]; 
 +</code>
  
-== Remote Cutting / Schneiden mit Proxy-File+== Known Issues and Solutions
  
-Schneiden von Remote+  * Shotcut or VLC don't show a time during playback
-  - im Tracker auf cut klicken um das Ticket zu reservieren +    * The ''uncut.ts'' has broken timestamps because the recording was stopped to early or started to late. See [[c3tracker:repair#defekte_timestamps]]
-  - ein low-res proxy file rendern: [[::ffmpeg#webcut_lores_mp4]] (Quellfile ist ''/opt/crs/fuse/…/uncut.ts''+  * Skimming though the video leads to jumps or some parts of the video can't be jumped to: 
-  - das project file von shotcut oder kdenlive auf den lokalen PC kopieren und mit dem Texteditor das uncut.ts durch das erzeugte proxy file ersetzen, dabei den absoluten Pfad verwenden +    * The ''uncut.ts'' has broken timestamps because the recording was stopped to early or started to lateSee [[c3tracker:repair#defekte_timestamps]]
-  - Projekt öffnen und wie immer den Anfang und Ende beschneiden+  * SMB connect fails on OS X 10.11 El Capitan: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821730 
-  - dann das project file auf den Encoder ins eigene Homedir laden und das project file im fuse mount ersetzen. Am besten mit ''cat meinfile.mlt >/opt/crs/fuse/…/project_shotcut.mlt'' +    * Add an SMB password to the ''voc'' user with ''smbpasswd -a voc'' to that one can be used instead of the guest user
-  finished cut klicken. +
-  - alles geht weiter wie bisher+
  
-== See also  
  
-* [[events:cccamp15:pp]] +== Remote Cutting using a Proxy File
-* [[:cutter-bootimage]]+
  
 +The ''uncut.ts'' can get quite large as we're still recording using the MPEG2 codec.
 +If you need to cut via the VPN, it may be useful to generate smaller low-resolution "proxy" files and cut based on that:
 +  * press "cut" in the tracker to assign the ticket to yourself
 +  * create a proxy file from ''/video/fuse/.../uncut.ts'': [[::ffmpeg#webcut_lores_mp4]]
 +  * copy the KDEnlive or Shotcut project file to your local file system and replace the video URL
 +  * open the project and cut
 +  * upload the project file to the FUSE file system, e.g. by:
 +    * loading the file to your home directory on the storage server/ encoder
 +    * ''cat meinfile.mlt > /video/fuse/.../project_shotcut.mlt'' (or similar for KDEnlive)
 +  * click "finish" in the tracker
  
-  
  • c3tracker/cutting.1645964845.txt.gz
  • Last modified: 2022/02/27 13:27
  • by andi