lwc:multimedia_and_graphics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lwc:multimedia_and_graphics [2021/01/06 20:20] John Harrisonlwc:multimedia_and_graphics [2023/08/18 08:22] (current) John Harrison
Line 1: Line 1:
   * [[http://stackoverflow.com/questions/12336401/creating-icon-fonts-with-vector-software-i-e-inkscape-and-fontforge|How to create a ttf]]   * [[http://stackoverflow.com/questions/12336401/creating-icon-fonts-with-vector-software-i-e-inkscape-and-fontforge|How to create a ttf]]
-  * crossfade example with ffmpeg (audio and video):+ 
 +==== Crossfade with ffmpeg ==== 
 +=== crossfade example with ffmpeg (audio and video) ===
 <code> <code>
 /opt/ffmpeg/bin/ffmpeg -i 1.mov -i 2.mov -f lavfi -i color=black -filter_complex \ /opt/ffmpeg/bin/ffmpeg -i 1.mov -i 2.mov -f lavfi -i color=black -filter_complex \
Line 30: Line 32:
 -vcodec libx264 -preset ultrafast -qp 0 -aspect 1.778 -map [outv] -map [outa] -acodec libvorbis -qscale:a 10 -ss 00:00:02 -t 5 out.mp4 -vcodec libx264 -preset ultrafast -qp 0 -aspect 1.778 -map [outv] -map [outa] -acodec libvorbis -qscale:a 10 -ss 00:00:02 -t 5 out.mp4
 </code> </code>
-  * compress:+=== crossfade using ffmpeg and xfade === 
 +<code> 
 +ffmpeg -i first.mp4 -i second.mp4 -filter_complex "xfade=transition=fade:offset=60:duration=1" out.mp4 
 +<code> 
 +// from https://superuser.com/questions/778762/crossfade-between-2-videos-using-ffmpeg // 
 +</code> 
 +  * compress video with ffmpeg:
 <code>ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4</code> <code>ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4</code>
-''crf'' is typically 24 through 30. Higher numbers are smaller files and lower quality.+''crf'' is typically 24 through 30. Higher numbers are smaller files and lower quality. From [[https://unix.stackexchange.com/questions/28803/how-can-i-reduce-a-videos-size-with-ffmpeg]] 
 +  * convert video to a sequence of pngs: ''ffmpeg -i <FILENAME1> <FILENAME2>_%03d.png'' 
 +  * [[https://superuser.com/questions/810471/remove-mp4-video-top-and-bottom-black-bars-using-ffmpeg|remove letterboxing with ffmpeg]] 
 +  * slow down video but keep smoothness by using optical flow (sometimes called motion interpolation): ''ffmpeg -i input.mkv -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=120'" output.mkv'' where ''fps'' is the output fps (independent of input fps) 
 +  * change speed video is played (fps) without changing anything else. No frames are harmed with this cmd: ''ffmpeg -itsscale 2 -i input.mp4 -c copy -an output.mp4'' # slow to 2x slower
  • lwc/multimedia_and_graphics.1609986017.txt.gz
  • Last modified: 2021/01/06 20:20
  • by John Harrison