Page 1 of 2

FFMPEG install

Posted: Mon May 25, 2015 10:35 am
by MikeG.6.5
Ok, this wasn't nearly as hard to get the full package as it was to get Perl working. For starters, go to this website:

http://johnvansickle.com/ffmpeg/

Take a 32-bit for the AS-20x and AS-30x series NAS and the 64-bit for the others. Unzip it to a directory of choice.

Make sure any script you put together points to the proper directory when you set up the scripts.... Totally functional and works from a PuTTY terminal very well.

Not sure why we have to always side-load things to get working packages of apps and utilities we need to run these little boxes, though.

Going to work on some scripting to fully automate downloads for movies and TV Shows, etc. Some of them are copied from scripts put together by a Plex user and some I have to make on the fly. If anyone is interested in these, reply here and I'll put them up as I get them.

Re: FFMPEG install

Posted: Sat Oct 31, 2015 6:33 am
by Jagstyles
You already know this, but i'm all in on this process if you can guide me through the install :)

Re: FFMPEG install

Posted: Sat Oct 31, 2015 7:33 am
by Jagstyles
Hi Mike,

I followed all of the instructions you had posted on a different website:

https://forums.plex.tv/discussion/16535 ... ng-scripts

How do you get the test-conv.sh script to run at all times? I guess what I need to understand is how to I launch these scripts so they are always running? I have followed them to a tee and even used Putty to login using root and executed the following code:

:/volume1/.@root # /volume1/Misc/Convert/manual.py -a -i /volume1/Misc/Convert/process
Manual processor started.
64bit Python.

So it seems to be working although I haven't tested it by putting an MKV file in there. Not sure what would come next? Do I now set Deluge to set the /Process folder as the folder to store all completed downloads? Then the scripts kick in, do its then and kick out the completed converted file to the /Complete folder?

I guess what breaks in my current process of doing things is the renaming of the file and then the moving over to my plex library folder.

Re: FFMPEG install

Posted: Sat Oct 31, 2015 7:37 am
by Jagstyles
Also, I had to install Photo Gallery as that's what I'm using to organize and store my photos on the NAS. It requires FFMPEG installed from the App store on the Asustor. Will this conflict with the version I copied over into the FFMPEG directory I created using your instructions? or should I have done a manual install in the App store??

Re: FFMPEG install

Posted: Mon Nov 09, 2015 8:44 am
by MikeG.6.5
For starters, the ffmpeg that installs from the App Store is a crippled up version. It runs only what Asustor feels they want you to run. Install that and it goes into a folder you can't see from the ADM.

Next, if you followed the instructions from that page completely, and use the directory structure I gave there, you should have something like this for you other ffmpeg install: /volume1/misc/convert/ffmpeg This is where any or all scripts for conversions should be looking for ffmpeg, ffmprobe, etc....

Last, the ONLY way you can get the scripts to check for files is to use WinSCP or another shell client to edit the cron file. This is located at: /volume0/usr/builtin/etc/crontabs/root. The file name is root.... No extension.... You can NOT get to this file through the ADM as this is another thing Asustor assumes no one needs to know how to manipulate.... Everything should be strictly through the ADM as far as they seem to think....

I put the following header into the file to make it easier to know what's going on....

Code: Select all

# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
Then I use this line to call Test-Conv.sh every 15 minutes: */15 * * * * /volume1/misc/Test-Conv.sh

This checks if ffmpeg is already running, if not, starts it off the conversion for the files in the folder. If so, it waits the 15 minutes for the next check. Otherwise you can get some REAL nasty loops and things happening, and no memory left on your NAS as it keeps the loops going indefinitely.

Let me know how this goes.

Re: FFMPEG install

Posted: Tue Nov 10, 2015 9:32 am
by Jagstyles
Thanks Mike. I had tried editing the roots file and added the line you mentioned. This is what my roots file looks like:

