[Support] Djoss - HandBrake


Recommended Posts

6 minutes ago, nuhll said:

Ill do that.

 

Atm i only have that one iso.


It works if i go in GUI with same preset. Then, when i put it in watch folder, it starts, creates directory and first file and then stops with the error above. I dont understand it. If it cant access it, it wouldnt write anything. And if iso would be problem, why does it work in GUI mode..?!?

 

I'm not sure this error code really means that there is a permission issue...  An errno of 2 is usually "No such file or directory".

 

The HandBrake GUI and CLI don't share 100% the same code, so they may have slight differences in their behavior.

Link to comment
2 minutes ago, nuhll said:

Wtf, what was the problem? Such a fast fixing, thank you.

Small issue I introduced in a previous update, about converting in a temporary folder.  Issue was visible only when multiple titles where converted from a disc image.

Link to comment
25 minutes ago, nuhll said:

yea, i know.

 

It creates

./output/filename

./output/.xkjaksd

 

but doesnt used the .xkljsd directory. 

 

Do you mean it's a leftover?  Temporary directory is different for every conversion and should be deleted after conversion.

Link to comment

It seems like that was the problem (but i didnt know how to program work till that time)

 

Now its creating temporary folders and removing it after it.

 

Btw, im using

mv *img 

mv *iso

to mv it to watch folder.. any idea how i can also move the directory where the file is in to watch folder? (so that SAME_AS_SRC is working?)

 

any/dir/moviename/moviename.iso

 

->

 

/watch/moviename/moviename.iso?

 

 

Thats my userscript atm:

#!/bin/bash
mv !*/_unpack/* /mnt/user/downloads/completed/Filme/*/*.[iI][mM][gG] /mnt/user/downloads/DVDR/
mv !*/_unpack/* /mnt/user/downloads/completed/Filme/*/*.[iI][sS][oO] /mnt/user/downloads/DVDR/
logger DVDRs verschoben.

 

find /mnt/user/downloads/DVDR/ -mtime 7 -delete

 

touch find /mnt/user/downloads/DVDR/touch
find /mnt/user/downloads/DVDR/* -type d -empty -exec rmdir {} \;
rm /mnt/user/downloads/DVDR/touch

 

logger DVDRs älter als eine Woche gelöscht.

 

Nice option would be to tell handbrake to only go on specific files, like only on img and iso, so i wouldnt need a seperate watch folder. (and could just use my download folder)

Edited by nuhll
Link to comment

Having an option to enter a list of file extensions to handle could be a solution.

 

An other way is to use pre-conversion hook with a script that removes the file if it is not wanted.  This has the benefit of keeping the watch directory empty when the "Keep Source File" option is disabled.  Only a minor change would be needed in the automatic video converter to support that.

 

And the ugly way that should work in the current version is just let HandBrake fails on files that are not videos...

Link to comment

The problem is he just trys to convert every video file, and this costs much cpu (i have very low cpu..) i really just need him to convert images, because plex cant read that.... :)

 

currently

 

radarr, sonarr -> nzbget -> download folder

-> what plex can read gets imported

-> what plex cant read gets converted


But since handbrake doenst know the correct folder name, radarr  is failing to find the correct directory.. because it looks in the old folder, which is, ofc empty now...^^

 

Edited by nuhll
Link to comment
2 hours ago, nuhll said:

The problem is he just trys to convert every video file, and this costs much cpu (i have very low cpu..) i really just need him to convert images, because plex cant read that.... :)

 

currently

 

radarr, sonarr -> nzbget -> download folder

-> what plex can read gets imported

-> what plex cant read gets converted


But since handbrake doenst know the correct folder name, radarr  is failing to find the correct directory.. because it looks in the old folder, which is, ofc empty now...^^

 

You will need to use a combination of scripts in nzbget and post processing hooks in handbrake to get it to work.

 

I don't have your exact setup, but I still wanted to convert certain files and then have sonarr pickup and move the converted files.  I've managed to get it working this way.

Link to comment
46 minutes ago, nuhll said:

At this moment i just need to edit my script to move directory (instead of just file) which have iso or img in it to the watch folder and im finished, but i couldnt find a way to do it.

Use basename and dirname to build the path that you want from the full path.

Link to comment
3 minutes ago, nuhll said:

Sorry, im windows user...^^

Not sure if this will help but here is my post conversion hook to move the folder once handbrake has finished.  There is probably a more elegant way to do it, but it works for me.

 

if [ "$CONVERSION_STATUS" -eq 0 ]; then
    # Successful conversion.

    #source = /watch
    #output = /output
    #sonarr scan dir = /sonarr
    #subdirectory = $DIR

    DIR=$(dirname "${CONVERTED_FILE}")
    echo "converted file directory = "$DIR""
    SUBD=$(basename "${DIR}")
    echo "folder name = "$SUBD""
    if [ "$DIR" = "/output" ]; then
    echo "no subdirectory, moving to base folder";
        mv -fv "${CONVERTED_FILE}" /sonarr;
    else
        echo "moving $SOURCE_FILE to /sonarr/"${SUBD}""
        mkdir /sonarr/"${SUBD}"
        mv -fv "${CONVERTED_FILE}" /sonarr/"${SUBD}"
    fi
    
else
    :
fi

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.