== Encoding Movies with MEncoder/FFmpeg [[PageOutline]] === Introduction MPlayer is available on JURECA. Please load the required modules first: {{{#!ShellExample module load Stages/Devel-2017a module load GCC/5.4.0 module load MPlayer }}} For more details on MEncoder please check [http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html here] ==== Images => Movie: ===== Example 1: JPEG -> MPEG4 in AVI-container (with vcodec=mpeg4) For details on lavopts check [http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html#menc-feat-vcd-dvd-lavc here] {{{#!ShellExample mencoder mf://*.jpg -mf w=1920:h=1080:fps=25:type=jpg \ -ovc lavc \ -lavcopts vcodec=mpeg4:mbd=2:trell \ -oac copy \ -o output.avi }}} ===== Example 2: PNG -> MPEG4 in AVI-container (with library x264 through FFmpeg integrated into mencoder) For details on x264encopts check [http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html here] {{{#!ShellExample mencoder mf://*.png -mf w=1920:h=1080:fps=25:type=png \ -ovc x264 \ -x264encopts \ bitrate=900:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300:threads=auto \ -oac copy \ -o output.avi }}} ===== Example 3: PNG -> MPEG4 (ready for !QuickTime 7) (ready for !QuickTime 7 limitations - taken from [https://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-quicktime-7.html here]) Pass 1: {{{#!ShellExample mencoder mf://*.png -mf w=1024:h=768:fps=25:type=png \ -ovc x264 \ -x264encopts pass=1:turbo:bitrate=900:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300:threads=auto \ -vf harddup \ -oac copy \ -o output.mp4 }}} Pass 2: {{{#!ShellExample mencoder mf://*.png -mf w=1024:h=768:fps=25:type=png \ -ovc x264 \ -x264encopts pass=2:turbo:bitrate=900:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300:threads=auto \ -vf harddup \ -oac copy \ -o output.mp4 }}} ==== ffmpeg Examples (https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9) {{{#!ShellExample ffmpeg -i input -c:libx264 -profile:baseline -preset:ultrafast -level 1.2 }}} ---- any feedback welcomed - h.zilken@fz.juelich.de, goebbert@jara.rwth-aachen.de