We can also stream a video from the internet, transcode it and save it on our computer with FFmpeg. In our example we are transcoding the video stream with the libx265 encoder and the audio stream with the aac encoder. The -c:v option is to specify the video encoder to use and the -c:a option is to specify the audio encoder to use. ffmpeg -i video.mp4 -c:v libx265 -c:a aac video.mp4 To transcode a video with a specific encoder we run the following command. We can run the first one to look at all the encoders and the second one to look at all the decoders. We can take a look at all of them with the following commands. ffmpeg -i video.mp4 video.mkv Transcoding With a Specific EncoderįFmpeg has a long list of encoders and transcoders to use. If we want to transcode the video instead of simply copying it we use the same command minus the -c copy option. mkv video file by simply copying the video data stream and just changing the container. This command simply converts the video from an. ffmpeg always needs to specify a file to work with, we always specify the working file with the -i option. To do this we run the ffmpeg command on the Ubuntu terminal command line. webm and many others including from audio to audio formats, such as. We can easily convert a video type to another with FFmpeg. FFmpeg Usage Examples Convert Videos with FFmpeg
When there’s a new version available you can update with Ubuntu’s Software Update tool.
Suggested readings: manual of systemd-run and ffmpeg version 4.4-6ubuntu5 Copyright (c) 2000-2021 the FFmpeg developersīuilt with gcc 11 (Ubuntu 11.2.0-7ubuntu1)Ĭonfiguration: -prefix=/usr -extra-version=6ubuntu5 -toolchain=hardened -libdir=/usr/lib/x86_64-linux-gnu -incdir=/usr/include/x86_64-linux-gnu -arch=amd64 -enable-gpl -disable-stripping -enable-gnutls -enable-ladspa -enable-libaom -enable-libass -enable-libbluray -enable-libbs2b -enable-libcaca -enable-libcdio -enable-libcodec2 -enable-libdav1d -enable-libflite -enable-libfontconfig -enable-libfreetype -enable-libfribidi -enable-libgme -enable-libgsm -enable-libjack -enable-libmp3lame -enable-libmysofa -enable-libopenjpeg -enable-libopenmpt -enable-libopus -enable-libpulse -enable-librabbitmq -enable-librubberband -enable-libshine -enable-libsnappy -enable-libsoxr -enable-libspeex -enable-libsrt -enable-libssh -enable-libtheora -enable-libtwolame -enable-libvidstab -enable-libvorbis -enable-libvpx -enable-libwebp -enable-libx265 -enable-libxml2 -enable-libxvid -enable-libzimg -enable-libzmq -enable-libzvbi -enable-lv2 -enable-omx -enable-openal -enable-opencl -enable-opengl -enable-sdl2 -enable-pocketsphinx -enable-librsvg -enable-libmfx -enable-libdc1394 -enable-libdrm -enable-libiec61883 -enable-nvenc -enable-chromaprint -enable-frei0r -enable-libx264 -enable-shared Sudo systemd-run -scope CPUQuota=100% stress -c 8 Get 100% *available* time of one logical core only. # Here, my stress command despite being hungry for all CPUs would only Sudo systemd-run -scope -p AllowedCPUs=0,4 stress -c 8 # I chose 0 and 4 because both belongs to the same physical core. # but systemd would limit it to allowed logical cores 0 and 4. # My stress commands wants to use all 8 logical cores of my machine, 200% would be two logical cores, and so on. Indice is 0 for first logical core, 1 for second logical core, and so on.įor CPUQuota, 100% equals one logical core's maximum available CPU time. Sudo systemd-run -scope -p CPUQuota=VALUE% CMDįor AllowedCPUs, you can mention the indice of the logical core to which you want to restrict the execution of your command. Sudo systemd-run -scope -p AllowedCPUs=VALUE CMD If you are using a Linux distribution which uses systemd, then you can use one if its utilities named systemd-run for resource control.