ffmpeg
ffmpeg installieren:
- Windows: https://www.gyan.dev/ffmpeg/builds/
- Linux: sudo apt-get install ffmpeg
- macOS: brew install ffmpeg
Chris Video Anleitung: https://www.youtube.com/watch?v=t973zd4s6R4&t=284s
Yuneec Thermal Videos aufteilen
Um die Videos der Drohne mit 2 Video Spuren aufzuteilen kann folgender Befehl helfen:
Thermalvideo exportieren:
ffmpeg -i "YUN_0210.mp4" -y -vcodec libx264 -movflags faststart -map 0:v:1 -pix_fmt yuv420p "YUN_0210-thermal.mp4"
Normalvideo exportieren:
ffmpeg -i "YUN_0210.mp4" -y -vcodec libx264 -movflags faststart -map 0:v:0 -pix_fmt yuv420p "YUN_0210-normal.mp4"
Als Script: https://github.com/Wlanfr3ak/mixed-scripts/blob/master/yuneec-ffmpeg.sh
Windoof: https://github.com/Wlanfr3ak/mixed-scripts/blob/master/yuneec-ffmpeg.bat
AXIS Video umwandeln
ffmpeg -i 20220626_225001_20220626_232959.mkv -codec copy test.mp4
BluRay ISO to mp4 etc.
https://unixsheikh.com/tutorials/remuxing-iso-dvd-or-bluray-using-cat-and-ffmpeg-on-linux.html
AV1 Encoding
ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -c:s copy -c:a copy output.mp4
CUDA / NVIDIA Beschleunigung
https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/
-hwaccel cuda -hwaccel_output_format cuda
H265
https://ntown.at/de/knowledgebase/cuda-gpu-accelerated-h264-h265-hevc-video-encoding-with-ffmpeg/
ffmpeg.exe -hwaccel cuvid -i inmovie.mov -pix_fmt p010le -c:v hevc_nvenc -preset slow -rc vbr_hq -b:v 6M -maxrate:v 10M -c:a aac -b:a 240k outmovie.mp4
https://trac.ffmpeg.org/wiki/Encode/H.265 https://github.com/Wlanfr3ak/mixed-scripts
- https://superuser.com/questions/329349/how-do-i-convert-iso-to-mp4-without-mounting-with-ffmpeg
HandBrakeCLI -Z "High Profile" -i a_movie.iso -o a_movie.mp4
HandBrakeCLI -Z "H.265 MF 1080p" -i GENESIS\ INVISIBLE\ TOUCH\(1\).ISO -o Genesis-InvisibleTouch.mp4
HandBrakeCLI -Z "Super HQ 1080p30 Surround" -audio-lang-list "eng" -i GENESIS\ INVISIBLE\ TOUCH\(1\).ISO -o Genesis-InvisibleTouch.mp4
ffmpeg -ss 00:00:30.0 -i GENESIS\ INVISIBLE\ TOUCH.mkv -c copy -t 00:07:10.0 Genesis-InvisibleTouchCutted.mp4
- ffmpeg -i input4kvid.mp4 -vf scale=1920:1080 -c:a copy output1080vid.mp4 Convert 4k to 1080 (no change in codec)
- ffmpeg -i input.mp4 -c:v libx265 -vtag hvc1 -c:a copy output.mp4 Convert h.264 to h.265 (no change in resolution)
- ffmpeg -i input.mkv -c:v hevc_videotoolbox -vtag hvc1 -c:a copy output.mp4 MacOS HWaccel
- ffmpeg -i input.mp4 -c:v libx265 -vtag hvc1 -vf scale=1920:1080 -crf 20 -c:a copy output.mp4 Convert 4k(h.264) to 1080(h.265) Downscaling + Change in compression codec
Film zu 1080p konvertieren: ffmpeg -i .mkv -c:v libx265 -vtag hvc1 -vf scale=1920:1080 -crf 20 -c:a copy .mp4
Options Explained -i input file name or file path -c:v libx265 -vtag hvc1 selecting compression. Default is libx264 -vf scale=1920:1080 specifying output resolution -c:a copy copy audio as it is without any compression -preset slow ask compression algorithm to take more time & look for more areas for compression. Default is medium. Other options are faster, fast, medium, slow, slower -crf 20 Compression quality -crf 0 high-quality, low compression, large file -crf 23 default -crf 51 low-quality, high compression, small file
Export Bilder from Video
ffmpeg -i IMG_4483.MOV -vf fps=1/0.3 -s 2160x3840 "imageX_%05d.jpg"
Hochkant
ffmpeg -i MVI_6816.MP4 -vf fps=1/0.3 -s 3840x2160 "imageX_%05d.jpg"
Querformat IM VIDEO!!!
Bilder nachträglich drehen
for file in *.JPG; do convert $file -rotate 90 rotated-$file; done
for file in *.JPG; do convert $file -rotate 180 rotated-$file; done
for file in *.JPG; do convert $file -rotate 270 rotated-$file; done
AV1 Encoding
Tjerks Script:
ffmpeg -i INPUT.mkv -c:v libsvtav1 -crf 26 -vsync vfr -map 0 -c:a eac3 -b:a 448k -map_metadata 0 -f matroska OUTPUT-AV1.mkv
https://github.com/Wlanfr3ak/mixed-scripts/blob/master/ConvertVideoInFolderToAV1.sh
To encode a video to AV1 with a quality factor of 30 and 10-bit depth using FFmpeg on macOS, you can use the following command: ```bash ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 -pix_fmt yuv420p10le output_av1.mp4 ``` ### Explanation of the command: - `-i input.mp4`: Specifies your input video file. Replace `input.mp4` with your actual file name. - `-c:v libaom-av1`: Sets the video codec to AV1 using the `libaom` encoder. - `-crf 30`: Controls the quality level (constant rate factor). Lower values result in better quality but larger file sizes. Adjust as needed. - `-b:v 0`: Enables constant quality mode instead of setting a fixed bitrate. - `-pix_fmt yuv420p10le`: Ensures the output is in 10-bit YUV 4:2:0 format. - `output_av1.mp4`: Specifies the output file name. Make sure FFmpeg is installed on your macOS. If it's not, you can install it via Homebrew by running: ```bash brew install ffmpeg ``` Let me know if you need help tweaking the parameters!
Yes, FFmpeg supports several other AV1 encoders besides `libaom-av1`. Here are your options: 1. **libaom-av1** (already mentioned): - Developed by the Alliance for Open Media. - Focuses on quality and flexibility but can be slow. - Most commonly used for AV1 encoding. 2. **SVT-AV1**: - Developed by Intel and Netflix. - Known for being significantly faster than `libaom-av1`, especially for multi-threaded environments. - Command example: ```bash ffmpeg -i input.mp4 -c:v libsvtav1 -crf 30 -pix_fmt yuv420p10le output_av1.mp4 ``` 3. **rav1e**: - Focuses on simplicity and efficiency. - Great for faster encoding times but might not match `libaom` in compression efficiency. - Command example: ```bash ffmpeg -i input.mp4 -c:v librav1e -crf 30 -pix_fmt yuv420p10le output_av1.mp4 ``` 4. **VPCodec (VAAPI-based AV1 encoding)**: - Hardware-accelerated AV1 encoding, available if you have compatible GPUs (like Intel or AMD). - Very fast, but quality may not always be as high as software encoders. - Command example: ```bash ffmpeg -i input.mp4 -c:v av1_vaapi -qp 30 -pix_fmt p010le output_av1.mp4 ``` Each encoder has its strengths depending on your priorities (e.g., encoding speed, output quality, or resource usage). Feel free to pick one based on what suits your project best! Let me know if you want additional tips or tweaks.