Shop OBEX P1 Docs P2 Docs Learn Events
DeepFry prop video player (update 6/20/08) — Parallax Forums

DeepFry prop video player (update 6/20/08)

vampyrevampyre Posts: 146
edited 2010-06-13 03:20 in Propeller 1
alpha release, still a lil buggy, but it works

example video:
www.youtube.com/watch?v=KLeLwTQ4J3o

DeepFry is a prop application that will play color video files on your NTSC tv from your SD card
the videos are in .pvf format, a custom format.

AVI files can be converted using the freeware app virtualdub, and the included videomaker.exe utility

in this release, the audio is still a little glitchy, but it works well enough to make me giggle like a little girl tongue.gif I'm releasing it a bit early in case anyone wants to play with it. Please let me know if you are able to get it to play vids, or if you have trouble with it.

suggestions, bug reports or feature requests are very welcome

new new version attached:

Post Edited (vampyre) : 6/20/2008 7:09:46 AM GMT
«1

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-16 02:37
    Very Cool...


    Here's a converted video of the Quadrover..
    (I think I got this right..)


    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange

    Post Edited (Oldbitcollector) : 6/17/2008 10:41:09 PM GMT
  • vampyrevampyre Posts: 146
    edited 2008-06-16 04:58
    thats a great example video OBC, thanks for posting that conversion. looks great, i can even read some of the text which, is astounding at this low resolution. Plus its nice to know someone other than myself was able to get it to convert a video

    the video looks a little like it might be pausing, slowing down in places? and then the audio dies out. did you notice that or is it just me? maybe my SD card is badly fragmented

    couple of extra notes on this release:
    i didn't release the source code for the converter, but if anyone wants it i'll gladly post it. its written in plain old C (for dev c++) using the allegro gaming library

    very-soon-to-come future revisions include :
    120x96 resolution option and hydra support (thanks to baggers), non-clicky audio, a GUI for the converter, and the ability to adjust colors of the video your processing.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-16 05:04
    It looks like the audio is a little fast.. It seems to kick in early and end early
    for some reason. It doesn't sound off, just in the wrong spot.

    You'll get it.. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • vampyrevampyre Posts: 146
    edited 2008-06-16 05:29
    actually ,i think the audio plays just a tad slow (i had to slow it down a bit to get it to play at all in the code, the pitch of peoples voices will sound a tad low to those with good pitch detection). i was curious so i downloaded the same video (got mine from youtube) and converted it.

    the first difference i noticed was that my video comes out to about 10.3 megs instead of 20.something. when playing it it seems to work fine. My guess is that you dind't first convert your video to 15 frames per second? if you were using virtualdub its because that program is rather confusing when it comes to framrate conversion.

    to make things either easier (or more complicated , not sure which)... i created a settings file for virtualdub that people can download, with all the correct settings

    To use this
    1. start virtual dub, load your movie
    2. click file->load settings file (or press CTRL-L), and select the pvfmaker.vcf file
    3. export your video as usual

    if you try this please let me know if it works.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-16 05:40
    I'll try it in the morning.. But I think I see my mistake..

    I used "Change frame rate to: (fps)" and put 15 in the box,
    you have "Convert to fps" selected with 15.0000 below the option I used.

    Good idea to put the configuration file with it.. Will save everyone errors [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • BaggersBaggers Posts: 3,019
    edited 2008-06-16 08:14
    looks cool vampyre [noparse];)[/noparse] are you any closer to getting the audio sorted?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-16 21:37
    OBC:
    thanks a lot for trying it out, feedback is really helpful.

    Baggers:
    Yes and no. the sound is now much better than before, but i'm still having trouble wrapping my brain around non-linear code
  • BaggersBaggers Posts: 3,019
    edited 2008-06-16 22:22
    cool [noparse];)[/noparse] great fun working non-linear isn't it :P lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-06-17 00:16
    Wow. This is neat. So all those hydra games can have animated sequences now, right. Who wants to post MGS4 to the Propeller?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- uOLED-IOC, RGB LEDs, TLC5940 driver PCB
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • vampyrevampyre Posts: 146
    edited 2008-06-17 00:21
    It is a fun challenge, and the benifits are well worth it. I'm not sure i can figure out double buffering though.

    perhaps its the spin code, or perhaps my SD card, but i can't seem to load enough data quickly. at this point the sound is similar to an old scratched up record, which is acceptable to me for now. i think im gonna work on the converter until i have an epiphany about how to do the player better.

    Timothy:
    Thats actually my next planned move with this monstrosity, is to make a video-based game
  • BaggersBaggers Posts: 3,019
    edited 2008-06-17 08:56
    vampyre if you need help with the double buffering let me know, ps spotted a bug or two [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • PerryPerry Posts: 253
    edited 2008-06-17 10:53
    I have been following this thread closely trying to make "stupid video capture" with audio.

    Some concerns/thoughts..

    in the video code "Doug Dingus 07/07 Rev 1.0 For HYDRA " lines 132,133 and 256 there are references to a debug led
    this makes my proto board's SD card fail.

    there seems to ben no audio after "N I C E . . ." ???

    for better timing try this :
      SyncPoint := cnt
      repeat
         'load sound chunk 
        i := sd.pread(@mywavdata, 1024)
        if(i<1024)
          reboot
             'load video frame
        i := sd.pread(@displayb,HORIZONTAL_PIXELS*VERTICAL_PIXELS)
        if(i<1)
          reboot
          
         'wait for buffer to finish playing
    '    repeat while(mywavdata[noparse][[/noparse]1023]<>0)
    
        waitcnt(SyncPoint += 5_333_333)  '  force 15 Hz refresh
    
    




    Perry
  • CassLanCassLan Posts: 586
    edited 2008-06-17 14:41
    I can't get it to start, I just keep hearing a clicking so I'm assuming its reseting.

    I did copy the 'frog.pvf. vid that OBC posted onto my SD card.

    And PropDOS loads just fine with defaults, using that as a reference, my TV, KB, SD, Audio..etc all works.

    Any ideas?

    Thanks,

    Rick
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-17 14:44
    The video is not in sync with the audio..

    I will fix and re-upload that today.. Sorry

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • vampyrevampyre Posts: 146
    edited 2008-06-17 17:02
    Thanks much to everyone for the feedback

    Baggers:
    any help is greatly appreciated. what bugs have you noticed? I was hoping someone could help me with my logic, here's the basic concept i've got for double buffering:

      begin pseudocode:
    
       start audio player in separate cog
    
       repeat forever
          load first audio buffer
     
          repeat while second buffer is still playing
             wait here
    
          load first video frame
          load second audio buffer
    
          repeat while first buffer is still playing
             wait here
    
          load second video frame
    
     
      --wav player in new cog--
        
         j = true
    
         repeat forever
           if j = true        
              play first audio buffer
           else 
              play second buffer
         not j
    
    
    



    is this logically correct? It doesn't feel right to me, i wanna be sure my logic is right before i try to find bugs in the code.


    OBC:
    thanks again for that video. I'd been trying to think of some video i could post that wouldn't cause copyright issues. I dont think parallax will be terribly upset about putting a commercial for a prop-based-robot on the prop itself [noparse]:)[/noparse]

    cassian:
    this app was written for propdos or porthos, so if there is any error, it simply reboots. if you load the program into your ROM it will reboot over and over again on an error. is your tv screen red or black during the clicking?

    My guess is that your prop isn't set up the way mine is, and my code isn't smart nuff to know about it. what pins are your TV and your SD card hooked up to? Also what hardware platform are you using? i.e. , is it a protoboard, hydra, something custom made,etc?

    perry:
    OBC is correct about the timing issue, its a problem with that video file, not the player (not that the player is bug free by any means). the players speed is based on the speed of the audio, i.e. frames will only load as fast as the audio plays.
    also your right about the LED. I'll soon switch to baggers modified version of the driver which comments that out, as well as a few other nifty things
  • CassLanCassLan Posts: 586
    edited 2008-06-17 20:36
    Thanks for your reply,

    Well I've tried running it via PropDOS with the same results.
    I tried re-downloading the video with no luck.
    I can play wav's off the SD etc.

    TV - 12-14
    SD - 0-4
    I'll try the next release, if I get it working I'll let you know, sounds awesome!!!

    Oh and I'm using a protoboard with OBCs design suggestions in the CookBook.

    THanks,

    Rick
  • vampyrevampyre Posts: 146
    edited 2008-06-17 21:42
    Cassian:
    Thanks for your feedback. As per perry's note in this thread, some protoboard users may experience problems ( I use one, and i havn't got the problem ) but the next version will fix that error. in the meantime if you want to try to find the problem, try fryview, if that works for you then we can assume the problem isn't the video driver.

    fryview can be found here :
    http://forums.parallax.com/showthread.php?p=730288
  • vampyrevampyre Posts: 146
    edited 2008-06-17 21:44
    Minor update to the converter, its now much easier to use.
    still a bit of a hassle to set up, as it still needs virtual dub, and i can't bundle that with the converter for liscensing issues, but once its set up, converting is now all automated. you just copy your video into the directory , run the batch file, and watch the pretty colors, then bam, u have a PVF file

    the new file is linked in the first message in this thread

    Post Edited (vampyre) : 6/18/2008 5:34:49 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-17 22:32
    Ok.. Took a little time from my current project to *properly* convert some video for deepfry.

    A proper quadrover video
    jeffledger.googlepages.com/quadrover.zip

    Paul @ Parallax doing a temperature test on the Demoboard
    jeffledger.googlepages.com/paul.zip

    A little cool surprize..
    jeffledger.googlepages.com/spaceace.zip

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • CassLanCassLan Posts: 586
    edited 2008-06-17 22:50
    Hey vamp,

    ok I DLed fryview, tried to convert the sample cat PPM image via PropDOS and when I hit enter after the settings screen, the screen goes blank until I reset the prop. No PGF gets created.
    The color test works though.

    Rick
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-17 22:54
    Rick,

    Did Spudview (the project this is based from) work with your setup?
    That would eliminate the video driver from the problem..

    BTW, I need to update the Cookbook, but I've been running SD on 16-19
    for a while now.. It frees 0-7 for use as a experimentation/game port if you
    use the SpinStudio setup.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • CassLanCassLan Posts: 586
    edited 2008-06-17 23:27
    I had the same issues as Perry, I REMed lines 132,133 & 256 from mashedpotatos and it solved it!!!!!

    Thanks for the patience guys.



    @OBC

    I REMed those same lines for the fryview and it worked, although it made my dogs look evil. tongue.gif

    Post Edited (casslan) : 6/17/2008 11:47:52 PM GMT
  • vampyrevampyre Posts: 146
    edited 2008-06-18 00:54
    thats great to hear cassian, it sounds like that code is a real problem, i'll make that a higher priority.. my prop isn't hooked up at the moment (kids abducted my television to play games on) but im looking forward to seeing your dogs. on images that simply refuse to co-operate i turn the saturation down to -255 (and make the image black and white). Try remarking out those same lines in the mashed-potatos driver for deepfry and that should fix your problem

    OBC:
    i am really looking forward to seeing those vids, thanks so much for posting them. out of curiousity, did you use the new converter i posted today or did you do all three of those the old fashioned way?

    I've noticed an audio sync problem i think with the longer videos, i need to check my settings
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-18 04:32
    Sorry, I used the old method.. (old dogs, new tricks...)
    I'll give the other a go on the next conversion...

    BTW, SpaceAce looks awesome on my little 7" LCD screen. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • CassLanCassLan Posts: 586
    edited 2008-06-18 05:17
    I used your converter script...WAY EASY.

    Very nice and simple. Sound is still a tad out of synch though, I'm sure you'll work it out.
    I'm impressed by the high frame rates.

    Here is a good fight scene for the masses:
    (its a little bigger than the limit of uploads here - 10MB)

    http://www.cassidydevelopment.net/dl/dragon.rar

    enjoy,

    Rick
  • vampyrevampyre Posts: 146
    edited 2008-06-18 21:52
    thanks for the video , and for trying out the script. i think the sound sync problem is with my virtual dub settings. im working on those now

    still having trouble with double buffering, could definately use help with that if anyone wants to toss me a bone

    as for frame rates, i believe that this (at 15 fps) is gonna be the limits of spin code unless i find a smarter way to to do it, that being said im quite happy with it. once i get the audio bugs worked out, and add the modified driver i think i'll call it done
  • PerryPerry Posts: 253
    edited 2008-06-18 23:14
    the sound is not staying in sync with the audio

    try this:

    add a variable
    var
    long ii
    
    



    after you read the audio from SD
    
    ii:=0
    
    



    in the player cog loop use:
     repeat
          repeat ii from 0 to 1023
             NextCnt+=5550 'should be 10000 for 8 ksps
             waitcnt(NextCnt)
             FRQA:=(byte[noparse][[/noparse]@buff1+ii])<<24
             FRQB:=FRQA     
    
    



    you make ii global so that you can reset the audio play cog every time you read from the SD.
    audio is way cleaner !!!
    I have changed wplay in "PropDOS" to this so I can play named files

    Perry

    Post Edited (Perry) : 6/18/2008 11:20:38 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-18 23:36
    Perry,

    Would you mind posting your complete code for this? I'm a little lost..

    Thanks
    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-19 00:05
    Playing with the audio section, I was able to knock out a lot of click with the following adjustment..

     repeat
          repeat i from 50 to 1023
             NextCnt+=5550 'should be 10000 for 8 ksps
             waitcnt(NextCnt)
             FRQA:=(byte[noparse][[/noparse]@mywavdata+i])<<24
             FRQB:=FRQA     
             rate := byte[noparse][[/noparse]@mywavdata+i]~
    
    



    @Perry, still want to see what you are doing..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • PerryPerry Posts: 253
    edited 2008-06-19 00:53
    Attached is a work in progress "Prop VideoDOS"

    at command line entry type in
    vplay frog.pvf ' or other filename

    my micro A/V Protoboard setup:


    Device             I/O  Pins
    
    SD card             0,1,2,3
    Video IN            4,6
    Comp Sync IN         5
    INFRA Red            7
    Audio IN            8,9
    Audio OUT         10,11
    Video OUT          12,13,14, (15 for VHF audio)
    
    



    Perry

    Post Edited (Perry) : 6/19/2008 1:02:11 AM GMT
Sign In or Register to comment.