Jump to content
rawdrewage

converting movies/ shows creates number folders that are never cleaned up

Recommended Posts

rawdrewage

How to deal with this? It's really annoying that when converting happens that I end up with all these numbered directories that I have to manually remove. And if converting is happening when a library scan happens you end up with incorrect items in your library. 

 

This is something that should be handled by the software.It's really not a clean way to do things. It's not like this software is free.

Share this post


Link to post
Share on other sites
Luke

Hi there, can you please discuss an example? Thanks.

Share this post


Link to post
Share on other sites
rawdrewage

OK. When I DVR something, anything, If I convert the recording via emby the server creates a director, named say '33', which it is using for the created converted file, until it finishes converting and moves the mp4 to the proper location but never removes the created directory(s) that it uses to do this process.The server should remove the directories when completed, automatically.

 

For me to clean up I have to ssh to my server, make sure the server isn't doing anything,, su to changed the emby recording directory permissions and then delete the numbered directories manually. It is a real PITA.

Share this post


Link to post
Share on other sites
Luke

Can you go over a specific example in detail? Sorry I'm just having a hard time picturing this. So exactly what was recorded, file/folder names, etc. Thanks.

Share this post


Link to post
Share on other sites
SuperMinecraftKid

Can you go over a specific example in detail? Sorry I'm just having a hard time picturing this. So exactly what was recorded, file/folder names, etc. Thanks.

I think they're talking about folders that dont get cleaned up after a media conversion. For example, my sync directory is 

/mnt/smol/emby/sync

and I have no running conversions at the moment and these are the contents: HjAfvYpWQPfrnJt.png

Each of these folders are empty.

Share this post


Link to post
Share on other sites
rawdrewage

Thanks. That's exactly what I was talking about.I forgot to follow up on this.

Share this post


Link to post
Share on other sites
Luke

It only gets cleaned up after the transfer to it's final destination has taken place. Does that answer your question?

Share this post


Link to post
Share on other sites
rawdrewage

In the FreeBSD version it ie NEVER cleaned up.

Share this post


Link to post
Share on other sites
Luke

Can you please go over an example? thanks.

Share this post


Link to post
Share on other sites
rawdrewage

Those directories in the image in the message above, numbered, they are never removed by emby server. The dude explained it fine. If you use the freebsd version then you can do it yourself by using emby to convert any file. Not sure it requires an example. Just do it yourself and you will see.

 

Is there code in place that is supposed to remove these directories?

Share this post


Link to post
Share on other sites
Luke

Yes there is. Can you please attach the emby server log from when the conversion happened? thanks.

Share this post


Link to post
Share on other sites
rawdrewage
Is this enough?

 

I can see where the stream is recorded and the transcoding temp dir is cleaned up I can see where the intermediate file is created during conversion /home/andrewm/emby-recordings/16/455/e37b49e5-94bd-45ec-91bc-b728ba86b4b4.mp4

 

2019-05-27 22:33:00.103 Info App: Closing SharedHttpStream

2019-05-27 22:33:00.103 Info MediaSourceManager: Live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_d602d5bb971a156facbe0e519d6dab9d closed successfully

2019-05-27 22:33:00.103 Info App: Triggering refresh on /usr/home/andrewm/emby-recordings/American Dad (2005)/Season 14/American Dad S14E07 Shark !.ts

2019-05-27 22:33:00.104 Info App: Refreshing recording parent /usr/home/andrewm/emby-recordings/American Dad (2005)/Season 14

2019-05-27 22:33:00.237 Debug MediaEncoder: Ffprobe -i file:"/usr/home/andrewm/emby-recordings/American Dad (2005)/Season 14/American Dad S14E07 Shark !.ts" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data

2019-05-27 22:33:00.237 Info MediaEncoder: ProcessRun 'ffprobe' Execute: /usr/local/lib/emby-server/bin/ffprobe -i file:"/usr/home/andrewm/emby-recordings/American Dad (2005)/Season 14/American Dad S14E07 Shark !.ts" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data

2019-05-27 22:33:00.301 Info MediaEncoder: ProcessRun 'ffprobe' Started.

2019-05-27 22:33:00.912 Info App: SharedHttpStream is done streaming.

2019-05-27 22:33:00.913 Info App: Deleting temp files /usr/home/andrewm/emby-cache/transcoding-temp/transcoding-temp/214a25926a4340cb92c5ef4a95270f33.ts

2019-05-27 22:33:02.224 Info MediaEncoder: ProcessRun 'ffprobe' Process exited with code 0

2019-05-27 23:15:36.309 Info MediaEncoder: ProcessRun 'Encoding e37b49' Process exited with code 0

2019-05-27 23:15:36.309 Info MediaEncoder: FFMpeg exited with code 0

2019-05-27 23:15:36.309 Debug MediaEncoder: Ffprobe -i file:"/home/andrewm/emby-recordings/16/455/e37b49e5-94bd-45ec-91bc-b728ba86b4b4.mp4" -threads 0 -v info -print_format json -show_streams -show_format -show_data

