Jump to content

Conversion file delete failure


Recommended Posts

darkassassin07
Posted (edited)

A few times now I've found duplicates of my media and wondered why, but I finally pinned it down:

 

When converting a file, 'replacing original files', and that file happens to be being streamed to a client; emby tries and fails to delete the original instead of waiting for the stream to finish.

 

Attached is a log from an example:

(2024-02-16 17:47:03.778) The file "Dear God 1996 1080p-WEBRip.mp4" was added to a library that converts new media to mkv-h265.

(2024-02-16 18:46:51.876) While that media was being converted, a client began streaming it.

(2024-02-16 18:54:10.305) The converter tries to delete the file but fails because its in use by fmpeg.

(2024-02-16 19:04:33.189) Playback stops.

From here, there's now two seprate "Dear God" items in the same library needing manual cleanup. The original mp4, and a new mkv.

embyserver.txt

Edited by darkassassin07
Junglejim
Posted

Why not schedule the conversion to run when your server is less busy?

darkassassin07
Posted

That's a way to work around this bug to an extent, but users can stream any media at any time.

Emby should recognize it's using a file it wants to delete and wait until it's own processes are finished with it.

  • Agree 1
  • Thanks 1
darkassassin07
Posted
On 2/16/2024 at 10:28 PM, Junglejim said:

Why not schedule the conversion to run when your server is less busy?

It seems this actually doesn't work either.

 

As soon as media is added to the conversion queue (whether that's because new media was added to a library that converts all newly added media, or because a user manually added a new convert task), the converter starts. It doesn't wait for a trigger from the schedule under 'scheduled tasks'.

 

I just have the default 'every 3 hours' set in that task, but it triggers immediately when new media is added.

Posted (edited)
1 hour ago, darkassassin07 said:

It seems this actually doesn't work either.

 

As soon as media is added to the conversion queue (whether that's because new media was added to a library that converts all newly added media, or because a user manually added a new convert task), the converter starts. It doesn't wait for a trigger from the schedule under 'scheduled tasks'.

 

I just have the default 'every 3 hours' set in that task, but it triggers immediately when new media is added.

This is true and it's been this way for as long as I can remember. If you have queued up media conversions waiting for the scheduled task to run they will be grabbed by anything that starts a conversion. There is no separation between when conversions are run whether for libraries, shows, conversion queues or manual one-time runs.

 

Edited by Q-Droid

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...