Open RushingAlien opened 5 months ago
I would think the encoder select the proper ones depending on what features are being selected and used by the encoder? I haven't checked though..
Having features and profiles independently select-able is a UI nightmare in my opinion as it is unclear who wins, and probably just results in an error in case of mismatch.
hm... then what encoder option would trigger those? or does it depend on the video stream it receives through the sink pad?
in any case, asking cause ffmpeg-vaapi, quicksync, etc has those options
Ok, AVC and HEVC are a bit different here.
In AVC you could for example select to have b-frames, which cannot exist in baseline/constraint-baseline for example.
It is a bit less complex on the HEVC side. The decision on your example should be auto-selected depending on your set output format in OBS. As personally I do not see much sense when you select an 8-bit output format you want to encode with 10-bit. Or vice versa, if you set OBS to composite in 10-bit, why would you want your encode to be done in 8-bit then.
I guess there can be occasions were someone explicitly wants that - but I guess these are the rare edge cases. I blame it on the Pareto principle..
ah, so if the video stream obs creates is 10 bit, vah265enc would automatically choose a 10-bit output? Then i too see this manual as very low priority.
ah, so if the video stream obs creates is 10 bit, vah265enc would automatically choose a 10-bit output?
I'd hope so. I think I verified that it is/was working at some point.. I hope it still does!
I have confirmed that it does not, and below is the setting i used.
yuv420p10 sounds like 10 bit to me.
Oh sorry I meant the "Main" part which says the profile. For example this is an obs-ffmpeg encoded video with main10 profile set
I need to check some time whats happening here. I'm not even sure what Main 10 and yuv420p10 together means. Main 10 shoul dbe 8 bit only, so no idea what to make out of it. Not that i think it makes a difference.. but bt.709 and 10 bit is probably not a good pair.
A quick test:
$ gst-launch-1.0 videotestsrc ! vapostproc ! vah265enc ! video/x-h265,profile=main ! h265parse ! filesink location=x.265
$ mediainfo x.265
General
Complete name : x.265
Format : HEVC
Format/Info : High Efficiency Video Coding
File size : 14.3 MiB
Frame rate : 30.000 FPS
Video
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L2@Main
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
$ gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! vapostproc ! vah265enc ! video/x-h265,profile=main-10 ! h265parse ! filesink location=x.265
$ mediainfo x.265
General
Complete name : x.265
Format : HEVC
Format/Info : High Efficiency Video Coding
File size : 10.7 MiB
Frame rate : 30.000 FPS
Video
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L2@Main
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
$ gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! vapostproc ! vah265enc ! video/x-h265,profile=main ! h265parse ! filesink location=x.265
Fails to run!
$ gst-launch-1.0 videotestsrc ! vapostproc ! vah265enc ! video/x-h265,profile=main-10 ! h265parse ! filesink location=x.265
Fails to run!
First is main profile at 8-bit. Second is main-10 at 10-bit. Other than the notice of 10-bit, there is no indication about main-10. Third one is a try to use 10-bit with main. Which fails because format and profile contradict each other. Fourth one is a try to use 8-bit with main-10. Which fails because format and profile contradict each other.
So I guess the correct profile will be selected depending on the input color bit depth.
Hm... So is it just that gstreamer does not insert main10 as profile metadata or something?
Format profile : Main 10@L5@Main
This is the information i got when encoding ffmpeg with main10
Perhaps.. not even sure what this exact syntax is trying to say, or where these values come from. Using x265enc I can get the Main 10 at the beginning too. Then again, why is there a Main following the level?
Profiles are not part of encoder option, but part of src pads
vah265enc
vah264enc