Hi,
I’m using the Multimedia API to create an h265-encoded video file. I mostly follow the samples coming with the API, with some specifics for our project (converting a bgr8 ROS image message to yuv444 before sending it to the encoder).
The generated file looks fine to my eye, it plays just nicely in the Ubuntu video player. What concerns me is that the generated file doesn’t seem to have proper information about the FPS and the play length. I explicitly set the FPS to 30 in code, but the file reports 25. It plays for roughly 7s, but reports a length of 0s in the file properties, and I cannot scrub it in the player.
When I inspect the file through opencv (opening itwith a cv::VideoCapture) and request the number of frames, I get an invalid value (reports back -2147483648 frames), so I assume it can’t find the information.
I read here: NVIDIA Multimedia APIs with UYVY sensor - #9 by forever3000 that h264 doesn’t have any framerate information in the file. Is the same true for h265? I couldn’t find any information about it. Also, how am I supposed to handle this? Do I have to put it into some kind of container?
As far as I understood, there is no manual header or trailer creation needed. If this is right and out of curiosity, how is the file length then retrieved by a video player? I kinda suspect that what I see is expected behavior and that I am missing a step in making a properly setup video file (again, using a container maybe? Muxing?).
Additional information: When I encode as h264, I get roughly the same results, with the difference that the file gets played back in the video player at a crazy speed, like it’s done in a fraction of a second. Again, I suspect it to be related to missing FPS information.
Thanks for your help,
Konstantin