Author Topic: nvid - Compressed video player for the Nspire  (Read 7024 times)

0 Members and 1 Guest are viewing this topic.

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
nvid - Compressed video player for the Nspire
« on: March 11, 2014, 10:02:05 pm »
Nvid is a video player for the Nspire. It is not the first such project, but it is unique in that it uses vp8 video. This allows long videos to be stored with a relatively small file size and good quality, although it results in somewhat slow playback.

Nvid supports both the Nspire CX, in full color, and the Touchpad/Clickpad in grayscale.

One example video is included, sintel.ivf.tns. To create your own videos, drag any video onto wrapper.bat in the "converter" folder. This creates a file called output.ivf.tns that can be transferred to the calculator.

Nvid does not have a file browser, so you need a version of ndless that supports file association. Run nvid.tns once to install the file association. After that, you should be able to open an ivf file and have it play.

Download here:
https://github.com/pbfy0/nvid/releases/download/v1.1/nvid.zip
Spoiler For File format details:
The file format is 320x240 YUV420P vp8 IVF. Any file of that format should work; you don't need to use the encoder.
« Last Edit: March 16, 2014, 06:32:20 pm by pbfy0 »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #1 on: March 12, 2014, 02:08:38 am »
I don't know about vp8-encoded videos so I'll ask questions.
Is it lossless ?
Is the compress ratio better than the one used in nspiremovieplayer (sorry, I can't give you a link, they are all broken on Omnimaga for the moment and I can't use Google to find the topic) ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #2 on: March 12, 2014, 08:28:56 am »
The compression is lossy. It plays movies that are about 1.5 megabytes per minute of video, compared to 4 for nspire movie player. The quality is also better.
« Last Edit: March 19, 2014, 07:29:58 pm by pbfy0 »

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #3 on: March 12, 2014, 08:43:56 am »
Looks cool. VP8 is the encoding used in Google's WebM, right?

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #4 on: March 12, 2014, 11:50:02 am »
Yes, although the player doesn't actually use the Webm container.
« Last Edit: March 12, 2014, 01:06:38 pm by pbfy0 »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #5 on: March 12, 2014, 03:08:53 pm »
Well lossy and more compressed than nspire movie player, but is it less lossy than nspire movie player ? :P
And I'll try that, but could you make screenshots or videos of it in action for the lazy ones ones who don't have their calc at immediate availability ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #6 on: March 12, 2014, 03:19:18 pm »
Sorry if I was unclear:
  • The VP8 codec is compressed lossily (ie, after decoding the result is not exactly the same as the original)
  • Nspire Movie Player also uses lossy compression (its format is a zip of jpegs, and jpegs are lossily compressed)
  • As a result of using a video codec, rather than compressing each frame individually, it can result in much smaller file sizes with similar quality.
« Last Edit: March 12, 2014, 03:23:45 pm by pbfy0 »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #7 on: March 12, 2014, 03:47:15 pm »
Ok, I got it :)

And I just tried it, indeed, quality is really great seeing how little space it uses. I got a full video clip in 7Mo only :D
However, it plays a bit laggy :(

And you should include a readme, I had to open your bat file to see what it does and understand what I have to do :P
You could also say that "ivf" is the extension you are using and that you must add in the cfg.

But great work overall ! :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #8 on: March 12, 2014, 03:47:57 pm »
I thought it added the association automatically...

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #9 on: March 12, 2014, 03:50:28 pm »
Oh, sorry, I forgot to read the first post again before trying x.x
But yeah, automatic installation is a thing you could say in the readme too, because some people who will download without reading that post (they can have heard of it from another website who gave the link without giving a description).
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #10 on: March 12, 2014, 03:52:39 pm »
I know, it is kind of slow. I have a few ideas for optimizations, but i'm not sure how much effect they will have. The README is a good idea, too.

Offline kevinkore3

  • LV3 Member (Next: 100)
  • ***
  • Posts: 57
  • Rating: +0/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #11 on: March 12, 2014, 06:20:58 pm »
Will the speed be better if the fps is reduced? I think this uses 24 fps while nspire movie player does 15 fps.

Offline pbfy0

  • LV2 Member (Next: 40)
  • **
  • Posts: 31
  • Rating: +7/-0
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #12 on: March 12, 2014, 06:24:18 pm »
Well, if the fps is reduced, it will play closer to the correct speed. However, it won't increase the framerate on the calculator; that will stay low.

Offline DJ Omnimaga

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55821
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: nvid - Compressed video player for the Nspire
« Reply #13 on: March 12, 2014, 11:16:32 pm »
I'll have to give this a try at one point, hoping I can use it on this computer.
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF


Bandcamp|Reverbnation|Facebook|Youtube|Twitter

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nvid - Compressed video player for the Nspire
« Reply #14 on: March 13, 2014, 10:15:09 am »
I am personnally too lazy to open a command prompt, and I am too lazy to edit the bat to change the input file and the output file names. What I want is just to drag and drop the file and have an output with the right name.
So I edited the wrapper.bat file and replaced the ".\ffmpeg ..." line with this one (basically, just change the end):
.\ffmpeg.exe -i "%1" -r 24 -vcodec libvpx -vf "scale='if(gt(a,4/3),320,-1)':'if(gt(a,4/3),-1,240)',pad=320:240:(320-in_w)/2:(240-in_h)/2" -f ivf "%1".ivf.tns

I just wanted to share in case other people are as lazy as me, or if you want to put this in your final release :)
With this, you could also rename the wrapper "drag over me.bat" or something.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s