FFmpeg: Difference between revisions

21 bytes added ,  20 December 2020
no edit summary
No edit summary
Line 118: Line 118:
}}
}}


===Resizing/Scaling===
===Filters===
 
====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 151: Line 153:
}}
}}


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


Line 163: Line 165:
* 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]


====Converting EAC to equirectangular====
=====Converting EAC to equirectangular=====
Youtube sometimes uses an EAC format. You can convert this to the traditional equirectangular format as follows:
Youtube sometimes uses an EAC format. You can convert this to the traditional equirectangular format as follows:
<pre>
<pre>
Line 178: Line 180:
</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 191: Line 193:
</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 200: Line 202:
</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>.


==Filter-Complex==
===Filter-Complex===
Filter complex allows you to create a graph of filters.
Filter complex allows you to create a graph of filters.


Line 218: Line 220:
</pre>
</pre>


==Filters==


==C API==
==C API==