Page 1 of 2

ffmpeg64.exe has a return code of 1.

Posted: Tue Feb 11, 2020 5:18 am
by Kimbot81
Hi all,

Excuse my ignorance, and not attaching the relevant info at this time (the bug takes 24 hours to occur). Recently, after 5 years of faultless use, UMS started returning "ffmpeg64.exe has a return code of 1". Looking at the log, it says ffmpeg64.exe has been stopped.

Uninstalling UMS, and Java, restarting and re-installing UMS and Java fixes this for 24 hours. Once it starts happening again I will follow the steps and attach the debug log, etc.

While testing, PS3 Media Server has the exact same error code, but replaces FFMPEG64.exe with Mencoder. Maybe you very clever guys and girls know a way around this already, or have some ideas in the time it will take me to have this bug reoccur.

I apologise if my lack of understanding, and basic approach annoys anyone in advance.

Andy

Re: ffmpeg64.exe has a return code of 1.

Posted: Tue Feb 11, 2020 6:34 am
by Nadahar
The "return code of 1" is about as informative as "general error". It just means that something went wrong. So, one would need to study it further to see what it is that goes wrong - chances are that FFmpeg outputs a hint, but you'd probably be in "trace" mode for it to be logged.

Re: ffmpeg64.exe has a return code of 1.

Posted: Tue Feb 11, 2020 9:28 pm
by Kimbot81
Thank You for your prompt reply. As soon as the problem begins occurring again I will upload the required log. Thank You again.

Re: ffmpeg64.exe has a return code of 1.

Posted: Wed Feb 12, 2020 9:03 am
by Kimbot81
Please find attached the correct debug files. Any help would be much appreciated.

Re: ffmpeg64.exe has a return code of 1.

Posted: Wed Feb 12, 2020 10:58 am
by Nadahar
I took a quick look at the log, but it's not immediately clear to me what goes wrong. It seems to be some issue with the Windows pipe being used. UMS claims that the pipe has been created and is ready for use, while FFmpeg claims that it doesn't exist. It could mean that FFmpeg doesn't have the permissions needed to write to the pipe, but I'm not sure exactly how permissions work for pipes.

First the claim that the pipe has been created:

Code: Select all

DEBUG 2020-02-11 21:01:12.025 [HTTPv2 Request Worker 12] net.pms.io.WindowsNamedPipe Creating pipe \\.\pipe\ffmpegvideo_102_1581454872024
DEBUG 2020-02-11 21:01:12.027 [Thread-798] net.pms.io.WindowsNamedPipe Waiting for Windows names pipe connection "\\.\pipe\ffmpegvideo_102_1581454872024"
DEBUG 2020-02-11 21:01:12.453 [Thread-798] net.pms.io.WindowsNamedPipe Result of \\.\pipe\ffmpegvideo_102_1581454872024: true
TRACE 2020-02-11 21:01:12.528 [HTTPv2 Request Worker 12] net.pms.dlna.DLNAResource Sleeping for 2500 milliseconds
DEBUG 2020-02-11 21:01:12.715 [ffmpeg64.exe-262] net.pms.io.ProcessWrapperImpl Reading pipe: \\.\pipe\ffmpegvideo_102_1581454872024
Then FFmpeg's claim that it doesn't exist:

Code: Select all

DEBUG 2020-02-11 21:01:12.806 [ffmpeg64.exe-262-2] net.pms.io.OutputTextLogger \\.\pipe\ffmpegvideo_102_1581454872024: No such file or directory
It's especially strange if this behavior isn't consistent, if it takes a number of hours to start happening. I have no idea what might be causing this at the moment, maybe it's an issue "outside of UMS" (Java/Windows) or maybe it's interference by anti-virus software or unusually strict permissions somewhere. I really don't know what to think.

Re: ffmpeg64.exe has a return code of 1.

Posted: Wed Feb 12, 2020 10:49 pm
by Kimbot81
Thanks ever so much for your fast reply and taking the time to check out the logs. Thank You very much!

I have now narrowed it down to the first restart after the uninstalling and reinstalling of UMS and Java. Until that restart it functions fine, but after that restart this begins.

Thank You again so very much. I was beginning to think I was losing it!

Re: ffmpeg64.exe has a return code of 1.

Posted: Thu Feb 13, 2020 2:17 am
by Nadahar
I'm not sure of the details, but problems that aren't there after installation but appears after the first reboot is something the more recent versions of UMS is plagued with. I would try an older version to see if the problem goes away.

Re: ffmpeg64.exe has a return code of 1.

Posted: Thu Feb 13, 2020 8:47 pm
by Kimbot81
Ahhh, that would explain it then. I updated to 9.2.0 only a day or so before this began happening. Thank You very much for your help.

Re: ffmpeg64.exe has a return code of 1.

Posted: Sat Feb 15, 2020 3:18 am
by Kimbot81
I would like to publicly thank Nadahar for helping me solve this problem, all credit is entirely due to them. I was disappointed to see no responses from the Dev or Bug-Fixing elements of UMS. As ex-Software QA, this stuff needs addressing or more and more users will drop away.

Fix 1: Add the root directory of UMS to all anti-virus/firewall/anti-maleware programs 'exceptions' and any 'allow list', and likewise the ums.exe. This is -usually- c:\programfiles(x86)\ums

Fix 2: Use version 9.0.1 or earlier, as the problem does not occur.

Again, thanks to Nadahar, and I sincerely hope this helps any others users suffering from this error.

Andy

Re: ffmpeg64.exe has a return code of 1.

Posted: Sat Feb 15, 2020 10:02 am
by bandums
Thanks for posting this, saved me a lot of headaches. In my case I am using a PS3. Was getting same pipe error after restart, even back to version 6.8.0. Fix#1 resolved the issue for me. By allowing the following 2 files in Windows Defender firewall it fixed the problem:

C:\Program Files (x86)\Universal Media Server\jre-x64\bin\javaw.exe

C:\Program Files (x86)\Universal Media Server\UMS.exe

UMS is still the best free media server around, hope this helps anyone as well.