javacv
javacv copied to clipboard
avcodec_find_decoder() error: Unsupported audio format or codec not found: 0.
How to solve this problem
It looks like you're trying to open AV_CODEC_ID_NONE, which doesn't exist. You'll need to pick another from this list: https://github.com/bytedeco/javacpp-presets/blob/master/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avcodec.java#L67
This error occurred when capturing a video file without audio
That looks like a corrupted file. What happens if you try to use it with the ffmpeg or ffplay program?
The file is normal, a camera that does not support audio, the saved video can generate this kind of file
Ok, but if the ffmpeg program cannot process that file either, please report this bug upstream: http://ffmpeg.org/bugreports.html
Thank you very much for your answer
If it works fine with the ffmpeg program though, it means this is an issue with JavaCV, so please try it with the ffmpeg program and let me know! Thanks
Use the ffmpeg command to push the stream, and then use VLC to play with no problem
See the method you proposed in #1184 , add grabber.setAudioStream(Integer.MAX_VALUE)
No errors were reported after joining, and the program runs normally
Ok, could you attach here a sample video file that fails like this?
Sorry, I can’t provide it, I am using a camera RTSP, I don’t have a video source