wiki:video_repair
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
wiki:video_repair [2021/03/14 20:27] – [Untrunc] pulsar | wiki:video_repair [2021/05/31 14:15] (aktuell) – gelöscht techguru | ||
---|---|---|---|
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 ===== | ||
- | |||
- | The idea is to strip off the first 44 bytes of the header, for instance with a hex editor or using '' | ||
- | |||
- | dd ibs=1 skip=44 if=' | ||
- | faad -a adts.aac raw.aac | ||
- | |||
- | |||
- | ==== mplayer mencoder ==== | ||
- | |||
- | Man kann versuchen die defekte Video-Datei mit '' | ||
- | |||
- | mencoder -forceidx -oac pcm -ovc copy corruptvideo.mp4 -o fixedvideo.avi | ||
- | |||
- | | ||
- | Springt zu 56. Sekunde | ||
- | |||
- | mencoder -ss 56 | ||
- | |||
- | |||
- | 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 -vo x11 -screenw 1920 -screenh 1088 20150502_006.mp4 | ||
- | | ||
- | Forced video codec: ffh264vdpau | ||
- | mplayer -vo vdpau -vc ffh264vdpau 'So Live.avi' | ||
- | | ||
- | | ||
- | ==== ffmpeg ==== | ||
- | |||
- | Das Video zu einer niedrigeren Auflösung encodieren. Oder mit ffmpeg zu einem anderen Format umwandeln: | ||
- | |||
- | ffmpeg -i "So Live.avi" | ||
- | |||
- | ffmpeg -i "So Live.avi" | ||
- | | ||
- | Hiermit wird das Video richtig klein, indem die Framsize verkleiner wird. Von 40 MB auf 5 MB verkleinert. | ||
- | |||
- | ffmpeg -i The\ Run\ of\ the\ Golden\ Bull.webm -vf " | ||
- | | ||
- | oder | ||
- | |||
- | ffmpeg -i input.mkv -vf " | ||
- | | ||
- | |||
- | Nur die ersten 30 Sekunden eines Videos in eine neue Datei speichern | ||
- | |||
- | ffmpeg -i originalfilm.mkv -t 00:00:30 TheRunoftheGoldenBull.mkv | ||
- | |||
- | |||
- | Aus der Mitte eines Videos einen bestimmten Bereich wählen. Hier ab der 11. Sekunde und ab da 31 Sekunden weiter. | ||
- | |||
- | ffmpeg -ss 00:00:11 -i originalfilm.mkv -t 31 -c copy supershort01.mkv | ||
- | | ||
- | | ||
- | Video beschleunigen | ||
- | |||
- | ffmpeg -i 20210112_15171777.mp4 -filter:v " | ||
- | | ||
- | |||
- | Video verlangsamen | ||
- | |||
- | ffmpeg -i 20210112_15171777.mp4 -filter:v " | ||
- | |||
- | |||
- | 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 '' | ||
- | |||
- | ffmpeg -f concat -safe 0 -i files.txt -c copy output.mp4 | ||
- | |||
- | |||
- | |||
- | Audio, Musik, Ton aus einer Musik-Datei zu einem Video hinzufügen | ||
- | |||
- | ffmpeg -i ronnimachtsport01.mp4 -i music.m4a -map 0:v -map 1:a -c:v copy -shortest output_mit_musik.mp4 | ||
- | |||
- | |||
- | ==== Untrunc ==== | ||
- | |||
- | * https:// | ||
- | |||
- | oder eine verbesserte Version: | ||
- | |||
- | * https:// | ||
- | |||
- | |||
- | Es wir neben der defekten Videodatei noch eine funktionierende Datei benötigt welche vom gleichen Gerät erstellt worden ist wie die defekte. | ||
- | |||
- | Zusätzlich werden noch benötigte Libraries mit '' | ||
- | |||
- | sudo apt install libavformat-dev libavcodec-dev libavutil-dev | ||
- | |||
- | Unter Suse benötigte ich noch das Paket // | ||
- | |||
- | zypper in zlib-devel | ||
- | |||
- | |||
- | Dann '' | ||
- | |||
- | Die Verwendung von '' | ||
- | |||
- | |||
- | ./untrunc -v -s ../ | ||
- | | ||
- | | ||
- | ==== Screenshots von WebCam ==== | ||
- | |||
- | === MPlayer === | ||
- | |||
- | To use MPlayer to take snapshots from your webcam run this command from the terminal: | ||
- | |||
- | mplayer tv:// -tv driver=v4l2: | ||
- | |||
- | From here you have to press s to take the snapshot. The snapshot will be saved in your current folder as shotXXXX.png. | ||
- | |||
- | ===== Video aufnehmen ===== | ||
- | |||
- | If you want to record continuous video: | ||
- | |||
- | mencoder tv:// -tv driver=v4l2: | ||
- | |||
- | Press Ctrl+c to end the recording. | ||
- | |||
- | Unter Debian, openSuse und weiteren zu finden | ||
- | guvcview | ||
- | |||
- | |||
- | ==== MPV ==== | ||
- | |||
- | Unter Raspberry mit OSMC bietet sich das Programm '' | ||
- | mpv av:// | ||
- | |||
- | |||
- | === Spezieller Raspberry Schalter in mpv === | ||
- | |||
- | < | ||
- | --hwdec=< | ||
- | Specify the hardware video decoding API that should be used if possible. | ||
- | back on software decoding. | ||
- | |||
- | <api> can be one of the following: | ||
- | |||
- | no | ||
- | |||
- | auto see below | ||
- | |||
- | vdpau requires --vo=vdpau or --vo=opengl (Linux only) | ||
- | |||
- | vaapi requires --vo=opengl or --vo=vaapi (Linux only) | ||
- | |||
- | vaapi-copy | ||
- | | ||
- | |||
- | videotoolbox | ||
- | | ||
- | |||
- | dxva2-copy | ||
- | | ||
- | |||
- | rpi requires --vo=rpi (Raspberry Pi only - default if available) | ||
- | |||
- | auto tries to automatically enable hardware decoding using the first available method. This still depends what VO you are using. For example, if you are not using --vo=vdpau or --vo=opengl, | ||
- | decoding will never be enabled. Also note that if the first found method doesn' | ||
- | some Linux systems). | ||
- | </ | ||
- | |||
- | ==== VLC ==== | ||
- | |||
- | VLC can also be used to view and record your webcam. In VLC's file menu, open the ' | ||
- | |||
- | vlc v4l:// : | ||
- | |||
- | This will make VLC mirror your webcam. To take stills, simply choose ' | ||
- | |||
- | < | ||
- | vlc v4l:// : | ||
- | </ | ||
- | |||
- | Kein Ton, Optionen habe ich leicht geändert am 25.12.2018 | ||
- | < | ||
- | cvlc v4l:// : | ||
- | </ | ||
- | |||
- | Für Raspberry mit OSMC optimiert | ||
- | cvlc v4l:// : |
wiki/video_repair.1615750071.txt.gz · Zuletzt geändert: 2021/03/14 20:27 von pulsar