# Which encoder: “x264” or “Apple VT H264 Software Encoder”? Is there a difference?



## free don (Jan 25, 2021)

Finalizing a setup for recording(no streaming) depositions on zoom with my MacPRO.
Goal: Record HD mp4: 1 gig per hour, resolution: 1920 x 1080, Video Bitrate: 5000 Kbps, 30 FPS.

“Output > Output Mode > Advanced > Recording > Encoder > (Use Stream Encoder)” was selected by the auto-configuration wizard. At > Recording > Encoder > , should I select “Use Stream Encoder”, “x264” or “Apple VT H264 Software Encoder”? (auto-conf. Set stream encoder to x264) 

My MacPRO specs, OBS settings, description of recording and purpose are here
https://www.reddit.com/r/obs/comments/l3mqej/which_encoder_best_for_my_recording_only_zoom_on/


----------



## Nass86 (Jan 25, 2021)

I’m finding / reading that the Apple H264 Hardware Encoder is only good above 10,000kbps bitrate for recordings. Doing 5000 and 3500 like I have makes it too blocky. The quality at 5000 Kbps bitrate H264 doesn’t match what were you get x264 software encoding IF your Mac has other things shut and isn’t demanding the CPU for much (or ideally, anything) else.

I’d do the following. 

If you are doing other things on the Mac, give the cpu a break and hit the bitrate up to 10,000kbps using H264 hardware encoding.
Downside is double the file size you need (wonder if you can convert it down to 5000 again somehow after)

if you are solely doing this and don’t have chrome open and close other programs, you should find x264 software encoding does the job nicely. If you start clicking on videos or watching any media or scrolling on Facebook/ other demanding websites when encoding x264, you can expect pixelation and skipping (encoding lag)

you can test what it’s capable of by doing what you desire and opening VIEW -> STATS and see if you get Encoding warnings (rendering or encoding dropped frames numbers will increase and warning signs will turn red)

you might find that Safari or Firefox with ONE browser window open is okay. I’ve had mixed results on 2011 iMac i5 2.5ghz 8gb RAM and MacBook Pro 2015 2.5ghz (3.8 turbo boost) Quad Core i7 16 GB Ram. 

Basically on x264 I won’t touch anything else


----------



## nottooloud (Jan 25, 2021)

Nass86 said:


> (wonder if you can convert it down to 5000 again somehow after)


Totally routine to downsample later, using HandBrake or whatever you like. High bitrate encoding is easier on the fly, and then a slow re-encode later takes some time but can look just as good in a much smaller file size.


----------



## free don (Jan 25, 2021)

Thanks Nass86 and nottooloud! My routine has been (in post) to reduce file size with MPEG Streamclip: video converter https://squared5.com. Gets cumbersome doing 6+ hours per day of 5-10 recorded files. I have not had time yet to learn how to write a script in FFmpeg https://en.wikipedia.org/wiki/FFmpeg to do these by batch and optimize. Maybe this is possible in the OBS “Output > Output Mode > Advanced > Recording > Custom Muxer Settings?"

Where are you...?


> ...finding / reading that the Apple H264 Hardware Encoder is only good above 10,000kbps bitrate for recordings.


Why is...?


> High bitrate encoding is easier...


Where can I read about and get more clear on OBS "high bitrate encoding," hardware encoding and how the bitrate controls when the apple hardware controller kicks in or functions?



> you can test what it’s capable of by doing what you desire and opening VIEW -> STATS and see if you get Encoding warnings (rendering or encoding dropped frames numbers will increase and warning signs will turn red)


I will start testing tomorrow.

Confirmed. I understand the computer resources need to be 100% devoted to this task. I will just keep 1 firefox tab open for gmail zoom links. I will be able to keep my zoom audio and video muted 99% of the time. That will lower resources zoom is taking.


----------



## Nass86 (Jan 27, 2021)

OK - on the Zoom note - you might find it better / worse for your encoding if you change the following setting too.

ZOOM - PREFERENCES
VIDEO - ADVANCED (at bottom)
My "use hardware acceleration" by default here is already ticked. I imagine if encoding with x264 (cpu), by ticking this on Zoom, you are taking the harder task away from the CPU which is good. Perhaps if encoding using hardware encoder above 10,000kbps, it might be fine leaving this on or free up resources by turning it off. Turning it off lets the GPU focus solely on encoding your video to record, meanwhile the CPU or Integrated Graphics (intel) is left handling the Zoom video.

Re. Your other questions, I have spent a long time trawling these forums and eventually landed on someone asserting this finding. They were experiencing grainy encoding like I do if I stream or record under 10,000kbps. I can't find where I read this. Streaming isn't wise at 10,000 today (you will throw off a lot of viewers because they are buffering - you need to be around 2,500 to 5,000 at 720p to keep more viewers having a good overall experience) but I do remember them saying you could try 10,000, 20,000, 30,000 (but a minimum of 10,000) on the recordings.

Some interesting findings here too:





						Isn't it too much of a size?
					

Hi,  I'm facing a problem with recording games (R6 Siege) with OBS.  So currently I've been testing a lot of presets and settings. I have 1080p, Lanczos and 60 fps set, currently h264 (as using AMD Radeon RX 570) over x264.  So in conclusion:  -CBR, no matter what bitrate (whether 5000, 8000...




					obsproject.com


----------



## free don (Jan 28, 2021)

Thank you Nass86. That helps me understand enough to have some direction for experimenting with the output settings for recording. I join the multitude rebuilding this wheel! 

3 problems:
1. This would be a lot simpler with several output settings templates for recording as starting points. I'm sure the developers (volunteers) probably have that knowledge to do that but are busy building better OBS.
2. There is disagreement and confusion about these output settings you spent lots of time trawling for.
3. These setting can potentially be different for every different piece of hardware and use case. 

But, I am glad to have the technical learning experience - particular for video production. I would always choose opensource when possible for all the conceivable reasons. Rock on OBS developers!


----------



## nottooloud (Jan 28, 2021)

free don said:


> 3 problems:
> 1. This would be a lot simpler with several output settings templates for recording as starting points. I'm sure the developers (volunteers) probably have that knowledge to do that but are busy building better OBS.
> 2. There is disagreement and confusion about these output settings you spent lots of time trawling for.
> 3. These setting can potentially be different for every different piece of hardware and use case.



I agree with your #2. Your #3 is the main argument against spending any time on your #1. Fortunately, OBS' Auto-Configuration Wizard does a really good job of handling both. Did you use it from the beginning? I recommend starting over with it any time you change something in your setup or add a new destination.


----------



## free don (Jan 28, 2021)

nottooloud said:


> I agree with your #2. Your #3 is the main argument against spending any time on your #1. Fortunately, OBS' Auto-Configuration Wizard does a really good job of handling both. Did you use it from the beginning? I recommend starting over with it any time you change something in your setup or add a new destination.



Thanks nottooloud. Yes I am using OBS' great Auto-Configuration Wizard and starting over numerous times. But, because I cannot afford optimum hardware today, I don't get all the settings I need form it. For example it set my bitrate at 2500. I cannot use 2500.

Here is why I think #1 and #3 are problems for professional recording. This is not criticism of the OBS project but outlining my thinking, challenges and what might be helpful to others.

Since, this is for my professional recording work, I am not able to work with just 1 computer and 1 settings template. I need to understand how to set up a computer for OBS output settings from scratch fast. If my computer gets stolen today and I need to set up a different computer for a paying job tomorrow morning, I have to understand how to adjust the output settings. I will be working with at least 3 different computers and I need to be able to explain settings to my employer. Although I will be double-recording to protect against loss due to crashes etc., I need to do everything possible so that I get as close as possible to perfect consistent video and audio quality.

Adding to #3: Although this software is wonderfully compatible with lower-powered hardware which can often be tweaked and adjusted into working well for recording zoom well, if the purpose is 1-3 hour single-takes recordings of zoom by a paid essential worker etc... *to guarantee 'professional' results (without lots of trawling google and this forum), you 'should' spend 'professional' money*. Professional meaning consistent high quality. You must start with hardware with: very specific graphics requirements, 32+ gig ram, 4+ core CPU (I am not certain of exact specs). There are some other optimum hardware conditions to consider.

Also, getting into the available materials, it was hard to distinguish between several different kinds of discussions that often got mixed:
* optimizing recording with an: under-powered computer ~~~ high-powered
* recording only ~~~ recording w/zoom ~~~ streaming and recording
* getting near-perfect professional quality performance video and audio results ~~~ not

To recap, these are the Output settings needing to be considered:
Video/audio bitrate
Encoder
Enable advance encoder settings?
Encoder preset
Recording quality
recording format
(for now leaving out Type: Custom Output (FFmpeg))

I am trying to write up some tests and hopefully post here or in another post.


----------



## nottooloud (Jan 28, 2021)

free don said:


> Although this software is wonderfully compatible with lower-powered hardware which can often be tweaked and adjusted into working well for recording zoom well, if the purpose is 1-3 hour single-takes recordings of zoom by a paid essential worker etc... *to guarantee 'professional' results (without lots of trawling google and this forum), you 'should' spend 'professional' money*.



Certainly. I use vMix.


----------



## free don (Jan 30, 2021)

I can only see bitrate settings in streaming sections of the settings. So, do the streaming settings control rerecording when not streaming... or was my question misunderstood?


----------



## nottooloud (Jan 30, 2021)

Under Simple, Recording Quality sets the bitrate for you. Under Advanced, once you choose an encoder other than (Use stream encoder), you get bitrate settings.


----------



## free don (Jan 31, 2021)

nottooloud said:


> Under Advanced, once you choose an encoder other than (Use stream encoder), you get bitrate settings.


I do not get bitrate selection choosing x264 for the encoder. x264 seems to be the recommendation for me.  I see the bitrate setting is available if the encoder selected is the Apple VT H264 Software Encoder. Inserting a screenshot of some of my settings


----------



## nottooloud (Jan 31, 2021)

free don said:


> I do not get bitrate selection choosing x264 for the encoder.


In CRF rate control, the CRF number indirectly sets the bitrate.

OBSProject CRF discussion


----------



## free don (Feb 8, 2021)

That CRF discussion link above in thread post #13 (OBS forum not github apparently) titled "CPU Preset and CRF settings"  is a bit technical. For me, I need a good guideline or starting point. This is what I distilled from it.

Recording with OBS (I assume nothing else is open), this is the inferred recommendation
*I assume the "Encoder Preset" should be the same as the "CPU Preset" even if  you are not streaming to be safe.*

*Use the CRF rate control. Use the SuperFast preset*
*SuperFast makes the most sense for most people. (One commenter uses crf 15 ultrafast)     *
*Start around CRF 15 and move up till desired quality achieved. May be 18.*
*where drive space isnt critical, use a CRF a little less than you need. *
*Reduce size (downsample) later in post-prod.*

*CRF targets a certain quality level & will using whatever bitrate necessary to reach that quality.*
*CRF is variable quality. Bitrate changes depends on content. Can it spike? If so, can it be capped?*


----------



## nottooloud (Feb 8, 2021)

free don said:


> That CRF discussion link above in thread post #13 (OBS forum not github apparently) titled "CPU Preset and CRF settings"  is a bit technical. For me, I need a good guideline or starting point. This is what I distilled from it.


That all seems right, if you want to use CRF. I prefer to know what my bitrates are.


----------



## free don (Feb 8, 2021)

I want to know what my bitrates are in OBS too. It's often said in the forums *not to use CBR to record and that "CQP/CRF is the way to go"* and Andrew Whitehead.

Nottooloud; what are your preferred settings for high quality video recording without streaming? Fill these in if it's simpler:
*CPU, graphics, ram, fps, canvas and output resolution? 
Video Bitrate, Encoder, Encoder Preset , Quality, Format,  Encoder, Rate Control, CPU Usage Preset?*

Do you use zoom or some other application simultaneously on the same computer drawing system resources or do you use another computer another computer as an ndi or obs.ninja source?


----------



## nottooloud (Feb 8, 2021)

free don said:


> Nottooloud; what are your preferred settings for high quality video recording without streaming?


Sorry, that's not a thing I do.


----------



## SubbrSchwob (Apr 23, 2021)

I recently used the Apple VT hardware encoder on an old MacBook. It would not stick to maximum bitrate, which I had set to 6mbit/s (the connection wasn't good). Every now and then with too much movement in the picture it would bounce up to 8 or 9mbps, causing great trouble on the transfer. 

Any ideas about this? The old MacBook is too weak for x264 FullHD encoding.


----------



## Nass86 (Apr 26, 2021)

Hmmmm. I’m spitballing here. Assuming you have AMD.

You know how we can’t download drivers for the AMD graphics?

Maybe try updating the operating system to the latest one you can. Apparently that’s where updates seem to happen and that might do nothing but might also help.


----------



## Lopez903 (May 26, 2021)

I've also had issues with Apple VT hardware encoder, and don't know much about it. I stream local smash tournaments in my city. I recently streamed the Houston Tech Rodeo FGC Tournament this past weekend. At the HTR tourney we were experiencing some weird technical issues. I'd also like to know more about it to dispel some of the "mystique" around Apple VT 264 Hardware Encoder.

• My Computer Specs - Used for all the streams I'm involved with
- macOS Big Sur - 11.3.1
- iMac (Retina 5K, 27-inch, 2017)
- 3.4 GHz Quad-Core Intel Core i5 (7th gen)
- 8 GB 2400 MHz DDR4
- Radeon Pro 570 4 GB - AMD

This was a two day tournament. 1st day I did not notice anything out of the ordinary. 2nd day is when we had trouble. One point during the stream. OBS indicated that it was using 25300 kbps? We were streaming on Twitch and had set the bitrate to 5500 kbps. We also noticed the frames were dropping on stream and OBS was also indicating the 60fps were dropping to 23, 18, 43 during short bursts. Twitch chat noticed it early on.

The bottom UI of OBS did not show any "Dropped Frames" and it was sitting at 0.0 throughout the stream. But the part where it shows the 60 FPS would drop frequently and got worse as the tournament progressed.

 - Total Streaming Time: 8hr 56min

We checked the box "Limit bitrate" and that helped with the first problem.
2nd problem kept alluding us. Never had this happen before.

My normal setup during the tournaments I host back in my city are, Imac, 1 dslr camera connected directly via usb 3.0 port, and the El Gato HD60 S+, and up until the "Houston Tech Rodeo" ran "flawlessly".

This tournament we added a 2nd dslr camera also connected via usb 3.0, audio mixer, and 2 player webcams. We thought bc we were using a (Powered) USB 3.0 hub to connect the El Gato, 2 dslr cameras, 2 usb webcams, and the audio mixer that it was bottle necking? so we directly connected the "El Gato HD60 S+" to the Imac's usb port. Didn't fix it. We thought maybe it was the hdmi splitter but gameplay on the Player's monitors were unaffected throughout the tourney. We also tried updating "Game Capture" and see if that would help, and neither did. We closed out of other programs too. Only thing open was 2 chrome tabs, and OBS.

Maybe there were too many OBS scenes? My cpu usage was at 90% (displayed by CleanMyMac), and OBS was indicating CPU usage was around 50% - 60%. next to that was the 60FPS and that was dropping throughout the Smash tourney. Did notice when I tried "recording" the stream through OBS, frames dropped drastically (lower 10s). We were not using any custom "Stingers", for transitions we used "fade". Currently trying to recreate the problem, but the webcams and mixer were not my equipment, but am using 2 dslr cameras and the El Gato.

Houston Tech Rodeo FGC Showcase

Maybe CPU usage was just too high and needed to optimize my files better for OBS scenes? Would a hdmi video switcher like the ATEM mini help in future productions?

I'm new to this Forum. Let me know if this post is in the wrong place. But thought the discussion about Apple VT H264 Hardware & Software Encoder was very interesting and insightful!


----------



## SubbrSchwob (Jul 7, 2021)

I still got the Apple VT Hardware Encoder issue. It does not stick to the bandwidth limitation, I checked "Limit bitrate" for sure. I'm on a 2017 MacBook pro now. 

So far I use the h264 encoder, which the MacBook hardly can take at 720p. Luckily I don't have to use it for FullHD since my Atem Mini Pro switcher will do FullHD standalone (and only FullHD, it cannot do 720p). However I'm in the unfortunate situation that I have one client with 1.7mbps upstream max an so I need to tweak encoding settings.


----------



## bearcatjamboree (Mar 2, 2022)

I would be curious to find an actual definition of VBR versus CBR.

I haven't found anything that definitively shows that Apple VT264 encoding is VBR.  I tried a sample of about 1 minute with Apple vs X264 and the plots don't give much information on Bitrate Viewer because it only shows 3 samples of the entire file.  A full plot of both output (using plotframes) shows distinct differences in the overall frame types and rates, but nothing that I would call variable or constant for either format.

Mostly, Apple shows slightly higher iframe rates but lower bframe and pframe rates.  However, the higher iframes are more consistent with my max bitrate settings than what x264 shows.  I don't know...  I still see no reason to not use Apple VT264 encoding if it runs smoother for you...


----------



## bearcatjamboree (Mar 2, 2022)

bearcatjamboree said:


> I would be curious to find an actual definition of VBR versus CBR.
> 
> I haven't found anything that definitively shows that Apple VT264 encoding is VBR.  I tried a sample of about 1 minute with Apple vs X264 and the plots don't give much information on Bitrate Viewer because it only shows 3 samples of the entire file.  A full plot of both output (using plotframes) shows distinct differences in the overall frame types and rates, but nothing that I would call variable or constant for either format.
> 
> Mostly, Apple shows slightly higher iframe rates but lower bframe and pframe rates.  However, the higher iframes are more consistent with my max bitrate settings than what x264 shows.  I don't know...  I still see no reason to not use Apple VT264 encoding if it runs smoother for you...



Actually, the bframe and pframe rates are about the same.  The scale is being affected by the higher iframes.


----------

