mltframework / shotcut

cross-platform (Qt), open-source (GPLv3) video editor
https://www.shotcut.org
GNU General Public License v3.0
10.84k stars 1.12k forks source link

YouTube export preset should always generate H.264 high profile video #1486

Closed wagner-b closed 10 months ago

wagner-b commented 10 months ago

Hello, and thanks for putting effort to keep improving this great software!!

There is "some interesting behavior" (bug??) I discovered when exporting using the youtube preset. I've tested on Arch Linux, with the latest stable release of Shotcut - 23.09.29. I could reproduce this issue on a Ryzen 7 7735HS processor with Radeon 680M graphics, and also on a 7th gen intel processor with intel HD graphics 620.

Everything here revolves around the fact that youtube recommends uploading videos encoded with H.264 high profile (source: https://support.google.com/youtube/answer/1722171#zippy=%2Cvideo-codec-h ). Therefore, it is reasonable to expect that the youtube export preset in shotcut should always encode the video with H.264 high profile. Well, it turns out that isn't always the case.

If the original video was already encoded with H.264 high profile, and you export it using the software encoder (libx264), then sure, the exported video remains H.264 high profile.

However, when using the hardware encoder on Linux (h264_vaapi) and exporting using the YouTube preset, ffprobe says the resulting video is encoded with H.264 main profile, instead of high profile (even if the original video was encoded with H.264 high profile). ffmpeg doesn't exhibit such behavior when transcoding H.264 high profile video using vaapi.

I know maybe this isn't a big issue, but the H.264 main profile is only recommended for SD videos (480p), not for high-definition (720p and up), and basically nobody wants to watch 480p videos on youtube anymore, we're in 2023 (almost 2024)...

I feel like properly supporting hardware encoding on Linux is also important, because in most cases it reduces the export time quite a bit, and probably power consumption as well.

If vprofile=high is added to the "Other" tab in "Advanced" export options, this whole issue is obviously solved. So I want to propose adding this line by default to the YouTube export preset. Since the high profile is what YouTube officially recommends, I see no reason why this shouldn't be the default.