2019-05-27 23:15:36.309 Info MediaEncoder: ProcessRun 'ffprobe' Execute: /usr/local/lib/emby-server/bin/ffprobe -i file:"/home/andrewm/emby-recordings/16/455/e37b49e5-94bd-45ec-91bc-b728ba86b4b4.mp4" -threads 0 -v info -print_format json -show_streams -show_format -show_data

2019-05-27 23:15:36.358 Info MediaEncoder: ProcessRun 'ffprobe' Started.

2019-05-27 23:15:37.193 Info MediaEncoder: ProcessRun 'ffprobe' Process exited with code 0

2019-05-27 23:15:37.232 Info TaskManager: Queueing task ServerSyncScheduledTask

2019-05-27 23:15:37.232 Info TaskManager: Executing Cloud & Folder Sync

2019-05-27 23:15:37.233 Info TaskManager: Queueing task ServerSyncScheduledTask

2019-05-27 23:15:37.233 Info TaskManager: Convert media Completed after 121 minute(s) and 49 seconds

Share this post


Link to post
Share on other sites
Luke

Ok, I don't see anything obvious here, but please try again with the next release of the server, thanks.

Share this post


Link to post
Share on other sites
rawdrewage

Is this issue being worked on for the next release? Your reply sounds like you are blowing smoke up my ass!

 

There is something in log about creating that numbered directory and nothing about removing it before the log says TaskManager: Convert media Completed . There is also nothing in the log about the file being moved after completing conversion. That seems pretty specific. The file is actually moved to the correct location and file name but the directories are not removed.

 

Do you even use the freebsd version?  

Share this post


Link to post
Share on other sites
MRobi

Is this issue being worked on for the next release? Your reply sounds like you are blowing smoke up my ass!

 

There is something in log about creating that numbered directory and nothing about removing it before the log says TaskManager: Convert media Completed . There is also nothing in the log about the file being moved after completing conversion. That seems pretty specific. The file is actually moved to the correct location and file name but the directories are not removed.

 

Do you even use the freebsd version?  

I use the freebsd version on freenas. I actually have 3 versions running right now. I do media conversion of recorded live tv using beta 4.2.0.5 and not getting any lingering directories after the conversion completes.

Share this post


Link to post
Share on other sites
Luke

 

 

There is also nothing in the log about the file being moved after completing conversion. That seems pretty specific. The file is actually moved to the correct location and file name but the directories are not removed.

 

These activities may not be logged. I can add logging statements for them.

 

 

 

Do you even use the freebsd version?  

Yes, and I'm unable to reproduce.

Share this post


Link to post
Share on other sites
Luke

I use the freebsd version on freenas. I actually have 3 versions running right now. I do media conversion of recorded live tv using beta 4.2.0.5 and not getting any lingering directories after the conversion completes.

 

Thanks !

Share this post


Link to post
Share on other sites
Q-Droid

It looks like your sync directory is in your media location. Is that so?

Share this post


Link to post
Share on other sites
rawdrewage

It is. Is this a problem?

 

How is cleanup handled by emby? I have specified a directory and it is not handling cleanup. Is it handling cleanup if I do not specify a directory?

Share this post


Link to post
Share on other sites
Q-Droid

It is. Is this a problem?

 

How is cleanup handled by emby? I have specified a directory and it is not handling cleanup. Is it handling cleanup if I do not specify a directory?

You are likely creating a conflict by having temp files and directories in a library. The scanner will find the invalid media during conversion. Create a dir path outside of any library and set that to be the sync temp dir. The scanner won't see it and cleanup should work properly. Even if strays get left they won't interfere and will be easier to remove.

Share this post


Link to post
Share on other sites
Luke

The sync directory is only a temp directory, not intended to be a library. After the conversion is complete, the converted file gets moved to it's final destination and deleted from the temp folder.

 

So yes I would change that setting. I would suggest setting it back to default and just blanking it out.

Share this post


Link to post
Share on other sites
rawdrewage

For now blanking it out and going with the default.

 

Thanks for the help.

Share this post


Link to post
Share on other sites
rawdrewage

After changing this setting same problem. It never deletes the folders. See attached picture with ls -la to show creation dates of folders. I waited a few days but it did nothing. So my same problem still exists. Why doesn't emby clean out these folders when done.? Are they cleaned out for you Luke or anyone?

 

5cf548dc5bef6_Untitled.png

Share this post


Link to post
Share on other sites
Luke

Yes, it is probably permissions related. Try using the default path if you can't figure out the folder permissions.

Share this post


Link to post
Share on other sites
rawdrewage

I would not think it's permissions related as all the folders are owned by emby and are group emby. You can see the full permissions for the folders I speak of.

 

I am using the default path and was using such for the screen capture.

 

This must be a bug. What else could it be?

Share this post


Link to post
Share on other sites

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...