Ffmpeg

From ScientificComputing
Jump to: navigation, search

Category

Visualization

Description

FFmpeg is a multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

Available versions (Euler, old software stack)

Legacy versions Supported versions New versions
1.0.1 2.3.3

Please note that this page refers to installations from the old software stack. There are two software stacks on Euler. Newer versions of software are found in the new software stack.

Environment modules (Euler, old software stack)

Version Module load command Additional modules loaded automatically
1.0.1 module load legacy gcc/4.4.7 ffmpeg/1.0.1
2.3.3 module load gcc/4.8.2 ffmpeg/2.3.3

Please note that this page refers to installations from the old software stack. There are two software stacks on Euler. Newer versions of software are found in the new software stack.

How to submit a job

You can submit an ffmpeg job in batch mode with the following command:
bsub [LSF options] "ffmpeg [ffmpeg options]"
Here you need to replace [ffmpeg options] with ffmpeg command line options (please run ffmpeg -h for getting a list of all command line options) and [LSF options] with LSF parameters for the resource requirements of the job. Please find a documentation about the parameters of bsub on the wiki page about the batch system.

Example

As an example for an ffmpeg job, we are creating an mpeg movie out of a series of jpeg pictures.
[leonhard@euler05 ~]$ ls
T_L0U0_var0000.png  T_L0U0_var0017.png  T_L0U0_var0034.png  T_L0U0_var0051.png  T_L0U0_var0068.png  T_L0U0_var0085.png
T_L0U0_var0001.png  T_L0U0_var0018.png  T_L0U0_var0035.png  T_L0U0_var0052.png  T_L0U0_var0069.png  T_L0U0_var0086.png
T_L0U0_var0002.png  T_L0U0_var0019.png  T_L0U0_var0036.png  T_L0U0_var0053.png  T_L0U0_var0070.png  T_L0U0_var0087.png
T_L0U0_var0003.png  T_L0U0_var0020.png  T_L0U0_var0037.png  T_L0U0_var0054.png  T_L0U0_var0071.png  T_L0U0_var0088.png
T_L0U0_var0004.png  T_L0U0_var0021.png  T_L0U0_var0038.png  T_L0U0_var0055.png  T_L0U0_var0072.png  T_L0U0_var0089.png
T_L0U0_var0005.png  T_L0U0_var0022.png  T_L0U0_var0039.png  T_L0U0_var0056.png  T_L0U0_var0073.png  T_L0U0_var0090.png
T_L0U0_var0006.png  T_L0U0_var0023.png  T_L0U0_var0040.png  T_L0U0_var0057.png  T_L0U0_var0074.png  T_L0U0_var0091.png
T_L0U0_var0007.png  T_L0U0_var0024.png  T_L0U0_var0041.png  T_L0U0_var0058.png  T_L0U0_var0075.png  T_L0U0_var0092.png
T_L0U0_var0008.png  T_L0U0_var0025.png  T_L0U0_var0042.png  T_L0U0_var0059.png  T_L0U0_var0076.png  T_L0U0_var0093.png
T_L0U0_var0009.png  T_L0U0_var0026.png  T_L0U0_var0043.png  T_L0U0_var0060.png  T_L0U0_var0077.png  T_L0U0_var0094.png
T_L0U0_var0010.png  T_L0U0_var0027.png  T_L0U0_var0044.png  T_L0U0_var0061.png  T_L0U0_var0078.png  T_L0U0_var0095.png
T_L0U0_var0011.png  T_L0U0_var0028.png  T_L0U0_var0045.png  T_L0U0_var0062.png  T_L0U0_var0079.png  T_L0U0_var0096.png
T_L0U0_var0012.png  T_L0U0_var0029.png  T_L0U0_var0046.png  T_L0U0_var0063.png  T_L0U0_var0080.png  T_L0U0_var0097.png
T_L0U0_var0013.png  T_L0U0_var0030.png  T_L0U0_var0047.png  T_L0U0_var0064.png  T_L0U0_var0081.png  T_L0U0_var0098.png
T_L0U0_var0014.png  T_L0U0_var0031.png  T_L0U0_var0048.png  T_L0U0_var0065.png  T_L0U0_var0082.png  T_L0U0_var0099.png
T_L0U0_var0015.png  T_L0U0_var0032.png  T_L0U0_var0049.png  T_L0U0_var0066.png  T_L0U0_var0083.png
T_L0U0_var0016.png  T_L0U0_var0033.png  T_L0U0_var0050.png  T_L0U0_var0067.png  T_L0U0_var0084.png
[leonhard@euler05 ~]$ module load gcc/4.8.2 ffmpeg/2.3.3      
[leonhard@euler05 ~]$ bsub -n 1 -W 4:00 -R "rusage[mem=2048]" "ffmpeg -r 30 -i 'T_L0U0_var%04d.png' -c:v libx264 -pix_fmt yuv420p out.mpeg"   
Generic job.
Job <33639084> is submitted to queue <normal.4h>.
[leonhard@euler05 ~]$ bjobs
JOBID      USER       STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
33639084   leonhard   PEND  normal.4h  euler05                 * out.mpeg Dec  6 08:22
[leonhard@euler05 ~]$ bjobs
JOBID      USER       STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
33639084   leonhard   RUN   normal.4h  euler05     e2212       * out.mpeg Dec  6 08:22
[leonhard@euler05 ~]$ bjobs
No unfinished job found
[leonhard@euler05 ~]$ ls -ltrd out.mpeg 
-rw-r--r-- 1 leonhard T0000 0 Dec  6 08:23 out.mpeg
As a result, the movie out.mpeg is created.

License information

LGPLv2.1

Links

https://ffmpeg.org

https://en.wikipedia.org/wiki/FFmpeg
https://wiki.ubuntuusers.de/FFmpeg
https://github.com/FFmpeg/FFmpeg
https://www.youtube.com/channel/UCrhtPcTc2vVXMCWFMy_7gPA