-
Notifications
You must be signed in to change notification settings - Fork 29
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
Not able to utilize kCVPixelFormatType_32ARGB for custom encoder/CustomVideoSource #80
Comments
or kCVPixelFormatType_32BGRA for that matter. |
h264 is ingesting a 12-bit image. Red5 Pro converts from 24 to 12 internally as a convenience for the end user -Holden |
@HoldenMills thanks for the feedback. So it is required to use 24rgb - Ill need to use the Accelerate .framework to do a fast conversion.
or are you saying that its ok for me to do kCVPixelFormatType_32ARGB because red5 will skip the bytes on the 32 bit image? |
You will need to convert it 24rgb. The alfa channel will not work with Red5 Pro. |
@mrchrisallen do you have a spec with the exact format that is requried for the r5_media_type_video_custom? My use case is Im doing a full screen UIView capture so depending on some devices I will be auto scaling down to a fixed size for the frame - but it will always maintain a specific aspect ratio. Thoughts? Do you have any code that properly formats a UIImage to the specifics needed for |
We don't have a spec on this, but I will track down more info now that we understand your use case. Stay tuned! |
@mrchrisallen got it working :), one trick other then the pixel buffer stuff I had to do was... audio is required otherwise the video wont render...Dont know why this is. And btw the audio is very latent, like 2 secs compared to the video stream. Ill make a new bug on that. |
Okay excellent! It might actually be helpful to get an Xcode project that reproduces the issues you are seeing (using your custom video source). We can then debug it ourselves over here. |
@mrchrisallen Ill work on getting you a sample to send privately. |
@mrchrisallen emailed sample proj (info in the readme I supplied) to @HoldenMills |
@theprojectabot Okay, fantastic! Thanks for doing that. We will check it out and get back to you. |
@theprojectabot Hi, as you have successfully 'stream' to the publisher through CustomVideoSource sample. Can you please help me to do that. I am unable to understand how I can do that. If you can send me one sample, how i can do that. I will be very thankful to you. Please help me. |
In the CustomVideoSource sample it constructs a frame of kCVPixelFormatType_24RGB and submits to the encoder.
Here I am constructing a frame from a UIImage that is of type kCVPixelFormatType_32ARGB
It seems I am able to successfully 'stream' to the publisher but when viewing a web client there is not visible frame. Just white. Looking at red5pro server logs it does look like its 'working' - Im under the impression that perhaps the R5VideoSource doesnt support kCVPixelFormatType_32ARGB?
The text was updated successfully, but these errors were encountered: