This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6446 EVM Encode Demo - Altering Frame Rates

Hi DSP Community, 

Regarding your encoder demo that comes with the DM6446 EVM, I cannot seem to determine what is setting the written file's frame rate.  Also, how do the macros FBIOPAN_DISPLAY and FBIO_WAITFORVSYNC relate to the method calls in the code? (I assume that those macros are defined in some system header files, somewhere, since they do not appear in the code.)

How do I set the frames per second in the encoded video files (writer thread)? (When playing back a file that I encode at four frames per second in Windows, it plays back much faster, and when playing the same file in Linux with mplayer, I have to specify the frames per second to mplayer, since mplayer cannot find it in the H.264 header.)

Any information on this is appreciated!

 -Jon

  • Jon,

    1) The FBIO "macros" are really defines which identify the set of requests a Linux user application can send to the FBDev driver (a.k.a frame buffer driver).  As you can guess, these driver requests are defined at the driver level in corresponding header files.  The user application (e.g. encode demo), simply includes the corresponding header file and uses the Linux standardized calls to send these type of requests to the driver level.  If you need more details on how drivers work in Linux, please see http://lwn.net/Kernel/LDD3/

    2) Our codecs only deal with elementary streams; this means no header information is found with regards to frame rate, size... of video in file produced by demo.  You can stick some delays in the user application (e.g. decode demo) source code to slow down the rate at which the user application reads and display data from the file, but this is very different than adding this sort of information into the encoded file.  If you want to add a transport stream type header for all applications (mplayer, windows media) to use to determine refresh rate, resolution, aspect ratio and such...this is a much more complex task and requires you become familiar with MPEG standards (define transport stream format, including header).

    I hope this helps point you in the right direction.

     

  • Juan,

     

    Regarding the file playback rate, do you have some links to the appropriate MPEG standards (in particular the parts of the standard that define how to create the header information)? You would not happen to have an application that creates that header information, already, would you? (In my last, WinCE based DM6446 application, none of this was a problem. So, the libraries that we were using must have produced the correct header information...)

     

    Have a great day!

     

    Take care,

    Darwin

  • Juan,

     

    BTW,  O'Reilly does not document anything related to the Linux framebuffer driver, but thanks for the link. If you do have any documentation on T.I.'s framebuffer implementation, macros, etc. that would be greatly appreciated, since there is very little documention on the framebuffer ioctl() calls, at least as far as I have been able to uncover.

     

    Have a great day!

     

    Take care,

    Darwin

  • If you go to the kernel root directory (ti-davinci) and then go to

    .../Documentation/fb

    you will find documentation on the framebuffer driver.  Please note that this documentation was not written by TI; frame buffer driver (like may driver under this Documentation directory) is based on Linux standard APIs.  TI adheres to these APIs and does not define them or document them.  You should be able to find additional documentation online.

  • I do not have access to MPEG standards, but have worked with them before.  These can be quite complex and are made up of many documents.  At the PES level, I believe they have a header that defines resolution, frame rate...; at the transport level it also has PTS and PCR information to help you keep audio and video in sync (in case network is too fast or two slow).  Your best bet maybe to try an open source program such a GStreamer which probrably has this functionality built-in; I believe someone even wrote an App Note on GStreamer for DM644X ( http://focus.ti.com/dsp/docs/dspsupporttechdocsc.tsp?sectionId=3&tabId=409&familyId=1302&abstractName=spraaq9 ).

  • In addition to the standard API references Juan mentioned there are some TI written documents in dvsdk_x_xx_xx_xx\PSP_xx_xx_xx_xxx\docs\dm644x that may also be of help, note that these were not available in the earlier versions of the DVSDK (so if you do not see them you may want to get a newer version from www.ti.com/davinciregistration).