Watch Folders


Nezra

Recommended Posts

Not exactly an unraid question, but in a way it is.

 

Looking for some expertise from some of the gents here. What i'd like to do ultimately is set up something, either a VM or a docker, to watch a folder on my share and re-encode videos i have a pair of decently heavy weight processors on one of my 2 unraid boxes that for lack of a better terms are under utilized because i can't slap a video card in it. Here's what i'm wondering.

 

1. Is there a prebuilt solution anyone is aware of to facilitate this easy and out of the box, via a docker or a VM. anyone else doing this have a preference?

 

2. if i go the VM route with a lightweight command line linux distro, it's sole purpose would be to watch a few different folders on the share, and depending on what the folder is run handbrake in CLI via a specified preset. i've looked into 'Inotify' but i still can't quite wrap my head around it. any suggestions on a distro as well? i have some experience with Ubuntu & debian(RPI version) but a tad clueless overall if that helps with suggestions. any help with the inotify stuff would also be useful.

 

3. i looked a bit into the docker for handbrake, but i couldn't figure out how to get it to load into the template. i'm unfamiliar with how dockers in general work, despite best efforts on getting it to work. i assume the point i am missing is i'd have to create a custom template to get it to work, but i couldn't find the "dummies" version of the instructions to get it into a template.

 

If at all possible, if there is a prebuilt variant, or if not, a useful explanation of how and why it works would be amazing as well, as i'd love to actually learn why and how it works. Sometimes the journey is more educational and helpful than the final product, as it'd allow me to understand why and how to overcome future oddities.

 

I have a friend who does some content creation, and asked me if this was possible so he can convert the raw footage into a few different formats. My use case would be:

 

1. Video file is place in 1 of 3 user share folders.

2. Depending on which folder i put it in, a different preset would be run on handbrake and it would be re-encoded.

3. The output file would go into a destination folder depending on the initial folder.

4. a clean up would be done to remove the original file. if it can't be re-encoded, or it fails, said file goes into a rejected folder so i can look at it later. if at all possible, i'd love some sort of log from the handbrake failure. way back in my early dos days, i'd just pipe the output to a 'log'. i'm assuming that's possible as well.

 

If anyone has any insight or ideas, or even a where to begin or suggestion, i'd appreciate anything from snarky to helpful.

 

It's more of an educational experience than anything.

Link to comment

Another option is MCEBuddy. http://www.mcebuddy2x.com/

 

I have it in my Win8vm to do what you mention.

 

Basically it is setup to take DVR recordings off my HTPC and put them on my server. That way shows can be watched in any room in the house using Plex.

 

All different settings you can do with it. I have been using it for 5+ years without too many issues and most issues are usually on my end.

 

 

Link to comment

There is already a Handbrake docker template created by members of this forum. Do you have Community Applications plugin installed?

 

Have you read the Docker FAQ sticky at the top of the Docker Engine subforum?

 

TRurl,

 

I do have CA installed, and i tried adding the github reference for the handbrake docker into templates, but i don't get a template i can add for it. when i go to the github, there's a docker file.

 

Unless there's a different one/way i am supposed to approach it, or there's a different handbrake docker i should be referencing.

 

This is the post in question:

 

http://lime-technology.com/forum/index.php?topic=39624.0

 

I installed CA as a result, but still couldn't get the template to show up in my docker templates.

 

Link to comment

There is already a Handbrake docker template created by members of this forum. Do you have Community Applications plugin installed?

 

Have you read the Docker FAQ sticky at the top of the Docker Engine subforum?

 

TRurl,

 

I do have CA installed, and i tried adding the github reference for the handbrake docker into templates, but i don't get a template i can add for it. when i go to the github, there's a docker file.

 

Unless there's a different one/way i am supposed to approach it, or there's a different handbrake docker i should be referencing.

 

This is the post in question:

 

http://lime-technology.com/forum/index.php?topic=39624.0

 

I installed CA as a result, but still couldn't get the template to show up in my docker templates.

Are you sure you know how to use CA? I think you are making things more difficult than necessary by even worrying about templates.

 

Normally, a user doesn't even need to be aware of templates. A template is just an XML file that is used to prefill the Add container form. The dropdown on the Add container page will let you select a template, but it isn't really needed since CA takes care of everything for you.

 

If you go to CA and tell it to add a docker, it takes you to the Add container form with much of it already filled in from the template the docker author already supplied. You don't need to select a template or even think about templates. Depending on the specific container and your specific configuration you may need to complete the form, so that it will know which folders to use, for example.

 

Link to comment

I have a friend who does some content creation, and asked me if this was possible so he can convert the raw footage into a few different formats. My use case would be:

 

1. Video file is place in 1 of 3 user share folders.

2. Depending on which folder i put it in, a different preset would be run on handbrake and it would be re-encoded.

3. The output file would go into a destination folder depending on the initial folder.

4. a clean up would be done to remove the original file. if it can't be re-encoded, or it fails, said file goes into a rejected folder so i can look at it later. if at all possible, i'd love some sort of log from the handbrake failure. way back in my early dos days, i'd just pipe the output to a 'log'. i'm assuming that's possible as well.

 

I do something similar in a windows network.  I'm re-encoding some things in HEVC, so I'm using my Solidworks workstation at night.  I wrote a powershell script that:

 

  • Looks in a source folder and subfolders and makes a list of files
    Compares it to the destination folder and subfolder to create a list of files to be converted
    Passes each filename to Handbrake CLI along with the encode parameters.  Output is set to the destination folder
    Checks to be sure there is at least one hour before 'work time' starts
    Continues to the next file

 

Really not much to it.  When you get a Handbrake docker installed I can't see why you can't do the same in bash

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.