Comments on: MythTV Transcoding (3): Transcoding for iPad Playback http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/?utm_source=rss&utm_medium=rss&utm_campaign=mythtv-transcoding-3-transcoding-for-ipad-playback by Oliver Gorwits Sun, 29 Dec 2013 17:47:01 +0000 hourly 1 http://wordpress.org/?v=3.6.1 By: Brian Pickford http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/#comment-484 Brian Pickford Sun, 29 Dec 2013 17:47:01 +0000 http://blog.gorwits.me.uk/?p=577#comment-484 I’ve followed this guide and enjoyed the results, thanks for your efforts in documenting this.
To make it work on Mythbuntu 12.04LTS I had to compile Yasm from source. I guess this issue will disappear with the next LTS.

Additionally to use this with mythexport, I added the following to a file called /usr/share/mythexport/configs/TabTrans.pm


#!/usr/bin/perl

# Update this with a package name relivant to your new config, make sure it matches with the file name (without the extension).
package TabTrans;

use ExportBase;

our @ISA = qw(ExportBase);

#Example strings, replace with something relivant to your new config.
my $description = "h264xcode default settings.";
my $devices = "Tablet and superphone";
my $notes = "Requires custom ffmpeg build, see http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/";
my $version = "1.0";

#Inherit our base class.
sub new{
my $class = shift;
my $self = $class->SUPER::new(shift, shift, $description, $devices, $notes, $version);
bless $self, $class;
return $self;
}

sub export{
my( $self ) = @_;

# Any command can go here, below is an example of ffmpeg, but you can use anything you would like.
# Available variables are inputFile, outputFile, and extension
# system("ffmpeg -i \'$self->{_inputFile}\' -y -pass 1 -an -vcodec libx264 -vpre slowfirstpass -vpre ipod640 -b 1500kb -bt 1000kb -threads 0 -s 800x480 -aspect 16:9 -f$
system("time nice -n 19 /usr/local/bin/ffmpeg-264 -i \'$self->{_inputFile}\' -y -map 0:0 -map 0:1 -er 4 -f ipod -acodec libfaac -ac 2 -ab 128k -ar 44100 -deinterlace -vc$

}

#Feel free to use or extend anything from the base class.

1;

]]>
By: Oliver Gorwits http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/#comment-347 Oliver Gorwits Sun, 19 May 2013 18:33:09 +0000 http://blog.gorwits.me.uk/?p=577#comment-347 As root (you may have to sudo):

touch /var/log/mythtv/h264xcode.log
chmod mythtv.mythtv /var/log/mythtv/h264xcode.log

]]>
By: David Tranter http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/#comment-346 David Tranter Sat, 18 May 2013 18:14:11 +0000 http://blog.gorwits.me.uk/?p=577#comment-346 I have this all setup but am seeing the job queued as per the first comment from Brad how do I carry out the below suggestions?

you need to (as root) touch /var/log/mythtv/h264xcode.log and chmod it to mythtv:mythtv. Otherwise the jobs stay in the ‘queued’ state because mythtv doesn’t know about the errors (see below).

]]>
By: Oliver Gorwits http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/#comment-131 Oliver Gorwits Sun, 09 Sep 2012 12:05:11 +0000 http://blog.gorwits.me.uk/?p=577#comment-131 Hi Brad,

Two excellent comments, many thanks. I’ll make a note to update the example script to handle the ffmpeg return code and pass it to mythtv.

regards,
oliver.

]]>
By: Brad http://blog.gorwits.me.uk/2011/09/04/mythtv-transcoding-3-transcoding-for-ipad-playback/#comment-130 Brad Thu, 06 Sep 2012 11:59:56 +0000 http://blog.gorwits.me.uk/?p=577#comment-130 First, thanks! This is really great!

Second, you need to (as root) touch /var/log/mythtv/h264xcode.log and chmod it to mythtv:mythtv. Otherwise the jobs stay in the ‘queued’ state because mythtv doesn’t know about the errors (see below).

Third, you should probably handle errors from ffmpeg so that mythtv knows the status of the job, and so that you’re not moving unfinished videos to your ipad directory.

Last, thanks again!

]]>