Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple H264 Encoder doesn't work with hardware decoders? #76

Open
kristen-movares opened this issue Jun 1, 2022 · 2 comments
Open

Simple H264 Encoder doesn't work with hardware decoders? #76

kristen-movares opened this issue Jun 1, 2022 · 2 comments

Comments

@kristen-movares
Copy link

Running the Simple h264 Encoder with RTSPServer and into VLC, when VLC has hardware decoding enabled it just shows a black screen but when disabling hardware decoding the stream is shown just fine.

Is it even possible to support hardware decoding or does that then require compressing the frames?

We're using the Simple H264 encoder to render a placeholder nal packet when streams aren't live.
It would be nice if the whole encoding proces wasn't needed and we could just resend the previously encoded nal packet.
Suggestions or ideas are welcome, i'm kinda clueless when it comes to NAL stuff.

@RogerHardiman
Copy link
Collaborator

Had never thought of using the simple encoder as a placeholder NAL.
On my projects I capture the NALs for my placeholders and save the in a file and use that.

You can do that easily.
Suppose you have a JPEG
You can do something like ffmpeg -i picture.jpeg outputfile.264

This will give you a H264 file representing your one JPEG.
I then play that file out as my placeholder NAL.

Your .264 file will end up with headers starting either 00 00 01 or starting 00 00 00 01 for each part of the video, first the SPS data block, then the PPS data block and then one or more NALs that make the image.

@kristen-movares
Copy link
Author

kristen-movares commented Jun 7, 2022

Don't the Nal packets contain timing info? replaying the same packet seems to cause issues for us? currently we reencode the same frame constantly, which i think isn't needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants