bytedeco/javacv

The audioCodec parameter is not used or has no effect in FFmpegFrameGrabber

Open

#1,454 opened on Jun 20, 2020

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Java (1,583 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I set the audioCodec parameter in FFmpegFrameGrabber, but it has no effect. I then checked the source code and found that audioCodec was not used in FFmpegFrameGrabber. Is it in the 969 lines of code in FFmpegFrameGrabber:

AVCodec codec = avcodec_find_decoder_by_name(audioCodecName);
             if (codec == null) {
                 codec = avcodec_find_decoder(audio_par.codec_id());
             }

Whether the code should be modified or added:

If (codec == null) {
                 codec = avcodec_find_decoder(getAudioCodec());
    }

to make audioCodec effective? Thank you very much!

Contributor guide