0 4 * * 0 /usr/builtin/sbin/syssetagent "System Setting"
0 2 * * 0 /usr/builtin/sbin/extbkagent "NASBackup"
*/15 * * * * /volume1/Misc/Test-Conv.sh
30 0 * * * /bin/sh /usr/builtin/sbin/ntpupdate.sh north-america.pool.ntp.org

Did I miss anything? I setup all the right directory names and structure just as you had it but notice that the Test-Conv.sh is not being loaded or executed in any way. So the MKV files remain in the PROCESS folder and never get converted. I've tried rebooting the NAS as well but no luck.

Any ideas/suggestions? I'm starting to think it's because the file name is actually "test-conv.sh" instead of "Test-Conv.sh". I believe everything is case sensitive. I've renamed the file and rebooted the NAS. Will report back to see if this resolves it.

Thanks again.

Re: FFMPEG install

Posted: Tue Nov 10, 2015 2:15 pm
by MikeG.6.5
Yeah, file names (And directories!) are case sensitive in most flavors of Linux.... Without a doubt this is your issue. (OK, about 99% sure it is, anyway...) :)

If nothing else we can do a TeamViewer session and I can look at things a bit. PM me when would be good for you if we need to go that route.

We haven't discussed this yet, but going to throw it out there... If you haven't installed PlexPy yet, do so. You can find the info for it here: https://forums.plex.tv/discussion/16959 ... ng-program This is a LONG thread, but getting it running is pretty straight forward for Asustor. And it runs SWEET! It provides historical info on who, what, when and how someone streams your media. Mine is installed to /volume1/Misc/PlexPy. I have a check running on it just as I do for Plex itself, if you want/need that script let me know.

This is what I would consider the barest information to troubleshoot someone's connection issues, buffering issues, or a lot of other problems while running Plex. It's too bad the Plex Team themselves don't see it as important as someone with my background. (30+ years in a Client/Server environment.)

Re: FFMPEG install

Posted: Sat Nov 14, 2015 8:39 am
by Jagstyles
Okay so I've double checked all my settings and edits and the service still doesn't run on startup so it's not automatically scanning my Process folder or running FFMPEG when it sees MKV files in that folder. I'm still forced to manually run the script.

I checked paths, file names etc etc. I check Activity Monitor and don't see it running anywhere. I'm not sure where I've gone wrong. Also, I've created the directory for PlexPy but not sure how to execute it automatically either.

Any ideas/suggestions??

Thanks

Re: FFMPEG install

Posted: Fri Oct 07, 2016 5:19 am
by MikeG.6.5
As of today I have now made a zip file of the conversion scripts and the (today's) versions of ffmpeg. I am hosting this on my NAS's ftp server for anyone here to download.

It's got a readme.txt file, not as pretty as some, but it tells you what you need to know to make this all work. It has 2 versions of ffmpeg, one for 32-bit and one for 64-bit. The 64-bit is already in the ffmpeg folder in the zip.

You can get to it here: ftp://anonymous:anonymous@rmgud.myasustor.com/Public/ If you try and can't get into the server it might be I have your country code already locked out. I've had some folks try hacking in. (Had to implement both router side and NAS side geo-blocking) Let me know in a PM what your email address is and I'll send it to you.

Just make a folder called misc under the /volume1 and unzip this there. Read the readme.txt, and ask if you have questions.

Re: FFMPEG install

Posted: Sat Oct 08, 2016 2:35 pm
by SPOinNS
First let me say a belated welcome back. You were sorely missed. Any teachable moments you care to share from your catastrophe?

Secondly, I was very happy to see your post about the conversion scripts and downloaded what I assume is the correct file: "Convert-Asustor.zip". I wanted to check out the readme.txt file inside the zip before installing but I can't find it. Is it created at the moment of unzip and install for some reason?

Or did you forget to include it? God knows, I've never sent an email without the attachment I referenced in the text. No sir, almost never...