FFmpeg: Difference between revisions

12 bytes added ,  21 December 2020
Line 118: Line 118:
}}
}}


===Filters===
==Filters==
Filters are part of the CLI


====Resizing/Scaling====
===Resizing/Scaling===
[https://trac.ffmpeg.org/wiki/Scaling FFMpeg Scaling]<br>
[https://trac.ffmpeg.org/wiki/Scaling FFMpeg Scaling]<br>
[https://ffmpeg.org/ffmpeg-filters.html#scale scale filter]
[https://ffmpeg.org/ffmpeg-filters.html#scale scale filter]
Line 153: Line 154:
}}
}}


====Rotation====
===Rotation===
[https://ffmpeg.org/ffmpeg-filters.html#transpose transpose filter]
[https://ffmpeg.org/ffmpeg-filters.html#transpose transpose filter]


Line 165: Line 166:
* 3 – Rotate by 90 degrees clockwise and flip vertically.
* 3 – Rotate by 90 degrees clockwise and flip vertically.


====360 Video====
===360 Video===
See [https://ffmpeg.org/ffmpeg-filters.html#v360 v360 filter]
See [https://ffmpeg.org/ffmpeg-filters.html#v360 v360 filter]


Line 180: Line 181:
</pre>
</pre>


=====Converting to rectilinear=====
====Converting to rectilinear====
<pre>
<pre>
ffmpeg -i input.mp4 -vf "v360=e:rectilinear:h_fov=90:v_fov=90" output.mp4
ffmpeg -i input.mp4 -vf "v360=e:rectilinear:h_fov=90:v_fov=90" output.mp4
</pre>
</pre>


=====Metadata=====
====Metadata====
To add 360 video metadata, you should use [https://github.com/google/spatial-media Google's spatial-media].
To add 360 video metadata, you should use [https://github.com/google/spatial-media Google's spatial-media].
This will add the following sidedata which you can see using <code>ffprobe</code>:
This will add the following sidedata which you can see using <code>ffprobe</code>:
Line 193: Line 194:
</pre>
</pre>


====Removing Duplicate Frames====
===Removing Duplicate Frames===
[https://stackoverflow.com/questions/37088517/remove-sequentially-duplicate-frames-when-using-ffmpeg Reference]<br>
[https://stackoverflow.com/questions/37088517/remove-sequentially-duplicate-frames-when-using-ffmpeg Reference]<br>
[https://ffmpeg.org/ffmpeg-filters.html#mpdecimate mpdecimate filter]
[https://ffmpeg.org/ffmpeg-filters.html#mpdecimate mpdecimate filter]
Line 202: Line 203:
</syntaxhighlight>
</syntaxhighlight>


====Stack and Unstack====
===Stack and Unstack===
To stack, see <code>hstack</code>, <code>vstack</code>.   
To stack, see <code>hstack</code>, <code>vstack</code>.   
To unstack, see <code>crop</code>.
To unstack, see <code>crop</code>.