PDA

View Full Version : FFMPeg Locking Files



ftanner
07-26-2017, 03:50 AM
This just started recently happening. I am using the Mezzmo client on Roku, but I doubt that is the cause.

When I stream a movie using Mezzmo, I can't move it to a new location until after I restart the Media Server service. It says that the file is open in ffmpeg.exe and won't let me do anything with it. I've already checked and the file isn't being transcoded. It doesn't even work once I start viewing a different movie.

Peter
07-26-2017, 09:54 AM
Can you please run Windows Task Manager when this occurs to see if there are any ffmpeg.exe processes running? It is possible that the transcoding is still occuring in the background even though in Mezzmo it is not reported.

ftanner
07-27-2017, 12:01 PM
Can you please run Windows Task Manager when this occurs to see if there are any ffmpeg.exe processes running? It is possible that the transcoding is still occuring in the background even though in Mezzmo it is not reported.

There are definitely multiple instances of FFMPeg.exe running in the background.

The files are h.264 MP4 files, which the Roku can play natively, do I doubt that they are being transcoded. In any event, I just tried moving files thhat I played yesterday and it still said that they were open in MezzmoMediaService. I don't think, even if they were transcoding, that they would be for over 24 hours.

ftanner
07-27-2017, 12:05 PM
There are definitely multiple instances of FFMPeg.exe running in the background.

The files are h.264 MP4 files, which the Roku can play natively, do I doubt that they are being transcoded. In any event, I just tried moving files thhat I played yesterday and it still said that they were open in MezzmoMediaService. I don't think, even if they were transcoding, that they would be for over 24 hours.

Interestingly, after I posted this, all of the instances of FFMpeg.exe are no longer showing up in Task Manager, however, the still won't copy, with the same message.

Peter
07-27-2017, 01:43 PM
I think the ffmpeg.exe instances might be from generating thumbnail preview images, this is done for files so that when fast forwarding a preview of the video at that time is shown. Once the ffmpeg.exe instance is closed the server should no longer keep the file open, we will test here to see if we can reproduce the problem.

ftanner
07-27-2017, 11:35 PM
I think the ffmpeg.exe instances might be from generating thumbnail preview images, this is done for files so that when fast forwarding a preview of the video at that time is shown. Once the ffmpeg.exe instance is closed the server should no longer keep the file open, we will test here to see if we can reproduce the problem.

Another thing that I checked was to see if there were any "Processing playlist" items in the Mezzmo interface. I didn't see any.

Peter
07-28-2017, 10:16 AM
I tried to reproduce the problem here by playing a file on the Roku then stopping it and going to the file on disk and moving it to another folder, the file was moved without any locking issues. Then I tried playing the file from the new location and then moving it back to the old folder and it was reported that the file was open in ffmpeg.exe and could not be moved but once ffmpeg.exe completed I could move the file.

ftanner
07-28-2017, 12:29 PM
I tried to reproduce the problem here by playing a file on the Roku then stopping it and going to the file on disk and moving it to another folder, the file was moved without any locking issues. Then I tried playing the file from the new location and then moving it back to the old folder and it was reported that the file was open in ffmpeg.exe and could not be moved but once ffmpeg.exe completed I could move the file.

I couldn't move it after FFMPeg completed. Not sure what to tell you. I only know what I am experiencing. I even let it sit overnight in case something weird were happening and it STILL didn't move.. It still said it was in use by the Mezzmo Media Server service.

Peter
07-28-2017, 02:55 PM
Did you play the file to the end or just try it as I did to play part of the file? MezzmoMediaServer.exe keeps the file open while the device is requesting bytes so possibly if it gets to the end something different is happening than if you stop it partway through.

ftanner
07-29-2017, 09:39 AM
Did you play the file to the end or just try it as I did to play part of the file? MezzmoMediaServer.exe keeps the file open while the device is requesting bytes so possibly if it gets to the end something different is happening than if you stop it partway through.

I played them most of the way through, stopping just about the time that the credits came on.

Peter
07-31-2017, 10:06 AM
Thanks, we will try this here to see if we can reproduce the problem. As a test could you please try playing a file for a few seconds then stop it and see if you can move the file on disk?

ftanner
07-31-2017, 11:11 AM
Thanks, we will try this here to see if we can reproduce the problem. As a test could you please try playing a file for a few seconds then stop it and see if you can move the file on disk?

Played for 60 seconds and gave it a shot. No joy. Something interesting, I paid attention to it while it did it, is that it goes all of the way through the move cycle one time and the file shows up in the other location. When it goes through the "second cycle", which I am presuming is the delete from the original location, it fails and says "Try Again" or "Cancel". Try Again fails.

Peter
07-31-2017, 01:20 PM
Was it a file you had previously played? The preview thumbnails are only generated once so after it has been done for a file the ffmpeg process will not be run again for the same file.

ftanner
08-01-2017, 09:39 AM
Was it a file you had previously played? The preview thumbnails are only generated once so after it has been done for a file the ffmpeg process will not be run again for the same file.

Nope. This was a brand new file. Intentionally.

Peter
08-01-2017, 10:13 AM
For all new files that are played Mezzmo will deliver a URL to the Roku for the thumbnail preview images and when this is requested it starts ffmpeg.exe to create the images into an archive. You can disable this by setting supportsbif="0" in the <name tag of the Device Profile then save the profile and restart your Mezzmo media server.

ftanner
08-01-2017, 02:54 PM
For all new files that are played Mezzmo will deliver a URL to the Roku for the thumbnail preview images and when this is requested it starts ffmpeg.exe to create the images into an archive. You can disable this by setting supportsbif="0" in the <name tag of the Device Profile then save the profile and restart your Mezzmo media server.

But would that cause the file to be locked for over 24 hours?

Peter
08-01-2017, 03:15 PM
It depends upon how long the process to create the images takes, if there are lots of ffmpeg.exe processes queued then it could take this long but I would expect much shorter times.

ftanner
08-15-2017, 10:21 AM
So... I don't know what changed, but this issue went away... All of a sudden it's working again.