0

After migrating my Java application from vlcj-3.12.1 to vlcj-4.8.2, video adjustments are no longer working. Means: changing the video's brightness, contrast, saturation, hue or gamma has no effect. I am enabling video adjustments before changing any of the mentioned values and I am calling these methods after playback has started and video output is available. I have searched through various discussions about similar issues but none of the proposed solutions has worked for me. I have also tried to call setAdjustVideo(false) right before setting it to true again - no difference. Example code for setting the brightness:

float myBrightness = 2.0f;
vlcPlayer.video().setAdjustVideo(true);
vlcPlayer.video().setBrightness(myBrightness);

Surprisingly, it is working fine for all .avi files I have tested, so I initially thought the issue might somehow be related to the video codec. But when using the native VLC player, applying the settings works just fine for all videos and formats. So it must have to do something with either vlcj or my own code. Is there anything that needs to be taken care of that I am missing? Any additional setting or rule in vlcj-4 compared to previous versions?

I am using vlcj-4.8.2 in combination with VLC 3.0.17.4 (latest version) on Windows 10 with Java 17.0.5. Thanks in advance!

Edit: (added native VLC error logs):

main debug: looking for video converter module matching "any": 48 candidates
d3d11_filters warning: no context available
d3d11_filters debug: D3D11 opaque without a texture
d3d11_filters warning: no context available
d3d11_filters debug: D3D11 opaque without a texture
chain error: Too high level of recursion (3)
chain error: Too high level of recursion (3)
main debug: no video converter modules matched
main error: Failed to create video converter
main debug: removing module "swscale"
main debug: Filter 000002080bf802a0 removed from chain
chain debug: Trying to use chroma I422 as middle man
Bate
  • 61
  • 8
  • Please test with vlcj-player sample project. Are you using an "embedded" or "callback" media player? I just tested vlcj-player with the embedded media player and video adjustment works for me. For callback media players it seems you can't use video adjust. – caprica Nov 20 '22 at 21:35
  • I am using EmbeddedMediaPlayer. It is working for some older mpeg videos and for avi containers it seems, but not for mp4. I'll try out the sample project and see if I can find any differences to my code. But it will take some time... – Bate Nov 20 '22 at 21:57
  • Strange, I tested mp4 and it was OK for me. – caprica Nov 21 '22 at 06:21
  • I have downloaded the vlcj sample application and I am seeing the same behavior there: video adjustments don't work for MP4 files. So I assume it's not related to my code. I have had a look into the native VLC logs and I can see error messages there (I have added them to my initial post). These messages are being logged repeatedly for videos having the issue. Have you ever come across something similar? I did some research but unfortunately I am really not into all this native VLC and codec stuff... – Bate Nov 23 '22 at 21:15
  • No idea? The thing is: even if it is related to my local machine setup like some outdated graphics driver or if I am missing any codec or whatever, how is it possible that native VLC player can handle everything without any issues and vlcj cannot? Like I said, I am seeing the same issue with the vlcj sample application. Any hint would be highly appreciated – Bate Nov 28 '22 at 16:24
  • VLC does not use LibVLC. I just now tested vlcj-player on Linux, and Windows 10, VLC 3.0.17.4, and an MP4 file, video effects work just fine. You can try changing video output, see "VLC -H" and search for vout. – caprica Nov 28 '22 at 17:27
  • I have tried out all possible video output options. No success unfortunately. Maybe it's related to my machine. I'll try to get my app running on another laptop and see if it works there – Bate Dec 02 '22 at 18:14

0 Answers0