Question / Help Recording error "An unspecified error occurred while recording"

DaniLecx

New Member
I'm having a problem recording with OBS (streaming works). I get an error message "An unspecified error occurred while recording" and when i check the logs i get [ffmpeg muxer: 'adv_file_output'] os_process_pipe_write for info structure failed.

I tried a few solutions but nothing works:
- 32 and 64 bit
- Run as administrator
- Try with new profile / scene
- Change recording path
- Reinstall OBS
- Update OBS / Windows 10 / AMD Radeon drivers

You can check the log file here.

If anyone can help me find the solution, i will be very grateful !
 

Sai_

New Member
I know this is an old thread, but I've been running into this problem for MONTHS with zero solution. Everytime I searched on google, it was always a deadend. Same questions asked, same advice, same nothing.

I finally figured the problem out on my own.

In the "\data\obs-plugins\obs-ffmpeg\" folder.
There is only 2 files and a folder.
/locale
ffmpeg-mux64.exe
ffmpeg-mux32.exe

By clicking on ffmpeg-mux64.exe I noticed it would give a missing dll error.
O1JDk3t.jpg

It required:
avcodec-57.dll
avformat-57.dll
avutil-55.dll
swresample-2.dll

What I did was I downloaded the dlls from https://ffmpeg.zeranoe.com/builds/win64/shared/ and copied them into the obs-ffmpeg folder.
I picked ffmpeg-3.2-win64-shared.zip (picked an older one at random), because the newer ones didn't have the files needed.

After doing all this, I ran OBS, recorded, and everything worked as it should.

Maybe those files got removed from my system? Maybe I never had them? Maybe OBS didn't install them. Who knows. I'm not knowledge in that stuff. Hope this helps someone who is doing a google search on this problem, like I did.
 
Last edited:

koala

Active Member
The ffmpeg-mux64.exe is not supposed to be started directly. The required DLLs (that you think were missing) are actually present in the "C:\Program Files (x86)\obs-studio\bin\64bit" directory. If you added custom files, remove them again. OBS requires exactly and only the files that came with its own installation. By adding custom files with similar file names, you make your installation unstable.

To start the ffmpeg-mux64.exe programs directly, you have to change the current directory to "C:\Program Files (x86)\obs-studio\bin\64bit" and start with full path "C:\Program Files (x86)\obs-studio\data\obs-plugins\obs-ffmpeg\ffmpeg-mux64.exe". This way, the DLLs are found by Windows in the current directory.
To set a current directory, either set it in shortcut you use to start the program, or in a command line (cmd or powershell), use the CD command. You cannot click the *.exe directly from within Explorer.
 

Sai_

New Member
The ffmpeg-mux64.exe is not supposed to be started directly. The required DLLs (that you think were missing) are actually present in the "C:\Program Files (x86)\obs-studio\bin\64bit" directory. If you added custom files, remove them again. OBS requires exactly and only the files that came with its own installation. By adding custom files with similar file names, you make your installation unstable.

To start the ffmpeg-mux64.exe programs directly, you have to change the current directory to "C:\Program Files (x86)\obs-studio\bin\64bit" and start with full path "C:\Program Files (x86)\obs-studio\data\obs-plugins\obs-ffmpeg\ffmpeg-mux64.exe". This way, the DLLs are found by Windows in the current directory.
To set a current directory, either set it in shortcut you use to start the program, or in a command line (cmd or powershell), use the CD command. You cannot click the *.exe directly from within Explorer.
Thanks for the reply. I know it's not ment to be started directly. I did it to figure out what the problem was out of desperation, since I've already tried everything I could think of within reason. The only useful hints in the logfiles are "ffmpeg muxer" which is the reason I looked there.

I don't know about unstable, but it's sure better than getting "An unspecified error occurred while recording" each time you press record, and no one helping to figure out the problem other than being told what the OP already stated.

Since I'm able to now record working videos, I say problem solved until something else popsup or someone could supply a better fix. :)
 

R1CH

Forum Admin
Developer
It appears you have some ffmpeg DLLs installed in your syswow64 / system32 folders. Whichever app did this is very badly behaved! We'll see if we can make ffmpeg-mux more tolerant of incorrect versioned DLLs from system folders.
 

fostejo

New Member
Thank you @Sai_ for pointing in the right direction; I've had very similar issues without resolution with the 32-bit version of OBS until your post. While @R1CH is spot on about the ffmpeg DLL sprawl, realistically, it's not that unusual and, from doing a quick search of my own machine, I've got multiple versions of the ffmpeg-related executables and DLLs installed by multiple pieces of software over time, several of which have also tweaked my PATH environment to 'help' Windows find the software's own versions first.

With all that said and taking into account the clarification from @koala about the DLLs (and understandable warning about messing up the OBS installation), my resolution was slightly different and a little less drastic as it doesn't involve downloading any other DLLs, merely 'helping' the ffmpeg executables that OBS uses find the expected DLLs. Note that by getting OBS working, be aware that these alterations may negatively affect other software that uses ffmpeg!

The process I followed is below and is 32-bit specific (but may work with the 64-bit version with appropriate path changes):

First... Confirm you're seeing the same issue. If not, then this may not be the solution you're looking for...
  1. Fire up an administrative cmd prompt
  2. CD to C:\Program Files (x86)\obs-studio\data\obs-plugins\obs-ffmpeg
  3. Run ffmpeg-mux32
  4. If it shows an error message about not being able to find (in my case) avcodec-57.dll then it's likely the same issue.
