Java Developer doing a Karaoke player

This forum is about all development around libVLC.
cristianovieira
New Cone
New Cone
Posts: 5
Joined: 27 Apr 2022 18:37

Java Developer doing a Karaoke player

Postby cristianovieira » 27 Apr 2022 18:47

We're developing a Karaoke software here and we are using VLC lib to play videos. well, the last part of software is change the Pitch of video, i'm tried it:

Code: Select all

viewpoint = vlcPlayer.mediaPlayer().video().newViewpoint(); viewpoint.setPitch(2); viewpoint.setYaw(0); viewpoint.setRoll(0); viewpoint.setFov(80.0f); vlcPlayer.mediaPlayer().video().updateViewpoint(viewpoint, true);
but don't be effect, i was see at windows vlc player that we need enable pitch adjust to do it, but how can i change it ?
i'm using 4.7.1 lib version.
help me please. thank's.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Java Developer doing a Karaoke player

Postby Rémi Denis-Courmont » 27 Apr 2022 18:51

There is no library version 4.7.1. The latest release as of today is 3.0.17.4.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

cristianovieira
New Cone
New Cone
Posts: 5
Joined: 27 Apr 2022 18:37

Re: Java Developer doing a Karaoke player

Postby cristianovieira » 27 Apr 2022 19:04

i'm using java, follow the two last logs release.
18th March, 2022 - vlcj 4.7.2 released, minor bugfix release relating to embedded media list player component
4th April, 2021 - vlcj 4.7.1 released, some trivial low-impact changes

and follow the dependency from java

Code: Select all

<dependency> <groupId>uk.co.caprica</groupId> <artifactId>vlcj</artifactId> <version>4.7.1</version> </dependency>
The software is almost ready, just have this requirement to finish.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Java Developer doing a Karaoke player

Postby mfkl » 28 Apr 2022 04:46

Try this code https://github.com/caprica/vlcj-example ... tTest.java, then you'll be able to find out what's incorrect with yours.
https://mfkl.github.io

cristianovieira
New Cone
New Cone
Posts: 5
Joined: 27 Apr 2022 18:37

Re: Java Developer doing a Karaoke player

Postby cristianovieira » 29 Apr 2022 02:58

hello, thanks for your awser, i was already see this code and i cut this part:

Code: Select all

viewpoint = vlcPlayer.mediaPlayer().video().newViewpoint(); viewpoint.setPitch(2); viewpoint.setYaw(0); viewpoint.setRoll(0); viewpoint.setFov(80.0f); vlcPlayer.mediaPlayer().video().updateViewpoint(viewpoint, true);
but don't be effect, maybe being missing something. what do you think ?

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Java Developer doing a Karaoke player

Postby unidan » 29 Apr 2022 09:32

Hi, is it a 360 karaoke player or do you want to change the pitch of audio instead ?

360 will only work with media that have the correct metadata tagging.

cristianovieira
New Cone
New Cone
Posts: 5
Joined: 27 Apr 2022 18:37

Re: Java Developer doing a Karaoke player

Postby cristianovieira » 29 Apr 2022 16:09

Hi friend, it's not a 360 Karaoke, i'm just need to change the audio pitch from the normal media.
Look, we have in english a lot synonym word, i'm searching synonym right now from pitch and i have "tone" "hue" "pitch" etc... i'm looking into the class this words to finally found how change the TONE/PITCH of AUDIO. (i know that is not hue) let get next word.

this code bellow show the ModuleDescription of scaletempo_pitch Audio pitch changer Pitch Shifter, now i'm looking how to use Audio Filters.

Code: Select all

List<ModuleDescription> audioFilters = vlcPlayer.mediaPlayerFactory().application().audioFilters(); for(int i = 0; i < audioFilters.size(); i ++ ) { dump(i, audioFilters.get(i)); } private static void dump(int i, ModuleDescription moduleDescription) { System.out.printf(FORMAT_PATTERN, String.valueOf(i + 1), moduleDescription.name(), moduleDescription.shortName(), moduleDescription.longName(), formatHelp(moduleDescription.help())); } private static String formatHelp(String help) { return help != null ? help.replaceAll("\\n", " ") : ""; }
i think i need somethink like a Audio Filter to change the pitch, someone know audio filter ?

Thank's.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Java Developer doing a Karaoke player

Postby unidan » 06 May 2022 15:23

Code: Select all

viewpoint.setPitch(2);
Then this is completely unrelated indeed, this will change the 360 video viewpoint (or audio spatialization viewpoint) so it doesn't change the pitch of the audio at all.

scaletempo_pitch is the correct way to go, but there's no supported public API right now, and the option is not supported at the libvlc instance nor libvlc media level. In short, you're out of luck with libvlc for now. :/

cristianovieira
New Cone
New Cone
Posts: 5
Joined: 27 Apr 2022 18:37

Re: Java Developer doing a Karaoke player

Postby cristianovieira » 12 May 2022 23:36

Hello, ok i'm understood, meantime i keep searching and i found the FilterTest class that show all filters is enable to use as follow the code:

Code: Select all

public class FilterTest { private static final String FORMAT_PATTERN = "%3s %-24s %-24s %-80s %s\n"; public static void main(String[] args) throws Exception { MediaPlayerFactory factory = new MediaPlayerFactory(); List<ModuleDescription> audioFilters = factory.application().audioFilters(); List<ModuleDescription> videoFilters = factory.application().videoFilters(); System.out.println("Audio Filters:"); System.out.println(); System.out.printf(FORMAT_PATTERN, "#", "Name", "Short Name", "Long Name", "Help"); System.out.printf(FORMAT_PATTERN, "=", "====", "==========", "=========", "===="); for(int i = 0; i < audioFilters.size(); i ++ ) { dump(i, audioFilters.get(i)); } System.out.println(); System.out.println("Video Filters:"); System.out.println(); System.out.printf(FORMAT_PATTERN, "#", "Name", "Short Name", "Long Name", "Help"); System.out.printf(FORMAT_PATTERN, "=", "====", "==========", "=========", "===="); for(int i = 0; i < videoFilters.size(); i ++ ) { dump(i, videoFilters.get(i)); } } private static void dump(int i, ModuleDescription moduleDescription) { System.out.printf(FORMAT_PATTERN, String.valueOf(i + 1), moduleDescription.name(), moduleDescription.shortName(), moduleDescription.longName(), formatHelp(moduleDescription.help())); } private static String formatHelp(String help) { return help != null ? help.replaceAll("\\n", " ") : ""; } }
when we run this class we got this return:

Code: Select all

Audio Filters: # Name Short Name Long Name Help = ==== ========== ========= ==== 1 stereo_widen Stereo Enhancer Simple stereo widening effect This filter enhances the stereo effect by suppressing mono (signal common to both channels) and by delaying the signal of left into right and vice versa, thereby widening the stereo effect. 2 spatializer Spatializer Audio Spatializer 3 spatialaudio Binauralizer Ambisonics renderer and binauralizer 4 scaletempo Scaletempo Audio tempo scaler synched with rate 5 scaletempo_pitch Audio pitch changer Pitch Shifter
The audio filter number #5 is scaletempo_pitch Audio pitch changer Pitch Shifter, someone know how can i apply this AudioFilter at Audio ? Thank very much.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests