[mythtv-users] Exporting for iPad
Matt Wynne
matt at mattwynne.net
Thu Aug 9 19:29:03 UTC 2012
On 9 Aug 2012, at 02:17, Kingsley Turner wrote:
> On 08/08/12 21:13, Matt Wynne wrote:
>> We're going away on holiday and I'd like to put a few of the kids' favourites on the iPad.
>
> It's a bit OT, but I simply choose the "IPad" option on Handbrake - it makes a beautiful transcode. But a bit less myth-centric
>
> Very OT: My father-in-law calls Handbrake "The Pineapple"
I had a crack with the pineapple, and it gave me some good pointers for settings and codecs to use with my avconv script. I could have figured out how to script handbrake but I almost had my avconv script working by that point.
It looks like mythexport with RSS will be the best solution ultimately, but I ran out of time faffing about trying to work out why myexport wasn't doing anything.
In case anyone's interested, here's what's got me an iPad full of cartoons for the flight tomorrow:
#!/usr/bin/env ruby
details = `echo "select title, subtitle, basename from recorded where title in ('Postman Pat', 'Octonauts', 'Raa Raa the Noisy Lion', 'Mr Men')" | mysql -u root mythconverg`
count = 1
files = details.split("\n")[2..-1].map { |line| line.split("\t") }
files.each do |show, title, file|
source_file = "/home/mythtv/recordings/#{file}"
output_file = File.join("~", "Dropbox", "Kids TV", "#{show} - #{title}.mp4")
next unless File.exists?(source_file)
puts "Processing #{show} - #{title} (#{count} / #{files.length})"
cmd = [
'avconv',
"-i #{source_file}",
'-c:v libx264',
'-c:a libfaac',
output_file.gsub(/ /,'\ ')
].join(' ')
system(cmd)
count += 1
end
Thanks for the tips everyone.
cheers,
Matt
--
Freelance programmer & coach
Author, http://pragprog.com/book/hwcuc/the-cucumber-book
Teacher, http://bddkickstart.com
Founder, http://www.relishapp.com/
Twitter, https://twitter.com/mattwynne
More information about the mythtv-users
mailing list