Update your machine's PATH variable so the OBS DLLs get found first...;
  1. Right-mouse your 'My Computer' icon > Properties > Advanced System Settings > Advanced (tab) > Environment Variables... (button)
  2. Select the 'Path' variable from the 'System variables' section and click the 'Edit...' button
  3. (Copy and paste the current path variable detail somewhere safe just in case you need to return back to its original value)
  4. In the 'Variable value' text field, jump to the beginning of the text and enter (note the semi-colon): C:\Program Files (x86)\obs-studio\bin\32bit;
  5. Click ok, then ok and ok one last time to close the dialog down.
Check if that's helped ffmpeg-mux32 function correctly (or better at least);
  1. Fire up a NEW administrative cmd prompt (to ensure you're using the updated path variable)
  2. CD to C:\Program Files (x86)\obs-studio\data\obs-plugins\obs-ffmpeg
  3. Run ffmpeg-mux32
  4. Hopefully, this time, all - or most - of the required DLLs will be found by ffmpeg-mux32 and it'll just complain that there's an 'expected option missing' - If so... it should be working ok when called via OBS
Note: In my instance, it helped but wasn't 100% perfect - it then complained about the procedure entry point for deflateBound not being located in zlib.dll (presumably because if was finding a different version elsewhere). To correct that particular problem I found I had to copy OBS's specific version of zlib.dll into the obs-ffmpeg directory - even though it should've been picked up via the path variable. To do this just run copy "C:\Program Files (x86)\obs-studio\bin\32bit\zlib.dll" "C:\Program Files (x86)\obs-studio\\data\obs-plugins\obs-ffmpeg"

Hope that helps
 

DaniLecx

New Member
You solved my problem ! Thank you so much for your time explaining how to do it !
Btw i had to put the path over system32 for it to work. I'll probably see soon what app was causing the problem.
 
Last edited:

BLUESOUL_KEN

New Member
I know this is an old thread, but I've been running into this problem for MONTHS with zero solution. Everytime I searched on google, it was always a deadend. Same questions asked, same advice, same nothing.

I finally figured the problem out on my own.

In the "\data\obs-plugins\obs-ffmpeg\" folder.
There is only 2 files and a folder.
/locale
ffmpeg-mux64.exe
ffmpeg-mux32.exe

By clicking on ffmpeg-mux64.exe I noticed it would give a missing dll error.
O1JDk3t.jpg

It required:
avcodec-57.dll
avformat-57.dll
avutil-55.dll
swresample-2.dll

What I did was I downloaded the dlls from https://ffmpeg.zeranoe.com/builds/win64/shared/ and copied them into the obs-ffmpeg folder.
I picked ffmpeg-3.2-win64-shared.zip (picked an older one at random), because the newer ones didn't have the files needed.

After doing all this, I ran OBS, recorded, and everything worked as it should.

Maybe those files got removed from my system? Maybe I never had them? Maybe OBS didn't install them. Who knows. I'm not knowledge in that stuff. Hope this helps someone who is doing a google search on this problem, like I did.

sorry mate i tried anything you guys were talking about but it wasnt helping is it because my obs is the different version?so ammm my problem was quite similar to lecx(my log https://obsproject.com/logs/Um0zy3NfR5ZDTho1 )so whats my problems actually it would be greatful if you guys solved it out for me <3
 

aphocus

New Member
It appears you have some ffmpeg DLLs installed in your syswow64 / system32 folders. Whichever app did this is very badly behaved! We'll see if we can make ffmpeg-mux more tolerant of incorrect versioned DLLs from system folders.

I reinstalled windows 2 weeks ago, and according to a quick search of my system, there are no other instances of avcodec-57.dll on my system, and yet I get this error, my system, and ffmpeg-mux are not loading another instance of ffmpeg, they're just not loading the dlls at all.

Code:
C:\Users\aphocus>where avcodec-57.dll

C:\Program Files\obs-studio\bin\64bit\avcodec-57.dll



C:\Users\aphocus>echo %PATH%

c:\program files (x86)\python37-32\scripts\;c:\program files (x86)\python37-32\;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\windows\system32\openssh\;c:\program files\putty\;C:\Program Files\obs-studio\bin\64bit;C:\Users\aphocus\AppData\Local\Microsoft\WindowsApps;


Considering Windows default procedure is to load DLLs from current working directory, then PATH, and it works when I append it to the last line entry on my PATH, Then perhaps OBS is just launching ffmpeg-mux from the wrong directory, and thus never can find the DLLs in the first place, I mean are you sure ffmpeg-mux support is working at all with a standard as expected install of windows?

Edit: On further investigation using Process Explorer, both apps have their current working directory correctly with in C:\Program Files\obs-studio\bin\64bit\, which just leaves me thoroughly confused.
 
Last edited:

R1CH

Forum Admin
Developer
Can you post a regular OBS log? Incorrect recording settings can also cause the error, it's not limited to a DLL mismatch.
 
Hey just wanted to point out something that may be a cause. Every time I update my AMD RX 580 drivers I get this error and have to use sai's fix as fostejos was confusing me @R1CH
 

uglyeoin

New Member
Thanks for trying to help. I removed all of the sources and no joy. All sources were working previously except my new Logitec Webcam, which was untested. I just installed FFMPEG so I suspect that. For now I've taken to recording in a different way.
 
Last edited:
Top