Normally the framerate is determined by the timestamps on the video frames. Have you muxed the video into a container (e.g. with ffmpeg)? That would be the place you would set the framerate.lorddoskias wrote:Ok, but how do I do that. As I have said I tried setting the xFrameRate in encoder's output port definition.format.video and also by using OMX_IndexConfigVideoFramerate but the resulting video is still "slow". E.g. everything is in slow motion. What might be the reasons for that?
No, hello_video doesn't play the video at the correct speed. It can't - there is no timing information in a raw h264 stream. I believe OpenMAX defaults to 30fps.lorddoskias wrote:Hi Dom,
I'm not doing any muxing at the moment. Instead, what I'm doing is demuxing (via libavformat) mpeg2 stream, taking just the video and feeding it into an video_decode -> image_fx -> encoder -> outputing mpeg4 (CodingAVC) into an h264 file. When I do this, as I said the video is in slow motion. When I have identical setup without the image_fx component the video plays at normal speed. So far I have been omitting setting the PTS value into the decoder's input buffer's nTimeStamp field. In the hello_video demo the input buffer's nTimestamp field is also not set, yet the video plays at correct speed.
Code: Select all
General Complete name : C:\Users\dc4\Downloads\mpeg4.h264 Format : AVC Format/Info : Advanced Video Codec File size : 17.3 MiB Video Format : AVC Format/Info : Advanced Video Codec Format profile : High@L2.2 Format settings, CABAC : Yes Format settings, ReFrames : 1 frame Format settings, GOP : M=1, N=60 Width : 720 pixels Height : 576 pixels Display aspect ratio : 5:4 Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive
Because deinterlacing doubles the framerate. Each field produces a whole frame.lorddoskias wrote:Thanks, I will test muxing the stream and setting the framerate in the muxer. However, what remains mystery in this case is if I have an mpeg4 produced from the input mpeg2 stream but without the image_fx component it plays normally - at the same speed as the input? Why is this discrepancy happening?