Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video playback question #17

Closed
cyberluke opened this issue Aug 29, 2021 · 11 comments
Closed

Video playback question #17

cyberluke opened this issue Aug 29, 2021 · 11 comments
Labels
enhancement New feature or request

Comments

@cyberluke
Copy link

Hi, thank you for quick support of nanojpeg library.

I want to make the best dos launcher with downloading metadata from internet.

Can you give me a hint of some video player component that could be used as a part of Dojs UI? Any format. It can be Autodesk FLI or Mpeg or Mjpeg or Smack video component used in games.

@SuperIlu
Copy link
Owner

SuperIlu commented Aug 29, 2021

Up to now I guess you are out of luck with anything beside GIF animations.

But I'll look into video playback for V1.7.0
If you happen to find any library that supports a format you prefer do not hesitate to post here...

@cyberluke
Copy link
Author

I have had some experience with Allegro, but that was 20 years ago. So I raised question on their forums: https://www.allegro.cc/forums/thread/618492

I found FFMPEG for DOS/DJGPP and x264 here: https://sourceforge.net/projects/ffmpeg-x264-dos/ ...but that is for video encoding only. I have seen inside Allegro, they use ffmpeg.c file somewhere. Maybe it could be used to decode video and play it in some UI component (not fullscreen).

Something like 320x240 and 256 colours would be awesome (running 640x480 VESA mode or similar). Sound is not important, but would be definitely a plus.

Worst case scenario would be some OpenGL or 3dfx Voodoo only feature for this, which would make it only for a certain users, but still, it would be nice to have.

It could be then used to make something like Launchbox in MS-DOS and FreeDOS: https://www.youtube.com/watch?v=9Uzeh_nY2gU ...game launcher with information about the title and video.

@cyberluke
Copy link
Author

(or create a streaming video component that someone playing the game right now and you could join multiplayer via IPX to TCP bridge and VPN - there is some Raspberry tutorial and opensource project for this on Github)

@cyberluke
Copy link
Author

They have some API for video streaming here: https://liballeg.org/a5docs/trunk/video.html ...problem is the Xiph backend is only for Ogg/Vorbis, which is Directshow filter or Mac/Linux specific. The closest might be 3rd party download from Xiph.org - Helix Player with sourcecodes for Symbian OS and Linux. But I guess we would have to write some backend for Allegro 5.x Video API and it will not be their priority now.

@cyberluke
Copy link
Author

Found some more threads:
Allegro discussion about libtheora for DJGPP: https://www.allegro.cc/forums/thread/424556/424573
DUGL DJGPP libmpeg and libogg compiling: http://www.bttr-software.de/forum/mix_entry.php?id=5876&page=6&order=time&category=6

And finally here it is: DUGL Video player compiled in DJGPP with source: http://dugl.50webs.com/appgame.html

@SuperIlu
Copy link
Owner

Thanks, I'll take a look into this. I'd guess it would be necessary to skip JavaScript altogether when rendering videos, just getting an x and y position into the video object and doing the rendering on each frame w/o interaction.

in the DJGPP contributions seems to be a MPEG decoder library, I'll look into that, too...

@SuperIlu
Copy link
Owner

SuperIlu commented Sep 4, 2021

Sadly I have to rule out libmpeg2. The library is under GPL license and that would be incompatible with my code being under MIT license...
https://libmpeg2.sourceforge.io/

@SuperIlu
Copy link
Owner

SuperIlu commented Sep 4, 2021

I made some first experiments with https://github.com/phoboslab/pl_mpeg

  • Video decoding seems to work in DOSBox for small videos.
  • Audio is still an issue.
  • I have issues with corrupted memory I need to investigate further.

@SuperIlu SuperIlu added the enhancement New feature or request label Sep 10, 2021
@SuperIlu
Copy link
Owner

MPEG1, OggVorbis and FLI/FLC playback were added in v1.7.0

@cyberluke
Copy link
Author

Wow! Thans is totally awesome, and without SIMD instructions, that is a plus! Gonna benchmark it on 486dx2, then pentium.

@SuperIlu
Copy link
Owner

please share your results, I only tried on fast Pentium class machines for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants