Video Player



  • Peter JakackiPeter Jakacki Posts: 9,087
    edited 2020-05-16 - 00:20:46
    SDHC spec is 50MHz SPI. SD cards are obsolete.

    For my audio buffers I use a size of 3072 x2 to maintain smooth audio between frames.

    edit: 44.1kHz 16-bit mono samples btw
  • I think it is because audio and video are reading from the same stream, but marching to different beats...

    Need to get A & V in sync...
  • You might have to resample the audio so that you can get nice even sector sizes for the audio per frame perhaps? 2,940 samples/frame@30fps could be handled but messy whereas 3072 would be ideal. So resample 44.1k to 46.08k might make it easier. Having a separate file or a "file" embedded in the video would be easier still. You only lose a millisecond or so switching to another block read using sector pointers for video and audio.
  • RaymanRayman Posts: 10,895
    edited 2020-05-16 - 16:29:59
    Think I have it now... Had to increase clocks between audio samples for some reason...
    parameter3:=SamplePeriod +71   'tweak for smoother audio         'time between samples
    Not sure that 71 is optimum, but sounds good.

  • That's great, real fine work!
  • RaymanRayman Posts: 10,895
    edited 2020-05-17 - 16:57:47
    Here's the source code.
    I'm trying to post some example videos to my website. We'll see if that works... They are too big to attach here....

    Update. Some video settings were hard coded to this specific video. An update to the code is in the top post.
  • RaymanRayman Posts: 10,895
    edited 2020-05-16 - 18:47:54
    I posted the Windows .exe file that I used to create the video file and the source code and sample videos here:

    But, the sample video links don't work. Not sure why not...
    Download works now... Seems I had to .zip it up...
  • I added some instructions on how to create the bmp and wav source files on the link above...
  • I’m thinking we could do better upscaling ...

    Maybe I’ll try to figure out how pixmix works...
  • If you use another video where people are talking Rayman, how's the lip-sync?
  • I can post something but it’s really impossible to be off because the buffers are only the size of a single frame...
  • Did another video. Realized that some movie settings were hard coded for bunny movie, so posted updated code.
    This one has some dialog:

  • Once I get eMMC figured out, should be able to significantly improve quality...
  • I've got this working with PNut too now.
    Also, the cogless version of sdspi can now run the videos (although one needs 300 MHz clock to do it).
    Cogless speed much improved after removing a REP loop from the inline assembly.

Sign In or Register to comment.