Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted in category Creativity / Video
posted at 10. Aug '21

My Video Encoding Profiles

I use them to encode videos for YouTube and kind of archive. Videos are not that important, so they can be a bit blurry.

Currently I prefer VP9+Opus or Vorbis. Trying to evade patented codecs with crazy politics. AV-1+Opus also make sense. H264+AAC and high profile are classic.

4:4:4 subsampling is important for recordings of text, games can handle 4:2:0.

I’ll just throw it there and later maybe add more info.

Kdenlive profile, easy to extract ffmpeg arguments:

```xml

```

To convert extracted Blu-ray (legally bought of course) with makemkv to MKV including subtitles:

```bash ffmpeg -i bluray:”.” -analyzeduration 2147483647 -probesize 2147483647 -scodec ass -acodec flac -vcodec copy out.mkv

ffmpeg -i bluray:”.” -analyzeduration 2147483647 -probesize 2147483647 -scodec copy -acodec flac -sample_fmt s16 -ar 48000 -ac 2 -compression_level 9 -vcodec av1_nvenc -movflags use_metadata_tags -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -map 0 out2.mkv ```

This probably won’t work:

```bash for i in *.m2ts; do ffmpeg -i $i -analyzeduration 2147483647 -probesize 2147483647 -scodec copy -acodec flac -vcodec copy $(basename $i .m2ts).mkv; done

for i in *.m2ts; do ffmpeg -i $i -analyzeduration 0 -probesize 5000000 -map 0 -scodec copy -acodec flac -compression_level 9 -sample_fmt s16 -vcodec copy $(basename $i .m2ts).mkv; done

for i in *.m2ts; do ffmpeg -i $i -analyzeduration 0 -probesize 5000000 -map 0 -scodec ass -acodec flac -compression_level 9 -sample_fmt s16 -vcodec av1_nvenc $(basename $i .m2ts).mkv; done

```

I kind of lost other profiles, will add them later.

ffmpeg -i 00010.m2ts -analyzeduration 0 -probesize 5000000 -map 0 -scodec copy -acodec flac -compression_level 9 -sample_fmt s16 -vcodec av1_nvenc $(basename 00010.m2ts .m2ts).mkv

ffmpeg -i 00010.m2ts -analyzeduration 0 -probesize 5000000 -map 0 -scodec ass -acodec flac -compression_level 9 -sample_fmt s16 -vcodec av1_nvenc $(basename 00010.m2ts .m2ts).mkv

for i in *.m2ts; do ffmpeg -i $i -analyzeduration 0 -probesize 5000000 -map 0 -scodec ass -acodec flac -compression_level 9 -sample_fmt s16 -vcodec av1_nvenc $(basename $i .m2ts).mkv; done

for i in *.m2ts; do ffmpeg -i $i -analyzeduration 2147483647 -probesize 2147483647 -scodec copy -acodec flac -sample_fmt s16 -ar 48000 -ac 2 -compression_level 9 -vcodec av1_nvenc -movflags use_metadata_tags -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -map 0 $(basename $i .m2ts).mkv; done

for i in *.mkv; do ffmpeg -i $i -analyzeduration 2147483647 -probesize 2147483647 -scodec copy -acodec flac -sample_fmt s16 -ar 48000 -ac 2 -compression_level 9 -vcodec av1_nvenc -movflags use_metadata_tags -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -map 0 $(basename $i .mkv)x.mkv; done

ffmpeg -i $i -analyzeduration 2147483647 -probesize 2147483647 -scodec copy -acodec flac -sample_fmt s16 -ar 48000 -ac 2 -compression_level 9 -vcodec av1_nvenc -movflags use_metadata_tags -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -map 0 $(basename $i .m2ts).mkv

ffmpeg -i aaa.mkv -analyzeduration 2147483647 -probesize 2147483647 -scodec copy -acodec flac -sample_fmt s16 -ar 48000 -ac 2 -compression_level 9 -vcodec av1_nvenc -movflags use_metadata_tags -map_metadata 0 -map 0 aaax.mkv

Add Comment