What is the default ffmpeg x264 export configuration?
In this case I am inserting a JPG file, then mark it as Image sequence with duration of 0.04 per image (25 fps), resolution 1920x1080 (source). Then export it with the default preset and h264_amf hardware encoding.
I found some information in the MLT XML however this is not exactly ffmpeg’s command format and could be missing some parameters, not sure.
Why are you asking about x264 when you are using hardware encoder? They are independent implementations of H.264 compression. If you want to understand the defaults, click the Default preset or the Reset button in Export, followed by Advanced, and look through the tabs.
ffmpeg’s command format
Shotcut is not a simple ffmpeg command line front end except in the specialized cases of proxy generation and Properties > Convert. Rather, Shotcut uses the FFmpeg libraries indirectly through MLT.
You can also look at the <consumer> element of the MLT XML for the encoding parameters in text format and then consult the MLT docs.
Ahh, I did not know that hardware and software methods are so different.
The reason for asking this is that when I use Shotcut as described before, I get overall nice quality videos, while when using FFmpeg standalone on a simpler system (no hardware acceleration) with the same source files, achieving the same quality at the same filesize seems not going to happen. Sometimes close, often not even close.
I do not know why because the AMD hardware encoder is generally much worse than x264. Also, both Shotcut and ffmpeg default to the same x264 compression style and quality level (crf 23). hmm
You are right. The think that tricked me was that preset=fast was mentioned in the log and the ‘Other’ tab while preset does not affect h264_amf. The output is the same, whatever preset is chosen. The overall h264_amf result is somewhere near superfast of x264, most of the time a slightly lower quality and larger file size. That’s settled then.
Now the colours caught my eye. I use -pix_fmt yuv420p with FFmpeg. (Leaving that out or chosing e.g. yuvj422p creates a darkened video.) FFmpeg’s result is close to the source, Shotcut is off. What does Shotcut do concerning colours?
Example below had to be done in 3 posts because the system does not allow new users to post multiple images in one post.
Shotcut:
(Download images and cycle between them to clearly see the differences.)
Come to think about my text in the last post, it is still somewhat weird, considering that the presets of FFmpeg x264 are said to roughly not affect quality, but only encoding speed versus file size… For me this is not the case. The pattern is: results from the superfast preset are nice (also slightly larger than extremefast, but difficult to see a quality difference), all others are not nice, a drop in quality. Then h264 is in between the profiles and superfast profile. But well, this is offtopic for Shotcut, talking purely FFmpeg.
The only Shotcut thing to be solved are the colours.