0

In short, my question is: Which is the fastest format for encoding with JCodec, without loosing too much quality (like mangled colors)?

An example to what I mean with "Mangled colours, can be found in the videos in the description of this issue.

The rest here is contextual information to my considerations and what I have tried:

I am creating a screen recorder in Java. I have solved the issue of getting more than 10 FPS as BufferedImages (at least on Windows. Xorg is not very cooperative), but encoding is not fast enough to follow. My solution is threaded with a producer, ad consumer and a BlockingQueue for transfering frames.

I need it to be able to encode at least 15 FPS full HD, but more is better.

I probably need to re-encode after encoding the first time, but for now, I just want to store the frames without loosing too much quality, and saving at least some bits.

I am considering PRORES, since other formats does not seem to play well (most just doesn't write anything, and h.264 mangles the colours), but is that a viable alternative?

Other ways of storing a lot of BufferedImage objects are welcome too, but I would prefer encoding directly to video. (I was considering writing PNGs or BMPs enumerated to a zip, but have not gotten my head around it yet.)

beruic
  • 5,517
  • 3
  • 35
  • 59
  • Seems like you've chose wrong library for this operation encoding on CPU and Java is not really good idea from the performance aspect. Look into [JavaAV](https://github.com/hoary/JavaAV) which is java API on top of ffmpeg i.e. java host API on top of GPU/native video encoder. – Victor Gubin Aug 30 '19 at 14:43
  • @VictorGubin you are right in this, however my situation is that we are creating RPA robots for virtual machines, so there is not much GPU available, and though it may be enough, the most omportant factor is that requiring ffmpeg to be present is another complexity to our setup, and we would prefer doing it in pure Java. – beruic Sep 02 '19 at 09:46

0 Answers0