C
C
chief2021-11-03 16:37:43
Video processing
chief, 2021-11-03 16:37:43

What do the various ffmpeg/HEVC options mean?

Please describe in detail how to use the parameters when encoding a video.
There is a batch file for encoding in HEVC:

ffmpeg ^
  -i "%~1" ^
  -c:v libx265 ^
  -profile:v main10 ^
  -preset medium ^
  -tune fastdecode ^
  -crf 19 ^
  -map 0 ^
  -pix_fmt yuv420p10le ^
  -x265-params "aq-mode=3:no-strong-intra-smoothing=1:range=full:colorprim=bt709:colormatrix=bt709" ^
  -c:a copy ^
  -c:s copy ^
  "%~p1%~n1_HEVC.mkv"

If you feed him an MKV video where there are Chapters, he throws an error:
[swscaler @ 00000170337a7000] deprecated pixel format used, make sure you did set range correctly
x265 [info]: HEVC encoder version 3.5+15-4bf31dc15
x265 [info]: build info [Windows][GCC 10.0.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [error]: Picture width must be an integer multiple of the specified chroma subsampling
x265 [error]: Picture height must be an integer multiple of the specified chroma subsampling
[libx265 @ 0000017032fe1400] Cannot open libx265 encoder.
Error initializing output stream 0:9 -- Error while opening encoder for output stream #0:9 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

0:9 is just Chapters.
If you remove -map 0 - Everything works But in mkvtoolnix, besides Chapters, Tags also appear. I don't know what it is.

Also, when passing through the batch file, the descriptions of the audio tracks change to the parameters. How to save audio track names? (Or even save the titles and add the parameters (characteristics) of the track?

Googled it but didn’t understand anything. It seems like there is a parameter -map_chapters but it doesn’t work.

What you need: When the video passes through the batch file
- Title titles and audio
are saved - Chapters are saved
// maybe I'll ask something else in the comments
////please do not send to the English-language wiki

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2021-11-04
@tumbler

I 'll send it not to the wiki :

  1. Automatic stream selection
  2. map value 0
  3. In the same place, the parameters map_metadata and map_chapters
  4. Change metadata

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question