wiki:video_repair
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige ÜberarbeitungNächste ÜberarbeitungBeide Seiten, nächste Überarbeitung | ||
wiki:video_repair [2020/06/09 21:15] – [Untrunc] pulsar | wiki:video_repair [2021/03/14 15:03] – [Untrunc] pulsar | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | |||
+ | ===== Videos Encodieren ===== | ||
+ | |||
+ | Manche Videos lassen sich nicht abspielen wegen Codec Warnung, daher muss man manche Videos umwandeln wenn man keine Codecs installieren mag. Dies gelang gut mit '' | ||
+ | |||
+ | Im weiteren Schritt ließ es sich nun auch mit '' | ||
+ | |||
===== Videos reparieren ===== | ===== Videos reparieren ===== | ||
Zeile 12: | Zeile 19: | ||
Man kann versuchen die defekte Video-Datei mit '' | Man kann versuchen die defekte Video-Datei mit '' | ||
- | mencoder -forceidx -oac copy -ovc copy corruptvideo.mp4 -o fixedvideo.avi | + | mencoder -forceidx -oac pcm -ovc copy corruptvideo.mp4 -o fixedvideo.avi |
| | ||
Zeile 21: | Zeile 28: | ||
Verschiedene Optionen an '' | Verschiedene Optionen an '' | ||
+ | |||
+ | You can use the scale filer as an output option to tell ffmpeg to scale your images. This allows you | ||
+ | to keep the input images at their original size. Examples: | ||
+ | |||
+ | < | ||
+ | -vf scale=1280: | ||
+ | -vf scale=1280: | ||
+ | </ | ||
+ | |||
+ | These two scale examples would both resize your 1700x1100 input to 1280x828. The -1 tells ffmpeg to scale | ||
+ | the height automatically while keeping the aspect ratio. With your input size and the requested 1280 | ||
+ | output width the height would end up being 828. | ||
+ | |||
mplayer -nosound -vf scale=1024: | mplayer -nosound -vf scale=1024: | ||
Zeile 36: | Zeile 56: | ||
ffmpeg -i "So Live.avi" | ffmpeg -i "So Live.avi" | ||
- | ==== Untrunc ==== | + | |
+ | Hiermit wird das Video richtig klein, indem die Framsize verkleiner wird. Von 40 MB auf 5 MB verkleinert. | ||
- | | + | |
- | | + | |
+ | oder | ||
- | It is possible to repair the broken mp4 or m4v file using Untrunc. For this method you need: | + | ffmpeg -i input.mkv -vf " |
+ | |||
+ | |||
+ | Nur die ersten 30 Sekunden eines Videos in eine neue Datei speichern | ||
- | another video file which isn't broken | + | ffmpeg -i half_the_frame_size.mkv -t 00:00:30 TheRunoftheGoldenBull.mkv |
- | and Install some pre-requisite libraries with apt or zypper: | + | Aus der Mitte eines Video einen bestimmten Bereich wählen. Hier ab der 11. Sekunde und ab da 31 Sekunden weiter. |
- | | + | |
+ | |||
+ | |||
+ | Video beschleunigen | ||
- | Unter Suse benötigte ich noch das Paket zlib-devel | + | ffmpeg |
+ | |||
+ | Video verlangsamen | ||
- | | + | |
- | This is what to do: | + | Zwei einzelne Video Dateien zusammenfügen. Hierzu müssen die beiden oder mehrere Dateien untereinander in einer Text Datei eingetragen werden: |
+ | |||
+ | < | ||
+ | cat files.txt | ||
+ | file ' | ||
+ | file ' | ||
+ | </ | ||
- | + | Anschließend beginnt das zusammensetzen der Dateien mit '' | |
- | Download the source code for Untrunc from the github repo: | + | |
- | | + | |
- | Unzip the source code: | ||
- | unzip master.zip | ||
- | Go into the directory where it's been unzipped: | + | Audio, Musik, Ton aus einer Musik-Datei zu einem Video hinzufügen |
- | | + | |
- | Compile the source code using this command (all one line): | ||
- | g++ -o untrunc file.cpp main.cpp track.cpp atom.cpp mp4.cpp -L/ | + | ==== Untrunc ==== |
- | (you can try skipping this step and using the ready-provided executable, but it didn't work for me) | + | * https:// |
- | Then you can actually fix the video. You need both the broken video and an example working video. | + | oder eine verbesserte Version: |
- | Ideally the video should be from the same camera & have the same resolution (mine was but it might work without). Also if it is at least as long as the broken one (preferably roughly the same) this may help. | + | * https:// |
- | Run this command in the folder where you have unzipped and compiled Untrunc but replace the / | ||
- | | + | Es wir neben der defekten Videodatei noch eine funktionierende Datei welche vom gleichen Gerät erstellt worden ist wie die defekte. |
- | Then it should churn away and hopefully produce a playable file called broken-video_fixed.m4v | + | Zusätzlich werden noch benötigte Libraries mit '' |
- | That's it you're done! | + | sudo apt install libavformat-dev libavcodec-dev libavutil-dev |
- | VLC Media Player should now be able to play the file. However it may be reporting the wrong length information (Untrunc tries to guess/work this out, but doesn' | + | Unter Suse benötigte ich noch das Paket //zlib-devel// |
+ | zypper in zlib-devel | ||
+ | |||
+ | Dann '' | ||
+ | |||
+ | Die Verwendung von '' | ||
+ | |||
+ | |||
+ | ./untrunc -v -s ../ | ||
+ | | ||
+ | | ||
==== Screenshots von WebCam ==== | ==== Screenshots von WebCam ==== | ||