Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-19-2020, 11:40 AM   #1
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default Video render with mp3: Error initializing audio encoder... Bug in ffmpeg, not Reaper

My postings in the Video mangling subforum did not get much traction, so I stick my neck out here and claim that this a bug in Reaper.

As the title says, when I try to render video with mp3 as audio format, I get an error message saying "Error initializing audio encoder". In short, it is not possible (for me) to render any video format together with mp3 as audio format. Rendering mp3 audio only works fine.

Details and screen caps etc here: https://forum.cockos.com/showthread.php?t=245022

W7x64, Reaper v6.15/x64
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...

Last edited by Fabian; 11-21-2020 at 11:17 AM.
Fabian is online now   Reply With Quote
Old 11-20-2020, 11:21 AM   #2
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default

Is it just me?

Would anyone care to confirm or refute, please.
Thanks,
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is online now   Reply With Quote
Old 11-20-2020, 11:42 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,108
Default

Works here:


My (very vague) hunch would be LAME/FFMPEG incopatibilty?
I'm using LAME 3.99.5/FFMPEG v58.46.100 (Zeranoe build iirc).

edit:
You can get your current installed FFMPEG version via Preferences > Video... > Show available decoder information

edit2:
Just to be sure, did you actually install FFMPEG?
https://forum.cockos.com/showthread.php?t=82459

Reaper by default only includes a minimal FFMPEG version, not sure it's possible with that one.

Last edited by nofish; 11-20-2020 at 12:01 PM.
nofish is offline   Reply With Quote
Old 11-20-2020, 12:04 PM   #4
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default

Quote:
Originally Posted by nofish View Post
Works here:


My (very vague) hunch would be LAME/FFMPEG incopatibilty?
I'm using LAME 3.99.5/FFMPEG v58.46.100 (Zeranoe build iirc).

edit:
You can get your current installed FFMPEG version via Preferences > Video... > Show available decoder information
Ouch!

I use ffmpeg/libav DLL decoder v58.91.100, latest (and final?) Zeranoe build. And Lame 3.99.5.

Thanks for checking this. Now I know it is not Reaper but something else, maybe what you suggest... I'll start by trying to hunt down ffmpeg v58.46.100.

Thanks again.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is online now   Reply With Quote
Old 11-20-2020, 12:12 PM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,108
Default

Feel free to shoot me a PM if you don't find it...
nofish is offline   Reply With Quote
Old 11-20-2020, 01:25 PM   #6
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default

Quote:
Originally Posted by nofish View Post
Feel free to shoot me a PM if you don't find it...
Thanks.
I found older versions on Wayback Machine.

And indeed, with an older version of ffmpeg it works for me here now to render mov/mp4 with mp3 as audio format. This is probably something the devs need to look into.

Still, with this older version both the mp3 and aac have the audio 12 ms late, mp3 has more of the audio cut off at the beginning than aac, and aac has clearly audible artifacts.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...

Last edited by Fabian; 11-20-2020 at 01:51 PM.
Fabian is online now   Reply With Quote
Old 11-21-2020, 11:17 AM   #7
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default Bug in ffmpeg, not Reaper...

OK, so experimenting with different versions of ffmpeg, it seems that this is a bug with the recent version of ffmpeg on Windows. Versions 4.3.0 and 4.3.1, which are both internally labeled v58.91.100, give this error:

Code:
[mp3_mf @ 000000000064c300] could not find any MFT for the given media type
[mp3_mf @ 000000000064c300] could not create MFT
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
for this command line
Code:
ffmpeg -loop 1 -i image.jpg -i audio.wav -c:v libx264 -tune stillimage -c:a mp3 -b:a 192k -pix_fmt yuv420p -shortest out.mp4
If I use ffmpeg version 4.2.3 (v58.54.100) or earlier, it works fine.

If I have "aac" instead of mp3, it works fine with new and old versions of ffmpeg (but with bad crackling).
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is online now   Reply With Quote
Old 02-28-2021, 07:15 PM   #8
gxray
Human being with feelings
 
Join Date: Dec 2020
Location: Miami, FL USA
Posts: 396
Default

Necroing this to say I just ran into this today too -- same problem.
(Also want to preface this with I know absolutely NOTHING about working with video, or how encoders/codecs work)

Available Decoder Info:
Code:
Using output: DirectShow
Current video frame: 1920x1080 'YV12' #131

Available decoder information:

========== VLC ==========
VLC v3.0.x
Loaded from: C:\Program Files\VideoLAN\VLC

========== ffmpeg/libav ==========
ffmpeg/libav DLL decoder v58.91.100

Loaded from: C:\Users\rayga\AppData\Roaming\REAPER\UserPlugins\avcodec-58.dll
ffmpeg/libav configuration:
  --disable-static
  --enable-shared
  --enable-gpl
  --enable-version3
  --enable-sdl2
  --enable-fontconfig
  --enable-gnutls
  --enable-iconv
  --enable-libass
  --enable-libdav1d
  --enable-libbluray
  --enable-libfreetype
  --enable-libmp3lame
  --enable-libopencore-amrnb
  --enable-libopencore-amrwb
  --enable-libopenjpeg
  --enable-libopus
  --enable-libshine
  --enable-libsnappy
  --enable-libsoxr
  --enable-libsrt
  --enable-libtheora
  --enable-libtwolame
  --enable-libvpx
  --enable-libwavpack
  --enable-libwebp
  --enable-libx264
  --enable-libx265
  --enable-libxml2
  --enable-libzimg
  --enable-lzma
  --enable-zlib
  --enable-gmp
  --enable-libvidstab
  --enable-libvmaf
  --enable-libvorbis
  --enable-libvo-amrwbenc
  --enable-libmysofa
  --enable-libspeex
  --enable-libxvid
  --enable-libaom
  --enable-libgsm
  --enable-librav1e
  --disable-w32threads
  --enable-libmfx
  --enable-ffnvcodec
  --enable-cuda-llvm
  --enable-cuvid
  --enable-d3d11va
  --enable-nvenc
  --enable-nvdec
  --enable-dxva2
  --enable-avisynth
  --enable-libopenmpt
  --enable-amf

ffmpeg/libav search path:
  %PATH%
  C:\Program Files\REAPER (x64)
  C:\Users\rayga\AppData\Roaming\REAPER\UserPlugins\64
  C:\Users\rayga\AppData\Roaming\REAPER\UserPlugins
  C:\Program Files\REAPER (x64)\Plugins

========== DirectShow ==========
DirectShow available
I used Zeranoe archive from here:
https://github.com/tormyvancool/ffmp...red-for-reaper

Just wanted to trim a .webm I had and then save the trimmed file.

Turns out I needed the extended FFMPEG for importing video from WEBM, and when trying to render it as any video file with MP3 output, I get:



Not entirely sure what to do -- downgrade to a different FFMPEG inside of "UserPlugins"?
__________________
Seasoned codemonkey
Dunno a thing about making music (here to learn!)
gxray is offline   Reply With Quote
Old 03-01-2021, 11:09 AM   #9
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default

Yeah, versions 4.3.0 and 4.3.1 are both internally labeled v58.91.100, and they do not work with mp3 as audio format. Use 4.2.3 or earlier.

EDIT: It seems that the github page has updated ffmpeg, but not the readme file. Version 4.1.3 has its internal label 58.35.100, so the one you have installed is not 4.1.3, but either 4.3.0 or 4.3.1. You can find 4.2.3 on WaybackMachine https://web.archive.org/web/20200918...oe.com/builds/
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...

Last edited by Fabian; 03-01-2021 at 11:16 AM.
Fabian is online now   Reply With Quote
Old 07-24-2021, 01:12 AM   #10
AaronGrooves
Human being with feelings
 
Join Date: Dec 2013
Posts: 5
Default THANK YOU

I've been dealing with this same error message for over a year, and I haven't been able to export any h264 files in Reaper. But seeing your shot of the "Available Decoder Info" gave me a clue. My Reaper was getting its "avcodec-58.dll" from C:\Windows\System32. I have no idea how these files got there, but once I temporarily removed them, Reaper read the files from UserPlugins and everything now works.

This has caused me literally a year of headaches. I can't thank you all enough for this thread!
AaronGrooves is offline   Reply With Quote
Old 10-31-2021, 02:41 AM   #11
Flaneurette
Human being with feelings
 
Join Date: Dec 2016
Posts: 373
Default

Could you post the ffmpeg command? see if I can test it from my side, I have a 2021 build and experience no issues.
Flaneurette is offline   Reply With Quote
Old 10-31-2021, 11:43 AM   #12
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,431
Default

Quote:
Originally Posted by Flaneurette View Post
Could you post the ffmpeg command? see if I can test it from my side, I have a 2021 build and experience no issues.
I'm not sure if you're asking me, but... one command line I used is given in posting #7 above.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is online now   Reply With Quote
Old 12-24-2021, 03:51 PM   #13
urednik
Human being with feelings
 
urednik's Avatar
 
Join Date: Apr 2010
Posts: 1,247
Default

For me the new reaper v6.43 and FFMPEG 4.4.1 work. Here are instructions by Jon
https://www.youtube.com/watch?v=AWSum2b_Wcg
__________________
W10 (64) Lenovo E540 - SSD; Lenovo B590; W7 (32), Compaq 610 (2.1Ghz core 2 duo, L2 cache, 2GB RAM); DPA 4018, Schoeps MK2, Schoeps MTSC 64, Neumann mk184, AEA Ribbon 88mk, AKG SolidTUBE; Focusrite Scarlett 18i20, recording merely live acoustic music.
urednik is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.