Shop OBEX P1 Docs P2 Docs Learn Events
Video Player - Page 2 — Parallax Forums

Video Player

2»

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-05-16 00:20
    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
  • RaymanRayman Posts: 13,859
    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: 13,859
    edited 2020-05-16 16:29
    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: 13,859
    edited 2020-05-17 16:57
    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: 13,859
    edited 2020-05-16 18:47
    I posted the Windows .exe file that I used to create the video file and the source code and sample videos here:
    http://www.rayslogic.com/Propeller2/P2Video/P2Video.html

    But, the sample video links don't work. Not sure why not...
    Download works now... Seems I had to .zip it up...
  • RaymanRayman Posts: 13,859
    I added some instructions on how to create the bmp and wav source files on the link above...
  • RaymanRayman Posts: 13,859
    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?
  • RaymanRayman Posts: 13,859
    I can post something but it’s really impossible to be off because the buffers are only the size of a single frame...
  • RaymanRayman Posts: 13,859
    Did another video. Realized that some movie settings were hard coded for bunny movie, so posted updated code.
    This one has some dialog:

  • RaymanRayman Posts: 13,859
    Once I get eMMC figured out, should be able to significantly improve quality...
  • RaymanRayman Posts: 13,859
    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.