LinHES Forums
http://forum.linhes.org/

Mencoder for auto transcode
http://forum.linhes.org/viewtopic.php?f=11&t=9996
Page 1 of 1

Author:  Balderscape [ Wed May 10, 2006 5:31 pm ]
Post subject:  Mencoder for auto transcode

Hi Guys,

I have set up a script in User Job #1 to use mencoder to automatically to a 2 pass transcode to MPEG-4 in a windows and linux compatible format. This means in the video manager I can play these transcoded files and if I browse the samba share from a windows box I can as well.

What I would really like to do is when the transcode is done, delete the original file and then replace it with the newly transcoded file, much like the behaviour of the built in transcoder. I could add this to my script, however I would like it to only occur when the file is not in use, I.e. when I am not currently watching that file on the frontend. I believe that the inbuilt transcoder works this way. Is there any way I can get this behaviour on my external script??

Regards,

Paul

Author:  solaris [ Thu May 11, 2006 10:30 am ]
Post subject: 

command 'fuser file' will tell you if the file is in use.

sample shell code:
Code:
if fuser -s $file; then
  echo "$file is in use, quit"
  exit
else
  mv $newfile $file
fi

Author:  s1148625 [ Sun May 14, 2006 4:30 pm ]
Post subject: 

Would you mind posting the code for your mencoder script? I've been looking for something like this for quite some time, but don't have the scripting skills to make it happen...

Author:  Balderscape [ Tue May 16, 2006 8:09 pm ]
Post subject: 

Hi,

Yes I will post the script up here soon, (I dont have net access from home at the moment but will be able to cut/paste it when the access is back).

I have found that although video manager is able to view and play these transcoded files, the mythfrontend can not. If I symlink a recorded file to a file that I transcoded, when mythfrontend goes to start the preview it crashes..

commflag --rebuild runs ok on the transcoded files but even after this is done the frontend cannot handle them. Are there any flags that I can put in an mencoder string that will allow the frontend to handle them and yet still have them playable on windows?? Using the build in transcode the files do not have audio on windows boxes, but do on the mythfrontend. using mencoder they have audio on windows and play with mplayer (video manager) but crash frontend when played with the normal recorded programs player.

Regards,

Paul

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/