Skip to content

VLC4: FFmpeg bump to 4.4 broke audio encoding

Since we bumped to ffmpeg 4.4 encoding audio fails with avcodec.

--sout="#transcode{vcodec=none,samplerate=48000,channels=2,acodec=mp4a}:std{access=file,mux=ts,dst=out.ts}" With any audio or video sample fail to encode the audio track on my side.

The encoder module spams cannot send one frame to encoder -22 at each encode_avframe calls. -22 is the AVCodec error code for EINVAL.

I believe this is due to a change in the internal API of AVCodec (brought by 827d6fe73d2f5472c1c2128eb14fab6a4db29032). Since 4.4 having the frame->channels set to have avcodec_send_frame() working properly with audio tracks seems mandatory now.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information