Convert any video file to HEVC (H.265) keeping audio tracks:
ffmpeg -i <input_file> -c:v libx265 -x265-params crf=23 -c:a copy <output_file>
Convert a Bluray disc to AVC (H.264) by using VA-API hardware acceleration. Replace 5000k
to your choosen bitrate:
sudo mount -o loop bluray_dumped.iso /mnt/bluray`
ls -lh /mnt/bluray/BDMV/STREAM/ | sort -k 5 -h # Check the biggest m2ts files
fmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -i /mnt/bluray/BDMV/STREAM/00002.m2ts -vf 'format=nv12,hwupload' -map 0:0 -map 0:1 -threads 8 -aspect 16:9 -y -f matroska -acodec copy -b:v 5000k -vcodec h264_vaapi output.mkv
Source: https://gist.github.com/Brainiarc7/95c9338a737aa36d9bb2931bed379219#encoding-with-vaapi
To avoid server transcoding or playing issues in limited devices:
for i in *.mkv; do ffmpeg -i "$i" -map 0:v -map 0:a -map 0:s -c copy -c:s srt "${i%.*}-new.mkv"; done
ffmpeg -i input_file.mkv -c:v copy -c:a libmp3lame -b:a 128k output_file.mkv
youtube-dl --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3 "http://youtube.com/the_video"
Remember to keep youtube-dl updated from pip.
ffmpeg -codecs | grep vaapi
Edit the /etc/pulse/default.pa
file as root and comment out or add this line:
load-module module-echo-cancel
Source: [1]: https://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio
find . -iname "*.jpg" | xargs -l -i convert -resize 50% -quality 80 {} /tmp/xxxxx/{}