EncodeAudio | Processing sketch for translating audio files
kandi X-RAY | EncodeAudio Summary
kandi X-RAY | EncodeAudio Summary
Processing sketch for translating audio files into numeric values.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of EncodeAudio
EncodeAudio Key Features
EncodeAudio Examples and Code Snippets
Community Discussions
Trending Discussions on EncodeAudio
QUESTION
I am trying to use FFmpeg to take a video (MP4 in this case) and copy it as another MP4. This is so that I can get the hang of decoding/encoding a video and go on to doing other things in that process. My code basically takes a video file, decodes the video and audio streams, and encodes the video and audio streams to an output video file.
As of now, my code only works for the video stream of the input file. The video part of the output file is exactly the same as the video part of the input file. However, the audio part is not. The audio part of the output contains the original audio, but with noise over it. Think of it as someone screaming into their mic or when audio gets too loud for a speaker to handle.
The way I'm handling the decoding/encoding process for the video and audio streams is the same, except with a difference in AVCodecContext settings (video --> frame_rate, width, height, etc.; audio --> sample_rate, channels, etc.).
This is currently the code that I'm working with:
The Video struct:
...ANSWER
Answered 2020-May-17 at 13:03I'm an audio engineer, not a coder, but I hope this may be helpful. What may be happening is that your bit depth is being truncated; eg 24 bit audio being truncated to 16 bit, which will sound distorted and noisy. Each bit truncated from the most significant will clip 6dB of headroom. This will increase the noise floor and turn a loud but clear sine wave steadily into a distorted square wave as the significicant bit reduction increases.
Check for bit depth options in the re-encoding process. It may be that your encoder has a limit to its bit depth. Check the source bit depth and the re-encoded bit depth and see what the difference is. You could use VLC media player for this.
It is also recommended that you leave some headroom in the signal before encoding (at least 0.1 dB.) Pre-encoded audio may already be maxed out, and so re-encoding may add some slight distortion.
More info here:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install EncodeAudio
You can use EncodeAudio like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the EncodeAudio component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page