Open
Conversation
Bumps ant from 1.9.4 to 1.9.15. Signed-off-by: dependabot[bot] <support@github.com>
…apache.ant-ant-1.9.15 Bump ant from 1.9.4 to 1.9.15
# Conflicts: # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
Fixed bad version numbers.
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # NOTES.md # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # NOTES.md # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # NOTES.md # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-unix/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
# Conflicts: # NOTES.md # ffsampledsp-aarch64-linux/pom.xml # ffsampledsp-aarch64-macos/pom.xml # ffsampledsp-complete/pom.xml # ffsampledsp-i386-win/pom.xml # ffsampledsp-java/pom.xml # ffsampledsp-x86_64-linux/pom.xml # ffsampledsp-x86_64-macos/pom.xml # ffsampledsp-x86_64-win/pom.xml # pom.xml
Author
|
It looks like an encoded string in general is not supported by the ffmpeg ff_open_format_context() function for a local file. I have encountered extra FileNotFound errors with other file paths. I am in the process of writing up a fix. |
Author
FFAudioFileReader reader = new FFAudioFileReader();
String tempStr_1 = "file:///C:/Users/Super/Downloads/temp/temp%20Again/audio.ogg";
URL url_1 = URI.create(tempStr_1).toURL();
String tempStr_2 = "file://CAMERON-NAS/home/Songs/space%20space/audio.mp3";
URL url_2 = URI.create(tempStr_2).toURL();
String file_1 = "\\\\CAMERON-NAS\\home\\Songs\\space space\\audio.mp3"; // creates a "file:////" url
String file_2 = "C:\\Users\\Super\\Downloads\\temp\\temp Again\\audio.ogg";
try {
System.out.println("URL 1");
System.out.println("Result: " + reader.getAudioFileFormat(url_1));
System.out.println("URL 2");
System.out.println("Result: " + reader.getAudioFileFormat(url_2));
System.out.println("File 1");
System.out.println("Result: " + reader.getAudioFileFormat(new File(file_1)));
System.out.println("File 2");
System.out.println("Result: " + reader.getAudioFileFormat(new File(file_2)));
} catch (UnsupportedAudioFileException | IOException e) {
e.printStackTrace();
}Jan 28, 2025 4:41:13 PM com.tagtraum.ffsampledsp.FFNativeLibraryLoader arch
INFO: Using arch=x86_64
URL 1
Result: OGG (.ogg) file, byte length: 2427072, data format: VORBIS 48000.0 Hz, unknown bits per sample, stereo, unknown frame size, unknown frame rate
URL 2
Result: MP3 (.mp3) file, byte length: 0, data format: MPEG-1, Layer 3 44100.0 Hz, unknown bits per sample, stereo, unknown frame size, 38.28125 frames/second, frame length: 9054
File 1
Result: MP3 (.mp3) file, byte length: 0, data format: MPEG-1, Layer 3 44100.0 Hz, unknown bits per sample, stereo, unknown frame size, 38.28125 frames/second, frame length: 9054
File 2
Result: OGG (.ogg) file, byte length: 2427072, data format: VORBIS 48000.0 Hz, unknown bits per sample, stereo, unknown frame size, unknown frame rate
Process finished with exit code 0Made a new fix taking into consideration general file URL decoding and tested it with the above code. |
Author
|
Tested on linux and provided a fix for url scheme as well. Added fix for audio files without explicit extension in filename. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Environment: Windows 10, Java JDK 23
ffsampledsp throws a FileNotFoundError when a path to an audio file contains a space character.
Output:
FFAudioFileReader -> urlToString(final URL url) is called to convert the URL to a valid string input for FFmpeg:
Working input url: file:/C:/Users/Super/Downloads/temp/audio.ogg
Non-Working input: file:/C:/Users/Super/Downloads/temp/temp%20Again/audio.ogg
The native
ff_open_format_context()function within FFUtils.c throws the FileNotFoundError in question.It seems that although
file:/C:/Users/Super/Downloads/temp/temp%20Again/audio.oggthe %20 encoded space character is valid in Windows (I am able to paste this url into file explorer and run the file), it does not seem to be valid in the FFmpeg library you are using.I have added extra decoding to the
urlToString()function to replace %20 with a space character, and this seems to have fixed the issue.I tested the fix on the main branch.
I also packaged the library into a jar, and added the compiled native libraries to the jar file, and successfully tested it with your other project audioplayer4j.