H264 Concept Pro

0 views
Skip to first unread message

Rafa Ostermann

unread,
Aug 4, 2024, 12:09:52 PM8/4/24
to carrentnterres
I was trying to learn a bit about h264 by looking at the bitstream of a video file with a hex editor. I found here the start codes for a video object planes (0x000001b6) and for i-frames (0x000001b600).
But I can't find many of those bytes in video files. Most of the time those start codes appear at the beginning of a file with only a few bites in between. I expected them to show up very regularly, in equal distance all over the file!?
The 0x000001b6 start code applies to mpeg-4 part 2 video which is the simple profile. This corresponds to codecs such as XVID and DIVX. H.264 is mpeg-4 part 10 which is the advanced video coding profile. H.264 uses different start codes.
I am not as familiar with part 10 as I am with part 2, but a brief look through the standard (ISO 14496-10) shows that the bitstream is broken into sections called NAL units. These units have the 24 bit code 0x000001 preceding them for synchronization as per section B.1.1. The following byte is made up of the fields forbidden_zero_bit, nal_ref_idc, and nal_unit_type as per section 7.3.1.
Working on a customer issue where a call fails to connect because Asterisk is unable to find a codec translation between slin and h264 which is expected as slin is audio and h264 is video. Both the outgoing and incoming trunks have
disallow=all
allow=slin
allow=h264
there are massive differences in different encoders AND different settings within that encoder, so lets say you create a h264 in ffmpeg/shutter encoder with NVENC low latency/quick and with X264 software set to 2-pass max quality - both set to 20Mbit/s you will see a difference!
So you can do a better job than many and make those juicy high quality h264s, yes it takes a tiny bit more encoding time, and is more for final delivery but nontheless lets talk about h264 encoding settings and my personal recommendation for those High Quality H264s . I am sure someone will come up with even more better settings if I just act like a know-it-all so here we go!
What does flame use? Tech-geeking not withstanding, my choice of an h264 encoder is based on its flexibility in my workflow. No one has ever complained about the quality. Shutter encoder has some great features, like being able re-patch audio tracks, but other than that, I find it cumbersome with organization. Media Encoder, though not perfect, gives me far more management options.
Some time ago I discovered that, at least with handbrake, using 10 bits as output, makes (with good quality settings, 25 -30 Kbs) visually identical from the original. Checked even with a difference. Even with very good color fidelity. A good point to send dailies or wips where this is critical.
Hi, yes this has been asked before. It's the kind of thing you only notice at 3am when you're doing the most boring predictable work in existence. Oh that fundamental, basic, most boring feature of being able to export your video in a standard high quality, low file size format?
Please, for the love of god, let us export h264 again from After Effects. You clearly have no concept of how buggy and bloaty media encoder is, and how overkill it is just to export a h264 movie file. At LEAST support this file format - the most popular format in existence today.
Buy AfterCodecs, which allows you to create h264 directly from AE (as well as many other formats).
Or, if you want the AE team to spend their time re-writing their own way to do this instead of working on other things, you could make a request (or vote on an existing one) on the UserVoice site: Adobe video & audio apps
Hou can render your production master and create an h.264 proof for your client or you to review two or three times faster than it takes to use AME or an older version of AE. You can take full advantage of the Render Cue's more efficient handling of GPU accelerated effects and alternative rendering engines, and keep working in AE all the time you are rendering. No sleep is lost, no productivity loss, and you will not ever again waste time waiting for renders, or heaven forbid, taking the time render the comp again to make a production master or DI when the first render is approved. If you are paid for your time then RG will pay for its self the first time you render anything that would have taken an hour to render.
I would suggest that Adobe buy out and integrate After Codecs. Management should seriously consider this. It would be like if Maya didn't let you render... or if a great restaurant didn't supply cutlery.
AfterCodecs and RenderGarden are just wrappers for ffmpeg. They simply tell AE to render a frame sequence (you can run that as a set of parallel jobs, hence the lauded speed improvements), then they pass the folder of images to ffmpeg's command-line encoder. You can do the same thing yourself for free, you're paying for a user interface that manages the workflow automatically.
So in terms of H.264 encoding (or any other codec) there is nothing of value to 'buy out', and since ffmpeg is GPL-licensed code Adobe cannot integrate it into their products without a Pandora's Box of legal issues - not least the fact that ffmpeg violates Apple's trademarks by encoding ProRes. We've already seen what happens when trademark lawyers get in touch with Adobe.
I agree that AME can be a dog's dinner depending on which options and hardware you are using (e.g. the hardware acceleration shuts down if you pick the wrong flavor of bit-rate, and XMP hasn't seen any attention since the last century) but now Adobe doesn't have to waste time with AE's legacy output libraries they can concentrate more effort into making it work properly.
I would say this is kind of a vicious cycle. Those problems are all around After-Effects.
You can't export h.264, you can't copy-paste keyframes over multiple layers, there are tons of legacy issues that exist and would take precious time and effort to solve and are in deep need of a fix for years now. The problem is that this adds up, and while Adobe is a collective of human beings and we should not expect them to magically solve all our lives problems there are still 2 questions that arise:
1. If adobe, the multi-billion dollar company and major monopoly of the creative software industry who's being paid monthly by millions of users can't put its time and effort into solving those key issues in their software, who can?
Now again this is not to disrespect the people at Adobe, but is there really no viable solution for these problems? Exporting h.264 which is one of the most popular codecs in the world right now does not exist in After Effects, but does exist in Media Encoder, both owned by Adobe. It's not like Media Encoder is some magical piece of software that runs seamlessly and is nice to work with, many people will agree it is problematic, buggy, and slow to render through.
2. How many of those things would've been solved already if Adobe had more competition?
Even though those questions are hard to answer and may raise conflict, they are important for a user base as big as us.
I can imagine how hard of a work it is to maintain and develop such a big software as After-Effects, but the criticism is still valid and there is no need to dismiss it. At the end of the day, we all just want to be able to work faster in better software with as few barriers as possible between us and what we make. Fighting Adobe Media Encoder just to render a video through After Effects, a software that makes videos, is a big barrier and it makes sense for users to speak up about it.
For anyone that might come to this thread and found the douch*** answer given by (you could figure it out) the simple solution it's just to go to apple and download Quicktime for Windows or IOS depending what you have (even easier just search it "apple Quicktime" on google) once download restart AE and you there you have it.
At this point I am just engry and disapointed this is still a issue. Why can the free version of DaVinci Resolve do a fast and smooth H264 export and the the software I have paid thausands of dolars over the last 10 yers fails to agnolage that there is a huge demand for H264 export in AE.
Telestream specializes in products that make it possible to get video content to any audience regardless of how it is created, distributed, or viewed. Throughout the entire digital media lifecycle, from capture to viewing, for consumers through high-end professionals, Telestream products range from desktop components and cross-platform applications to fully-automated, enterprise-class digital media transcoding and workflow systems. Telestream enables users in a broad range of business environments to leverage the value of their video content.
x264Encoder is an encoding engine that produces video in the H.264/AVC standard. It is free, and developed by Takashi Mochizuki. Takashi-san was kind enough to make his x264Encoder compatible with ScreenFlow. When asked why he developed the codec, Takashi explained:
To use the x264Encoder with ScreenFlow, you simply download it and place the component in your /Library/QuickTime folder. Takashi has created a few simple instructional videos on his YouTube channel if you run into any trouble. When you restart ScreenFlow you will see x264Encoder as an available codec in the Export customization options.
As for why he chose the settings he did, Craig explains, In the x264Encoder-specific options, I disabled Faster First Pass in order to get the most reliable information possible during the analysis pass. Upon comparison of encoding with this set to either Disabled or Turbo2, there is little difference in the encode time, so I suggest disabling it for the best quality.
As you can see, the one output with H.264 (top) clearly starts breaking up during the screen zoom, and on certain movements. Whereas the x264Encoder movie maintains a crisper image throughout all the movements. Craig contends he had to raise the data rate of the Apple H.264 codec to 800 kbps to achieve the same quality results as the 200 kbps with the x264Encoder. When I did this with the 23-second movie above, the size of the movie went from 856 KB to over 2.5Mb!
3a8082e126
Reply all
Reply to author
Forward
0 new messages