<br><br><div class="gmail_quote">On Wed, Jun 9, 2010 at 1:39 AM, Brian Frost <span dir="ltr">&lt;<a href="mailto:bfrost@brainboy.com">bfrost@brainboy.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I spent several evenings trying to figure out what is wrong with my mythexport. It just wouldn&#39;t import into itunes... They would jsut show up with an error in iTunes. So I installed handbrake-cli and then hacked at the mythexport daemon. All I really did was install handbrake-cli then change the line that executes ffmpeg and change it to work with handbrake.<br>


<br><br><br>This is what I did on my UBUNTU system (if you are using something else then you can find a different way to install handbrake-cli):<br><br><br>1) sudo add-apt-repository ppa:stebbins/handbrake-snapshots<br>
<br>
2) sudo apt-get install handbrake-cli   <br>
<br>
3) then &#39;sudo vi /usr/bin/mythexport-daemon&#39;<br>
<br><br><br>
 foreach (@args){<br>
        if($_ =~ m/\/dev\/null/){<div class="im"><br>
            $_ = &quot;nice -n19 ffmpeg -i $filename $_&quot;;<br>
        }<br></div>
        else{<br>
<b>            $_ = &quot;nice -n19 HandBrakeCLI -i $filename -o &#39;$newfilename&#39; --preset=\&quot;iPhone &amp; iPod Touch\&quot; 2&gt;&amp;1&quot;;<br>
</b># ADD THE LINE ABOVE AND ADD A HASH TO THE ONE BELOW <br>
#          $_ = &quot;nice -n19 ffmpeg -i $filename $_ &#39;$newfilename&#39; 2&gt;&amp;1&quot;;<br>
        }<br>
    }<br>
<br>
<br>
<br>
then restart mythexport &#39;sudo /etc/init.d/mythexport restart&#39;<div><div></div><div><br><br></div></div></blockquote><div><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div>First off, this is an awesome idea and thanks for posting it. However I&#39;m seeing some really weird behavior. I&#39;ve modified my mythexport-daemon to look exactly as yours and bounced the daemon. I then kicked off a mythexport job. When I fire up top and tail the mythexport log, I see ffmpeg running! So, I killed the PID of ffmpeg, planning on re-bouncing the daemon or restarting the whole mythbox, and now HandbrakeCLI has kicked in! It seems like it&#39;s a 2 pass process, and the first pass still uses ffmpeg? <br>
<br>Here&#39;s one thing I noticed: In the mythexport.log while ffmpeg is running, it says this:<br><br>matt@magic:/var/log/mythtv$ tail -f mythexport.log<br>Output #0, mp4, to &#39;/dev/null&#39;:<br><br>And I noticed that when I modified the binary, I did not modify the following:<br>
<br> foreach (@args){<br>
        if($_ =~ m/\/dev\/null/){<br><br>
            $_ = &quot;nice -n19 ffmpeg -i $filename $_&quot;;<br>
        }<br><br>So, it seems that it passes to /dev/null first by design? Why is this? Do I want to replace that dev/null section with handbrake as well, or is there a better way to do this in the mythexport settings? <br>
<br>(Oh, and my export is still going, so I can&#39;t tell if the resulting file is good or not yet :-) )<br></div></div></blockquote></div>