FS#70630 - [blender] After full system update, audio muted after rendering animation

Attached to Project: Community Packages
Opened by Yuri Santos (yrds96) - Wednesday, 28 April 2021, 18:41 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 17 May 2021, 19:10 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Filipe Laíns (FFY00)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I have been editing a project in blender for 2 days, and all rendering was just rendering fine with audio. After the last full update, when i try to render anything the audio is muted(no audio stream).

I've tried to downgrade blender to confirm if the bug is in this current version, but the package has to many different package dependencies versions.

Additional info:
tested video with ffplay and mpv players
blender 17:2.92.0-5
no custom config file
audio works normal on video sequencer preview
tried with most containers(mp4, mkv, avi)
tried with most video/audio codecs(mp4, matroska, avi/mp3, vorbis, opus)

Steps to reproduce:

- Open Video Sequencer
- Add any video and audio strip
- In "Output Properties" Menu, select file format: FFmpeg Video, Video Codec: H.264 and Audio Codec: mp3
- Render > Render animation

Expected Result:
Video file with audio

Video file with sound muted
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 17 May 2021, 19:10 GMT
Reason for closing:  Fixed
Comment by Yuri Santos (yrds96) - Wednesday, 28 April 2021, 18:51 GMT
Downloaded blender 2.92.0 from blender.org and rendering with audio it's just working fine
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 29 April 2021, 02:13 GMT
Pretty sure this is due to our usage of a very recent ffmpeg as compared to the official blender builds. We can't really do much here except hope for upstream to eventually fix this. Could you report an upstream bug? We really don't do any fancy stuff at all in our package: https://github.com/archlinux/svntogit-community/blob/packages/blender/trunk/PKGBUILD

As you can see, I even compile it using the official release cmake configuration. The difference therefore must be in the libraries we use and ffmpeg is the most likely candidate here.
Comment by Charbel Nicolas (charbelnicolas) - Thursday, 29 April 2021, 23:09 GMT
I came here to report this exact bug. It is related to the newest ffmpeg 4.4 library.

As Yuri already said, blender 2.92 from blender.org works just fine. It's a bummer that we get broken packages on Arch now :(

This is such a core feature that it renders blender useless for video editing.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 29 April 2021, 23:54 GMT
Please report the incompatibility with ffmpeg 4.4 to blender upstream and link the issue here. They are usually pretty quick at fixing such things.
Comment by Abiel Fernandez (romi) - Friday, 30 April 2021, 05:37 GMT
I've been getting the same issue, audio exporting does not work. Blender just returns this error:
what(): File couldn't be written, audio encoding failed with ffmpeg.
Comment by Yuri Santos (yrds96) - Saturday, 01 May 2021, 07:04 GMT
FYI: the bug has been already reported here: https://developer.blender.org/T87932. For now we can use blender 2.92 until this issue fix
Comment by Tobias Kieslich (neri) - Wednesday, 05 May 2021, 22:28 GMT
I found this piece of info in the devtalk: https://devtalk.blender.org/t/newest-ffmpeg-v4-4-is-having-issues-with-blender-2-92-animation-audio-is-not-rendered-with-video/18663/2
Trying to cook up a patch and will post here.
sha512sum: be26d2edf9c9aaf4c99f4f0a3f3c4a05296170b86b5abd7b7c3c2d900f868ebe113d5b49fbf413fb717b9ec5f36becf880c8479388616d1b34f296da24faea63

# put this below the other patch line for openEXR
patch -p1 < "$srcdir"/blender-ffmpeg4_4.patch # Fix build with FFmpeg 4.4

it's building at the moment which will take time. I'll report back.
Comment by Tobias Kieslich (neri) - Thursday, 06 May 2021, 00:22 GMT
I can confirm above patch works to have audio exported with video and I think that makes it worthwhile (meaning to build a -06 release). However, that does NOT fix all ffmpeg integration within blender. Video proxy-file generation, for example, is still buggered.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 15 May 2021, 14:55 GMT
I pushed -6 with the posted patch, could someone test it out?
Comment by Tobias Kieslich (neri) - Saturday, 15 May 2021, 15:54 GMT
I'm camping till Monday. Will do when I'm back. Thank you for the update
Comment by Tobias Kieslich (neri) - Monday, 17 May 2021, 18:02 GMT
Hi Sven,

Thank you for the update. I can confirm it renders out audio with the video. So I'd say this bug report is ready to be closed.