-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error -22: Could not encode audio packet. #1294
Comments
Running that code doesn't result in any error message. You'll need to provide more than that. |
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(url); recorder.setFormat("mp3"); //doAudio, doVideo, doProcessing, keyFrames |
Could you upload here a sample file that fails instead of "url"? |
And if we remove: recorder.stop(), it will run. |
so if there is any risk when remove [recorder.stop]? or any other advise? |
… (issue #1294) * Upgrade dependencies for OpenBLAS 0.3.7
I found the problem and it's now fixed. |
Thank you very much! It works! One more question, when will this version officially work? Then we can use mavenCentral |
Probably in a month or two...
|
Ok! Got it! Thanks. |
JavaCV 1.5.2 has been released with the fix! Enjoy and thanks for reporting this issue. |
Hi guys!I got a problem here, when i use ffmpegframeRecorder, i input a mp3 audio and output as outputstream, but i will block at recorder.stop()the error is could not encode audio packet
Metadata:
encoder : Lavf58.11.101
Duration: 00:02:15.00, start: 0.069063, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 16000 Hz, mono, fltp, 128 kb/s
[mp3float @ 0x7f49f84b9f80] Could not update timestamps for skipped samples.
Output #0, mp3, to '':
Metadata:
TSSE : Lavf58.20.100
Stream #0:0: Audio: mp3, 16000 Hz, mono, fltp, 64 kb/s
[libmp3lame @ 0x7f49f8f8e280] inadequate AVFrame plane padding
[libmp3lame @ 0x7f49f8f8e280] 4 frames left in the queue on closing
[2019-09-06 17:30:00.321] ERROR [stream-service-1] StreamProcessService.java:131 - avcodec_encode_audio2() error -22: Could not encode audio packet.
The source code is :
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputStream, 1);
recorder.setFormat("mp3");
recorder.setFrameRate(grabber.getFrameRate());
recorder.setAudioCodec(avcodec.AV_CODEC_ID_MP3);
recorder.setSampleRate(grabber.getSampleRate());
it will crash when i call recoder.stop()
The text was updated successfully, but these errors were encountered: