Partial encoded files with 'encode'

Developers use this forum to converse current issues and ideas about Freepia work.

Moderator: Moderator Team

Partial encoded files with 'encode'

Postby remus » Fri Oct 06, 2006 12:36 am

Hi the2nd !

I found and fixed the problem that you pointed out with 'encode' that would only partially encode some files. There was a race condition when starting 'mencoder'. 'encode' would go off to find a file to encode but if the file is not found fast enough then the next loop will come over and will ask if 'mencoder' is running. If it's not running yet because 'encode' is still looking for the first file to encode then it would start anoter process that would look for a file to encode and you could end up with 'mencoder' trying to encode 2 or more files at the time.

Since we use 2 pass encoding this will not work very well since all 'mencoder' processes will use the same log file and when the second pass comes along the log file will be all screwed up. If you use a dedicated log file it still doesn't solve the problem for all the cases since if the same file is chosen to be encoded you'll overwrite the same 'mencoder' log file.

The solution is to basically use the 'mencoder.pid' file as an absolute lock and not remove this file if the 'mencoder' process is not running yet. We also remove this file at boot time to recover from eventual previous crashes.

I also fixed a bug where the encode log file was hardcoded in the code and the status wasn't working properly.

Unfortunately in the process of fixing these issues it looks like I broke the automatic startup of 'encode' at boot time. How does this work ? Do you call
Code: Select all
encode boot
at boot time ?

I can post the changes if you want or maybe they will go into the new release eventually.

remus
remus
Freepia wanna-be
 
Posts: 56
Joined: Sun Sep 11, 2005 2:48 am

Re: Partial encoded files with 'encode'

Postby the2nd » Thu Oct 26, 2006 7:11 pm

remus wrote:Hi the2nd !

I found and fixed the problem that you pointed out with 'encode' that would only partially encode some files. There was a race condition when starting 'mencoder'. 'encode' would go off to find a file to encode but if the file is not found fast enough then the next loop will come over and will ask if 'mencoder' is running. If it's not running yet because 'encode' is still looking for the first file to encode then it would start anoter process that would look for a file to encode and you could end up with 'mencoder' trying to encode 2 or more files at the time.

Since we use 2 pass encoding this will not work very well since all 'mencoder' processes will use the same log file and when the second pass comes along the log file will be all screwed up. If you use a dedicated log file it still doesn't solve the problem for all the cases since if the same file is chosen to be encoded you'll overwrite the same 'mencoder' log file.

The solution is to basically use the 'mencoder.pid' file as an absolute lock and not remove this file if the 'mencoder' process is not running yet. We also remove this file at boot time to recover from eventual previous crashes.

I also fixed a bug where the encode log file was hardcoded in the code and the status wasn't working properly.

Unfortunately in the process of fixing these issues it looks like I broke the automatic startup of 'encode' at boot time. How does this work ? Do you call
Code: Select all
encode boot
at boot time ?

I can post the changes if you want or maybe they will go into the new release eventually.

remus


hi remus,

sorry for my late answer. but i am still busy with my new freelancer job.

yes, "encode boot" is run from /etc/init.d/rc.xstartup on Xorg startup. dont remember why its started from there and not via normal init script. :)

i will look at the forum from time to time and try to answer all posts.

just keep up the good work. :)

regards
the2nd
User avatar
the2nd
Freepia *maker*
 
Posts: 456
Joined: Sun May 25, 2003 11:14 pm

Re: Partial encoded files with 'encode'

Postby Jiellen29 » Mon Oct 18, 2010 6:35 am

hey dspguru.

I bougth this up a few month ago and I have seen that you have releases a few update on vobinput.dll since then. But you never fixed my suggestion/bug.

so here it comes again, just so you don't forget it.

I have found that the patial Encoding don't work together with vobinput.dll. If I set the start to 0 and end to 10 sec and press the 'vob to mp2' button it crash. But if I turn Patial Encoding of, then it works fine. So vobinput DON'T work together with patial encoding.

I don't have any log file. Because Besweet only manage to make an empty log file before it crash. :/

I hope you can fix this DSPguru.

Thanks.
Jiellen29
Freepia Freshmeat!
 
Posts: 2
Joined: Mon Oct 18, 2010 3:38 am


Return to Freepia Development

Who is online

Users browsing this forum: No registered users

cron