Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Encode a sequence of images into video  (Read 1777 times)
0 Members and 1 Guest are viewing this topic.
Offline lisandroCT

Innocent Bystander

« Posted 2015-10-19 14:02:17 »

Hi! A key feature in my current game is recording videos of the screen. I've already manage to build a pretty decent library that is able to save screenshots at certain fps without affecting the game performance at all. Now I need to encode those stills into a video.
What do you consider the best way to follow? I need a cross platform solution that can do all the job inside the app, not depending on external apps or program.
I've consider ffmpeg but it's not Java and I think it wouldn't be so trivial to wrap it in Java and port it to Android and iOS.
There is a (not so good) Java library called JCodec that runs on desktop and Android, too. But I don't know how well it will behave on iOS and it's pretty limited.
And I've even consider using gdx-video because I think it wraps some of ffmpeg functionality, but if i'm not wrong it's only able to decode and I don't know if it runs on iOS (and there isn't so much documentation)
Do you know any almost native solutions for each platform? What path would you take?

Thank you in advance! Any idea (even vague) will be appreciate!
Offline KaiHH

JGO Kernel

Medals: 657

« Reply #1 - Posted 2015-10-19 14:38:56 »

If you are familiar with how to write JNI libraries, I would recommend making a binding for libx265/HEVC, if you don't need a whole array of different video/audio/subtitle codecs in your game and want to keep things small. libx265 has a very decent build process, also working out of the box on Windows/msvc. No other library I know of has this ability. Smiley
If you need multiple such codecs then FFmpeg really is the best shot there is.
libav is not worth talking about. It is goddamn slow.
If you choose FFmpeg then there is Xuggler, which provides a JNI binding more or less with a custom API for FFmpeg.
And you would need to build FFmpeg for each of your target platforms.
For iOS there seems to be:
For Windows this one is great:
Or if you don't want to build yourself on Windows, then Zeranoe is of course the solution:
Offline KevinWorkman

« JGO Plugged Duke »

Medals: 287
Projects: 12
Exp: 12 years - Coding Tutorials!

« Reply #2 - Posted 2015-10-19 15:57:51 »

I've used FFMpeg to do pretty much exactly what you're describing. It wasn't very hard. Here is an explanation of what I did. You'd just need to get rid of all my OpenCV stuff and substitute your own screenshots in. - Coding Tutorials!
Happy Coding forum - Come say hello!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline basil_

« JGO Bitwise Duke »

Medals: 418
Exp: 13 years

« Reply #3 - Posted 2015-10-20 18:26:50 »

i still have to try it out by myself .. last time i looked for java flick encoding i ran into which looks pretty interesting.

Pages: [1]
  ignore  |  Print  

hadezbladez (1139 views)
2018-11-16 13:46:03

hadezbladez (509 views)
2018-11-16 13:41:33

hadezbladez (1144 views)
2018-11-16 13:35:35

hadezbladez (258 views)
2018-11-16 13:32:03

EgonOlsen (2552 views)
2018-06-10 19:43:48

EgonOlsen (2754 views)
2018-06-10 19:43:44

EgonOlsen (1552 views)
2018-06-10 19:43:20

DesertCoockie (2256 views)
2018-05-13 18:23:11

nelsongames (2091 views)
2018-04-24 18:15:36

nelsongames (2787 views)
2018-04-24 18:14:32
Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!