Automatic prospective transcoding / format conversion

My Problem: I configured plex on my raspberry pi 2 in combination with plexconnect and my ATV3. Unfortunately a huge set of our movies is in avi format, so the RPI2 cpu load during broadcasting is very high due to live-transcoding (from avi to m4v). As a result the movies are interrupted every couple of minutes for a couple of minutes …

Idea and assumptions:

  1. I would like to convert my avi files to m4v in advance to avoid the necessity of live-transcoding.
  2. Assuming that RPI2 is running constantly anyway it will have enough time to perform the conversion until time comes when I will want to watch the movie.
  3. I don’t want to start each conversion process manually because there is a running system …

With other words:
I know there are a couple of software version out there that allow conversion of single movie files to another format. But what I would like to do is to establish a procedure that is kicked once I add a new movie to my plex media server (similar to grabbing movie information from the databases) and which converts the movie into another defined format (m4v).

Question:
1. Is there a possibility to use the transcoding tools for movie-conversion ans storing into a new file in advance?
2. Alternatively: Is there a software for format conversion that can be started via shell script?

Version #2 might allow a background process that checks constantly for new files in my movie folder and that starts conversion for new files once they are detected.

As this is not specifically a topic about the Rasplex Client I would suggest moving this to the Linux sub forum.

You can use ffmpeg which your Raspberry Pi PMS server has installed (it’s used by the transcoder) and then you’ll have to write a Python script to watch for new movies which aren’t in the correct container/codecs and then kick off the conversion and move to a directory of choice. The Python script would be a cron job which will run at intervals you determine.

It is entirely possible, if you search the Linux forum I’m sure this has been raised in the past and you might find something useful.

Regards