-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
openmax h264 sps timing_info (fps) is not not generated #245
Comments
@xlazom00 is this still an issue? |
still |
I can see the code that controls this, but don't know enough about the bitstream to be happy to change it arbitrarily as it will change the behaviour for all clients of the codec. @popcornmix what's your view? (h264_symgen.c!1148 wants to be conditional on something else, not SEI control flags) I guess if ffmpeg does look at this field, then it would mean all camera recordings would get the correct framerate when people throw the stream into a container, in which case perhaps it is a more sensible default. |
@6by9 is your thought just to drop the check for FLAG_ENABLE_SEI_TIMING? i.e.
so we always write timing information? |
I was thinking of a new flag, but probably setting video_encode's default to enable the timing with the option to turn it off. I don't have enough of a feel for what impact this has for other use cases as it is too far down into the bitstream detail for my knowledge. Is Deborah still contracting for Pi Towers and able to comment? I've lost GV as a person to ask annoying questions. |
Yes, enc->params.bitrate seemed a surprising condition. No contact with @deborah-c for several weeks. @luke99 any opinion here? |
Sorry: have been watching quietly, but I still don't really have the brainpower to do much useful with code. I suspect that the test is like that because the source of the extra data required is the same, but it would be best to ask Graham
|
Hi @deborah-c. I guess the question is if enabling this by default will cause problems for any use cases. It seems unlikely to me (apart from a negligible increase in number of bits to encode). One option is to enable it and see if any problems emerge. |
If I still shared an office with GV then I would have hassled him, but I haven't since about January :-( Seems a bit cheeky to ask these questions on Facebook. @popcornmix I agree that it will only increase the size of the SPS by a few bits, and typically that isn't repeated. |
I have a patch that will hopefully work - I'll try to make up a test firmware over the weekend. A new parameter MMAL_PARAMETER_VIDEO_ENCODE_SPS_TIMING / OMX_IndexParamBrcmVideoAVCSPSTimingEnable to enable the extra metadata. It is disabled by default. Actually the test on bitrate is valid as the SPS has bitrate related parameters in there which are independent of frame rate. |
@xlazom00 Just noticed I still have my test commit sitting on my tree but I never sorted out the image to be tested. Is this still something you can test if I do sort out an image? |
raspberrypi/firmware#440 Also adds an option to add SPS timing option into H264 headers. raspberrypi/firmware#245 Both features untested but believed correct.
Test firmware pushed to my RPiTest repo which includes an option that will hopefully set the requested parameter. |
firmware: Camera: Set AWB mode on starting encode See: raspberrypi/linux#1196 firmware: video_encode: option to add timing data to SPS header See: #245 firmware: resize: add support for opaque images on the input See: #440 firmware: Add IL ISP component firmware: Add option to disable touchscreen on Pi display firmware: hdmi: Accept EDID even if checksum is wrong on final read pt 2 See: http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0 firmware: dt-blob: Don't assign i2c0 to p28 and p29 on a Pi Zero See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=127292 firmware: platform: Bump default sdram to 450 on Pi0 firmware: mailbox: Add support for enabling/disabling v3d
firmware: Camera: Set AWB mode on starting encode See: raspberrypi/linux#1196 firmware: video_encode: option to add timing data to SPS header See: raspberrypi/firmware#245 firmware: resize: add support for opaque images on the input See: raspberrypi/firmware#440 firmware: Add IL ISP component firmware: Add option to disable touchscreen on Pi display firmware: hdmi: Accept EDID even if checksum is wrong on final read pt 2 See: http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0 firmware: dt-blob: Don't assign i2c0 to p28 and p29 on a Pi Zero See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=127292 firmware: platform: Bump default sdram to 450 on Pi0 firmware: mailbox: Add support for enabling/disabling v3d
@xlazom00 The change got merged. Any comment on it? |
it is ok now |
btw as I do with OMX_CONFIG_FRAMERATETYPE in my example |
It's off by default as I don't know enough about the decode side to know what most decoders expect. @deborah-c do you have any knowledge of whether decoders really pay attention to this flag and is it actually worth setting by default? |
without fps information decoder don't know how to present video If you have for example camera that don't generate exact 25fps (CCTV cameras/system) but for movies/tv it is always constant so it is useful information |
I've always encountered timestamps being stored in the container. I'm not aware of anything using the framerate from the H264 headers, hence why I wasn't wanting to enable this by default without good cause. My knowledge is mainly from the camera and encode side, hence asking others for their opinions for general decoder behaviour. |
@xlazom00 if this issue has been fixed, please close it. Thanks |
firmware: Camera: Set AWB mode on starting encode See: raspberrypi/linux#1196 firmware: video_encode: option to add timing data to SPS header See: raspberrypi#245 firmware: resize: add support for opaque images on the input See: raspberrypi#440 firmware: Add IL ISP component firmware: Add option to disable touchscreen on Pi display firmware: hdmi: Accept EDID even if checksum is wrong on final read pt 2 See: http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0 firmware: dt-blob: Don't assign i2c0 to p28 and p29 on a Pi Zero See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=127292 firmware: platform: Bump default sdram to 450 on Pi0 firmware: mailbox: Add support for enabling/disabling v3d
h264 SPS don't have timing_info fps information.
It looks like openmax api api don't propagate this value
from OMX_VIDEO_PORTDEFINITIONTYPE or OMX_VIDEO_PARAM_PORTFORMATTYPE
xFramerate for exampe.
The text was updated successfully, but these errors were encountered: