Aggiorna 'ffmpeg.md'

This commit is contained in:
incandenza 2024-01-30 10:43:09 +01:00
parent 5e09456a33
commit 6702e81461

View file

@ -21,4 +21,31 @@ Using CUDA:
```
ffmpeg -y -fflags +genpts -r 30 -hwaccel cuda -hwaccel_output_format cuda -pattern_type glob -i '*.png' -vf "setpts=100*PTS,minterpolate=fps=24:scd=none" -pix_fmt yuv420p -c:v h264_nvenc "test01.mp4"
```
```
### Add silent audio track to a video (with no audio tack)
```
ffmpeg -i "test.mp4" -f lavfi -i anullsrc=cl=stereo:r=48000 -shortest -y "test_silent.mp4"
```
Useful if you want to merge more than one \*.mp4 video and some of these ave no audio track
Make sure that audio rate for the silent track matches the one of file(s) you are going to merge with it
### Crop a video to a well defined size
```
ffmpeg -i test_silent.mp4 -filter:v "crop=512:512:1200:200" -c:a copy te.mp4
```
Crop to size 512x512 starting from 1200,200 where 0,0 is the top left corner
### Concatenation of two videos
Once you've performed tthe two steps above (same size and a silent audio if needed):
```
ffmpeg -i te.mp4 -i 20231104021840.mp4 -filter_complex "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1" -vsync vfr output.mp4
```