[mythtv-users] Remote Transcoding

Raymond Wagner raymond at wagnerrp.com
Thu Nov 17 14:53:50 UTC 2011

On 11/17/2011 09:29, P. Laflamme wrote:
>> The only underlying support that I can think of that is missing is the
>> ability to rename a remote file.  Since we transcode to a temp file then
>> swap it into place.
> Excuse my newby-ness, but why do we need to rename files during this
> process? Here's how I thought the process works (probably hugely
> over-simplified): the slave backend fetches the original file
> (123.mpg) transcodes it to a new file locally (123-1.mpg) then sends
> that to the master backend (as 123-1.mpg)?

When you are editing a file, you can't simply do it in place.  You have 
to write a new one out from scratch.  Small files can be buffered in 
memory, but videos are too large for that.  You need to write them to 
some temporary file, delete the original, and move the new file in its 

When you are running playback on a frontend, or remote commflagging, the 
videos never touch the local filesystem.  All data is streamed over 
mythprotocol.  Remote transcoding would follow the same procedure.  Any 
other setup would be artificially limiting to users running powerful 
machines with no local storage.  You read the data over mythprotocol, 
transcode, and write the data back out over mythprotocol, leaving all 
storage requirements on the remote backend.

Since you couldn't write to the file you were reading from, you need a 
call to tell the remote backend to rename that file once you're done.  
Alternatively, you could just alter the basename in the database and 
delete the old file.

More information about the mythtv-users mailing list