SlideShare a Scribd company logo
1 of 85
Timeshift Everything, Miss Nothing Mash up your PVR with Kamaelia Euro OSCON 2006, Brussels Michael Sparks, Senior Research Engineer, BBC Research
[object Object]
[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
[object Object],[object Object]
 
 
 
[object Object]
[object Object]
Kamaelia Macro: Target DVB Multiplex outbox Channel Transcoder inbox DVB  Demuxer  BBC_ONE inbox Channel Transcoder inbox Channel Transcoder inbox Channel Transcoder Channel Transcoder Channel Transcoder inbox inbox inbox BBC_TWO BBC_THREE BBC_FOUR CBEEBIES CBBC
Kamaelia Macro: Status DVB Multiplex outbox Channel Transcoder inbox DVB  Demuxer  BBC_ONE inbox Channel Transcoder inbox Channel Transcoder inbox Channel Transcoder Channel Transcoder Channel Transcoder inbox inbox inbox BBC_TWO BBC_THREE BBC_FOUR CBEEBIES CBBC
Kamaelia Macro: Status Scaling up simply awaiting hardware DVB Multiplex outbox Channel Transcoder inbox DVB  Demuxer  BBC_ONE inbox Channel Transcoder inbox Channel Transcoder inbox Channel Transcoder Channel Transcoder Channel Transcoder inbox inbox inbox BBC_TWO BBC_THREE BBC_FOUR CBEEBIES CBBC
Top Level Schematic DVB Multiplex outbox Channel Transcoder inbox DVB  Demuxer  BBC_ONE inbox
Channel Transcoder Schematic Channel Transcoder EITDemux inbox _eit_ inbox EITParsing outbox inbox Carousel transcoder_factory inbox next outbox
Programme Identification Schematic EIT Parsing PSI Packet Reconstructor inbox inbox EIT Packet Parser outbox inbox Now Next service filter Now Next Changes outbox inbox outbox inbox outbox outbox
Programme Transcoding Schematic (a pipeline) Programme Transcoder Pipethrough (“mencoder -o file options...”) inbox control signal inbox control _transcodingcomplete _stop signal
[object Object]
[object Object]
[object Object]
Aims of this Talk To stave off doom from buggy software on parallel machines
Aims of this Talk ahem
Aims of this Talk (nb, that's something that concerns me, Kamaelia is partly aimed at staving that off, I'm not claiming it does that – but it is one approach we're finding useful)
Aims of this Talk ,[object Object]
Aims of this Talk ,[object Object],[object Object]
Aims of this Talk ,[object Object],[object Object],[object Object]
Aims of this Talk ,[object Object],[object Object],[object Object],[object Object]
Aims of this Talk ,[object Object],[object Object],[object Object],[object Object]
Learning More:  Kamaelia Open Space  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Aims of this Talk ,[object Object]
[object Object]
[object Object],[object Object]
[object Object]
What you've just seen Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
What you've just seen Component inbox Component Component outbox outbox  |  inbox outbox  |  inbox
What you've just seen Component inbox Component Component outbox outbox | inbox outbox | inbox
What you've just seen What's inside the box? Component inbox Component Component outbox outbox | inbox outbox | inbox
[object Object]
Python Generators Fibonacci Demo
[object Object]
Component Basics Rotating Angle Demo “ turning a generator into a component”
Component Basics What use is this? class  RotatingAngle(Axon.Component.component): def  main(self): while  1: self.send(x, "outbox") x = x + 1 if x > 359: x = 0 yield  1
Component Basics Consider these components: class loopingCounter(Axon.Component.component) class  cartesianPingPong(Axon.Component.component) class bouncingfloat(Axon.Component.component) class  continuousIdentity(Axon.Component.component) class  continuousZero(Axon.Component.component) class  continuousOne(Axon.Component.component) (from Kamaelia.Automata.Behaviours...)
Component Basics Bouncing Cats
Component Basics Graphline( CAT = BasicSprite(image=cat), ROTATOR = loopingCounter(rotation_speed), MOVER = cartesianPingPong(position, 800, 600, 40), SCALER = bouncingFloat(scale_speed), IMAGER = continuousIdentity(cat), linkages = { ("ROTATOR","outbox" ) : ("CAT", "rotator"), ("MOVER","outbox" )  : ("CAT", "translation"), ("SCALER","outbox" )  : ("CAT", "scaler"), ("IMAGER","outbox" )  : ("CAT", "imaging"), } ).activate() From Examples/SimpleGraphicalApps/BouncingCatGame/Simplegame.py (shutdown fanout removed for space)
[object Object]
Some stuff we've done Networked Audio Mixer Matrix Dirac/Vorbis distribution/decode/players Subtitling distribution server (mobiles, PCs) Presentation Tools Collaborative Whiteboards   * with audio Simple games Visual programming tools Visual Introspection tools Kamaelia Macro ...
Stuff trainees have done pre-university trainee: Previewing PVR content on a mobile phone Shakespeare script parsing and doing something fun with events & data
Stuff trainees have done pre-university trainee: Previewing PVR content on a mobile phone Shakespeare script parsing and doing something fun with events & data Later adapted simply to have the characters talk the play on an IRC channel
Stuff trainees have done Summer trainee: (2 nd  year student) Tools for simple reliable multicast Multicast island joining
Google Summer of Code Students ,[object Object],[object Object],[object Object],[object Object]
Google Summer of Code ,[object Object],[object Object],[object Object],[object Object]
Google Summer of Code ,[object Object],[object Object],[object Object],[object Object],[object Object]
Google Summer of Code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ease of Use ,[object Object],[object Object],[object Object],[object Object]
Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped  a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data.
Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped  a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data. Bootstrapped the final system rapidly
Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped  a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data. Bootstrapped the final system rapidly Created the system without any involvement from us
Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped  a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data. This directly led on to the Macro work as a result, including optimisations
Kamaelia Macro: Revisited
[object Object],[object Object]
Top Level Schematic DVB Multiplex outbox Channel Transcoder inbox DVB  Demuxer  BBC_ONE inbox
Top Level Code Graphline( SOURCE=DVB_Multiplex(freq, pids["BBC ONE"]+pids["EIT"], feparams), DEMUX=DVB_Demuxer({ 610: ["BBCONE"], 611: ["BBCONE"], 18: ["BBCONE"], }), BBCONE_HI = ChannelTranscoder(service_ids["BBC ONE"], **params["HI"]), linkages={ ("SOURCE", "outbox"):("DEMUX","inbox"), ("DEMUX", "BBCONE"): ("BBCONE_HI", "inbox"), } ).run()
Channel Transcoder Schematic Channel Transcoder EITDemux inbox _eit_ inbox EITParsing outbox inbox Carousel transcoder_factory inbox next outbox
Channel Transcoder Code def  ChannelTranscoder(service_id, mencoder_options, dir_prefix): def  transcoder_factory(eit): return ProgrammeTranscoder(eit, mencoder_options, dir_prefix) return  Graphline( PROG_CODER = Carousel( transcoder_factory ), EIT_PARSE = EITParsing(service_id), DEMUX = EITDemux(), linkages = { ("self","inbox") : ("DEMUX","inbox"), ("DEMUX","outbox") : ("PROG_CODER","inbox"), ("DEMUX","_eit_") : ("EIT_PARSE", "inbox"), ("EIT_PARSE", "outbox") : ("PROG_CODER", "next"), } )
Programme Identification Schematic EIT Parsing PSI Packet Reconstructor inbox inbox EIT Packet Parser outbox inbox Now Next service filter Now Next Changes outbox inbox outbox inbox outbox outbox
Programme Identification Code def  EITParsing(*service_ids): return pipeline( PSIPacketReconstructor(), EITPacketParser(), NowNextServiceFilter(*service_ids), NowNextChanges(), )
Programme Transcoding Schematic (a pipeline) Programme Transcoder Pipethrough (“mencoder -o file options...”) inbox control signal inbox control _transcodingcomplete _stop signal
Programme Transcoding Code class ProgrammeTranscoder(Axon.Component.component): Inboxes = { "inbox" : "TS packets containing audio and video", "control" : "the usual", "_transcodingcomplete" : "signal from the transcoder", } Outboxes = { "outbox" : "", "_stop" : "stop the transcoder", "signal" : "the usual", } def __init__(self, eitdata, mencoder_options, dir_prefix): super(ProgrammeTranscoder,self).__init__() self.eitdata = eitdata self.mencoder_options =mencoder_options self.dir_prefix = dir_prefix def main(self): # first, generate unique filename uid = str(time.time()) encodingfile = "/data/encoding"+self.dir_prefix+"/"+uid+".avi" waitingEIT  = "/data/encoding"+self.dir_prefix+"/"+uid+".eit" finishedfile = "/data/finished"+self.dir_prefix+"/"+uid+".avi" finishedEIT  = "/data/finished"+self.dir_prefix+"/"+uid+".eit" print uid,"Starting transcoding into: "+encodingfile transcoder = Pipethrough("mencoder -o "+encodingfile+" "+self.mencoder_options) print uid,"Transcoder pipethough =",transcoder.name data_linkage = self.link( (self,"inbox"), (transcoder,"inbox"), passthrough=1 ) ctrl_linkage = self.link( (self,"_stop"), (transcoder,"control")) done_linkage = self.link( (transcoder,"signal"), (self,"_transcodingcomplete") )
Kamaelia Macro ,[object Object],[object Object]
But Why Mashup?  ,[object Object],[object Object],[object Object]
Kamaelia: Ideas  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Kamaelia Futures ,[object Object],[object Object],[object Object],[object Object],(AKA Specfic stuff we want to do)
Kamaelia Futures ,[object Object],[object Object],[object Object],[object Object],[object Object],(AKA Specfic stuff we want to do)
Thank you! Thank you!
Kamaelia Open Space  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

Viewers also liked

Kamaelia lightning2010opensource
Kamaelia lightning2010opensourceKamaelia lightning2010opensource
Kamaelia lightning2010opensourcekamaelian
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009Paolo Negri
 
Practical concurrent systems made simple using Kamaelia
Practical concurrent systems made simple using KamaeliaPractical concurrent systems made simple using Kamaelia
Practical concurrent systems made simple using Kamaeliakamaelian
 
Descriptors In Python
Descriptors In PythonDescriptors In Python
Descriptors In PythonAmit Upadhyay
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
Data Analysis and Statistics in Python using pandas and statsmodels
Data Analysis and Statistics in Python using pandas and statsmodelsData Analysis and Statistics in Python using pandas and statsmodels
Data Analysis and Statistics in Python using pandas and statsmodelsWes McKinney
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for BeginnersJason Davies
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoJay Graves
 
Python for Financial Data Analysis with pandas
Python for Financial Data Analysis with pandasPython for Financial Data Analysis with pandas
Python for Financial Data Analysis with pandasWes McKinney
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in PythonSujith Kumar
 
Python Advanced – Building on the foundation
Python Advanced – Building on the foundationPython Advanced – Building on the foundation
Python Advanced – Building on the foundationKevlin Henney
 
Python Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutPython Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutAudrey Roy
 
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...Spark Summit
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 

Viewers also liked (15)

Kamaelia lightning2010opensource
Kamaelia lightning2010opensourceKamaelia lightning2010opensource
Kamaelia lightning2010opensource
 
RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009RabbitMQ with python and ruby RuPy 2009
RabbitMQ with python and ruby RuPy 2009
 
Practical concurrent systems made simple using Kamaelia
Practical concurrent systems made simple using KamaeliaPractical concurrent systems made simple using Kamaelia
Practical concurrent systems made simple using Kamaelia
 
Descriptors In Python
Descriptors In PythonDescriptors In Python
Descriptors In Python
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Django introduction
Django introductionDjango introduction
Django introduction
 
Data Analysis and Statistics in Python using pandas and statsmodels
Data Analysis and Statistics in Python using pandas and statsmodelsData Analysis and Statistics in Python using pandas and statsmodels
Data Analysis and Statistics in Python using pandas and statsmodels
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Python for Financial Data Analysis with pandas
Python for Financial Data Analysis with pandasPython for Financial Data Analysis with pandas
Python for Financial Data Analysis with pandas
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in Python
 
Python Advanced – Building on the foundation
Python Advanced – Building on the foundationPython Advanced – Building on the foundation
Python Advanced – Building on the foundation
 
Python Tricks That You Can't Live Without
Python Tricks That You Can't Live WithoutPython Tricks That You Can't Live Without
Python Tricks That You Can't Live Without
 
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
Improving Python and Spark Performance and Interoperability: Spark Summit Eas...
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 

Similar to Timeshift Everything, Miss Nothing: Building a Personal Video Recorder with Kamaelia Components

Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitcbenDesigning
 
OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...
OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...
OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...Brendan Quinn
 
Setup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkSetup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkNazmul Hossain Rakib
 
Beyond live streaming 2 way communications
Beyond live streaming 2 way communications Beyond live streaming 2 way communications
Beyond live streaming 2 way communications Paul Richards
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1benDesigning
 
Rubato Introduction
Rubato IntroductionRubato Introduction
Rubato Introductionjdiloreto
 
Python Online Compiler
Python Online CompilerPython Online Compiler
Python Online CompilerMr Examples
 
Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409Abdel-Fattah M. Hmoud
 
PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...
PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...
PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...Megumi Takeshita
 
Smart TV Security - #1984 in 21st century -
Smart TV Security - #1984 in 21st century -Smart TV Security - #1984 in 21st century -
Smart TV Security - #1984 in 21st century -Seungjoo Kim
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewbrouer
 
Hacking, Surveilling, and Deceiving Victims on Smart TV
Hacking, Surveilling, and Deceiving Victims on Smart TVHacking, Surveilling, and Deceiving Victims on Smart TV
Hacking, Surveilling, and Deceiving Victims on Smart TVSeungjoo Kim
 
Understanding and building Your Own Docker
Understanding and building Your Own DockerUnderstanding and building Your Own Docker
Understanding and building Your Own DockerMotiejus Jakštys
 
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Breizhcamp: Créer un bot, pas si simple. Faisons le point.Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Breizhcamp: Créer un bot, pas si simple. Faisons le point.Cisco DevNet
 
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksEclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksTomasz Zarna
 
Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)Jonathan Carter
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyMike Hagedorn
 

Similar to Timeshift Everything, Miss Nothing: Building a Personal Video Recorder with Kamaelia Components (20)

Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitc
 
OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...
OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...
OSCON 2010 Brendan Quinn - Ingex:bringing open source to the broadcast indust...
 
Setup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkSetup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE network
 
Beyond live streaming 2 way communications
Beyond live streaming 2 way communications Beyond live streaming 2 way communications
Beyond live streaming 2 way communications
 
Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1Hacking the Kinect with GAFFTA Day 1
Hacking the Kinect with GAFFTA Day 1
 
Rubato Introduction
Rubato IntroductionRubato Introduction
Rubato Introduction
 
Python Online Compiler
Python Online CompilerPython Online Compiler
Python Online Compiler
 
Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409Uip Sip Implementation Best Practices060409
Uip Sip Implementation Best Practices060409
 
WebRTC Status Update - 2017Q2
WebRTC Status Update - 2017Q2WebRTC Status Update - 2017Q2
WebRTC Status Update - 2017Q2
 
PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...
PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...
PA-3 Debugging Wireless with Wireshark Including Large Trace Files, AirPcap &...
 
Smart TV Security - #1984 in 21st century -
Smart TV Security - #1984 in 21st century -Smart TV Security - #1984 in 21st century -
Smart TV Security - #1984 in 21st century -
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of view
 
Hacking, Surveilling, and Deceiving Victims on Smart TV
Hacking, Surveilling, and Deceiving Victims on Smart TVHacking, Surveilling, and Deceiving Victims on Smart TV
Hacking, Surveilling, and Deceiving Victims on Smart TV
 
Understanding and building Your Own Docker
Understanding and building Your Own DockerUnderstanding and building Your Own Docker
Understanding and building Your Own Docker
 
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Breizhcamp: Créer un bot, pas si simple. Faisons le point.Breizhcamp: Créer un bot, pas si simple. Faisons le point.
Breizhcamp: Créer un bot, pas si simple. Faisons le point.
 
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksEclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricks
 
Origo mdn 2015
Origo   mdn 2015Origo   mdn 2015
Origo mdn 2015
 
Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Cassandra @ Yahoo Japan | Cassandra Summit 2016
Cassandra @ Yahoo Japan | Cassandra Summit 2016Cassandra @ Yahoo Japan | Cassandra Summit 2016
Cassandra @ Yahoo Japan | Cassandra Summit 2016
 

More from kamaelian

Sharing Data and Services Safely in Concurrent Systems using Kamaelia
Sharing Data and Services Safely in Concurrent Systems using KamaeliaSharing Data and Services Safely in Concurrent Systems using Kamaelia
Sharing Data and Services Safely in Concurrent Systems using Kamaeliakamaelian
 
Sociable Software
Sociable SoftwareSociable Software
Sociable Softwarekamaelian
 
Open Source at the BBC: When, Why, Why not & How
Open Source at the BBC: When, Why, Why not & HowOpen Source at the BBC: When, Why, Why not & How
Open Source at the BBC: When, Why, Why not & Howkamaelian
 
Open Source at the BBC
Open Source at the BBCOpen Source at the BBC
Open Source at the BBCkamaelian
 
Kamaelia - Fave 2005
Kamaelia - Fave 2005Kamaelia - Fave 2005
Kamaelia - Fave 2005kamaelian
 
SWP - A Generic Language Parser
SWP - A Generic Language ParserSWP - A Generic Language Parser
SWP - A Generic Language Parserkamaelian
 
Kamaelia - Networking Using Generators
Kamaelia - Networking Using GeneratorsKamaelia - Networking Using Generators
Kamaelia - Networking Using Generatorskamaelian
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goalskamaelian
 
Kamaelia Internals
Kamaelia InternalsKamaelia Internals
Kamaelia Internalskamaelian
 
Building systems with Kamaelia
Building systems with KamaeliaBuilding systems with Kamaelia
Building systems with Kamaeliakamaelian
 
Free software: How does it work?
Free software: How does it work?Free software: How does it work?
Free software: How does it work?kamaelian
 

More from kamaelian (11)

Sharing Data and Services Safely in Concurrent Systems using Kamaelia
Sharing Data and Services Safely in Concurrent Systems using KamaeliaSharing Data and Services Safely in Concurrent Systems using Kamaelia
Sharing Data and Services Safely in Concurrent Systems using Kamaelia
 
Sociable Software
Sociable SoftwareSociable Software
Sociable Software
 
Open Source at the BBC: When, Why, Why not & How
Open Source at the BBC: When, Why, Why not & HowOpen Source at the BBC: When, Why, Why not & How
Open Source at the BBC: When, Why, Why not & How
 
Open Source at the BBC
Open Source at the BBCOpen Source at the BBC
Open Source at the BBC
 
Kamaelia - Fave 2005
Kamaelia - Fave 2005Kamaelia - Fave 2005
Kamaelia - Fave 2005
 
SWP - A Generic Language Parser
SWP - A Generic Language ParserSWP - A Generic Language Parser
SWP - A Generic Language Parser
 
Kamaelia - Networking Using Generators
Kamaelia - Networking Using GeneratorsKamaelia - Networking Using Generators
Kamaelia - Networking Using Generators
 
Scaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
 
Kamaelia Internals
Kamaelia InternalsKamaelia Internals
Kamaelia Internals
 
Building systems with Kamaelia
Building systems with KamaeliaBuilding systems with Kamaelia
Building systems with Kamaelia
 
Free software: How does it work?
Free software: How does it work?Free software: How does it work?
Free software: How does it work?
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Timeshift Everything, Miss Nothing: Building a Personal Video Recorder with Kamaelia Components

  • 1. Timeshift Everything, Miss Nothing Mash up your PVR with Kamaelia Euro OSCON 2006, Brussels Michael Sparks, Senior Research Engineer, BBC Research
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.  
  • 8.  
  • 9.  
  • 10.
  • 11.
  • 12. Kamaelia Macro: Target DVB Multiplex outbox Channel Transcoder inbox DVB Demuxer BBC_ONE inbox Channel Transcoder inbox Channel Transcoder inbox Channel Transcoder Channel Transcoder Channel Transcoder inbox inbox inbox BBC_TWO BBC_THREE BBC_FOUR CBEEBIES CBBC
  • 13. Kamaelia Macro: Status DVB Multiplex outbox Channel Transcoder inbox DVB Demuxer BBC_ONE inbox Channel Transcoder inbox Channel Transcoder inbox Channel Transcoder Channel Transcoder Channel Transcoder inbox inbox inbox BBC_TWO BBC_THREE BBC_FOUR CBEEBIES CBBC
  • 14. Kamaelia Macro: Status Scaling up simply awaiting hardware DVB Multiplex outbox Channel Transcoder inbox DVB Demuxer BBC_ONE inbox Channel Transcoder inbox Channel Transcoder inbox Channel Transcoder Channel Transcoder Channel Transcoder inbox inbox inbox BBC_TWO BBC_THREE BBC_FOUR CBEEBIES CBBC
  • 15. Top Level Schematic DVB Multiplex outbox Channel Transcoder inbox DVB Demuxer BBC_ONE inbox
  • 16. Channel Transcoder Schematic Channel Transcoder EITDemux inbox _eit_ inbox EITParsing outbox inbox Carousel transcoder_factory inbox next outbox
  • 17. Programme Identification Schematic EIT Parsing PSI Packet Reconstructor inbox inbox EIT Packet Parser outbox inbox Now Next service filter Now Next Changes outbox inbox outbox inbox outbox outbox
  • 18. Programme Transcoding Schematic (a pipeline) Programme Transcoder Pipethrough (“mencoder -o file options...”) inbox control signal inbox control _transcodingcomplete _stop signal
  • 19.
  • 20.
  • 21.
  • 22. Aims of this Talk To stave off doom from buggy software on parallel machines
  • 23. Aims of this Talk ahem
  • 24. Aims of this Talk (nb, that's something that concerns me, Kamaelia is partly aimed at staving that off, I'm not claiming it does that – but it is one approach we're finding useful)
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. What you've just seen Component outbox inbox
  • 36. What you've just seen Component outbox inbox Component outbox inbox
  • 37. What you've just seen Component outbox inbox Component outbox inbox
  • 38. What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
  • 39. What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
  • 40. What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
  • 41. What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
  • 42. What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
  • 43. What you've just seen Component outbox inbox Component outbox inbox Component outbox inbox
  • 44. What you've just seen Component inbox Component Component outbox outbox | inbox outbox | inbox
  • 45. What you've just seen Component inbox Component Component outbox outbox | inbox outbox | inbox
  • 46. What you've just seen What's inside the box? Component inbox Component Component outbox outbox | inbox outbox | inbox
  • 47.
  • 49.
  • 50. Component Basics Rotating Angle Demo “ turning a generator into a component”
  • 51. Component Basics What use is this? class RotatingAngle(Axon.Component.component): def main(self): while 1: self.send(x, "outbox") x = x + 1 if x > 359: x = 0 yield 1
  • 52. Component Basics Consider these components: class loopingCounter(Axon.Component.component) class cartesianPingPong(Axon.Component.component) class bouncingfloat(Axon.Component.component) class continuousIdentity(Axon.Component.component) class continuousZero(Axon.Component.component) class continuousOne(Axon.Component.component) (from Kamaelia.Automata.Behaviours...)
  • 54. Component Basics Graphline( CAT = BasicSprite(image=cat), ROTATOR = loopingCounter(rotation_speed), MOVER = cartesianPingPong(position, 800, 600, 40), SCALER = bouncingFloat(scale_speed), IMAGER = continuousIdentity(cat), linkages = { ("ROTATOR","outbox" ) : ("CAT", "rotator"), ("MOVER","outbox" ) : ("CAT", "translation"), ("SCALER","outbox" ) : ("CAT", "scaler"), ("IMAGER","outbox" ) : ("CAT", "imaging"), } ).activate() From Examples/SimpleGraphicalApps/BouncingCatGame/Simplegame.py (shutdown fanout removed for space)
  • 55.
  • 56. Some stuff we've done Networked Audio Mixer Matrix Dirac/Vorbis distribution/decode/players Subtitling distribution server (mobiles, PCs) Presentation Tools Collaborative Whiteboards * with audio Simple games Visual programming tools Visual Introspection tools Kamaelia Macro ...
  • 57. Stuff trainees have done pre-university trainee: Previewing PVR content on a mobile phone Shakespeare script parsing and doing something fun with events & data
  • 58. Stuff trainees have done pre-university trainee: Previewing PVR content on a mobile phone Shakespeare script parsing and doing something fun with events & data Later adapted simply to have the characters talk the play on an IRC channel
  • 59. Stuff trainees have done Summer trainee: (2 nd year student) Tools for simple reliable multicast Multicast island joining
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65. Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data.
  • 66. Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data. Bootstrapped the final system rapidly
  • 67. Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data. Bootstrapped the final system rapidly Created the system without any involvement from us
  • 68. Stuff other parts of the BBC have done Radio & Music Interactive: Prototyped a system for recording all BBC radio output, transcoding it and making podcasts from the resulting data. This directly led on to the Macro work as a result, including optimisations
  • 70.
  • 71. Top Level Schematic DVB Multiplex outbox Channel Transcoder inbox DVB Demuxer BBC_ONE inbox
  • 72. Top Level Code Graphline( SOURCE=DVB_Multiplex(freq, pids["BBC ONE"]+pids["EIT"], feparams), DEMUX=DVB_Demuxer({ 610: ["BBCONE"], 611: ["BBCONE"], 18: ["BBCONE"], }), BBCONE_HI = ChannelTranscoder(service_ids["BBC ONE"], **params["HI"]), linkages={ ("SOURCE", "outbox"):("DEMUX","inbox"), ("DEMUX", "BBCONE"): ("BBCONE_HI", "inbox"), } ).run()
  • 73. Channel Transcoder Schematic Channel Transcoder EITDemux inbox _eit_ inbox EITParsing outbox inbox Carousel transcoder_factory inbox next outbox
  • 74. Channel Transcoder Code def ChannelTranscoder(service_id, mencoder_options, dir_prefix): def transcoder_factory(eit): return ProgrammeTranscoder(eit, mencoder_options, dir_prefix) return Graphline( PROG_CODER = Carousel( transcoder_factory ), EIT_PARSE = EITParsing(service_id), DEMUX = EITDemux(), linkages = { ("self","inbox") : ("DEMUX","inbox"), ("DEMUX","outbox") : ("PROG_CODER","inbox"), ("DEMUX","_eit_") : ("EIT_PARSE", "inbox"), ("EIT_PARSE", "outbox") : ("PROG_CODER", "next"), } )
  • 75. Programme Identification Schematic EIT Parsing PSI Packet Reconstructor inbox inbox EIT Packet Parser outbox inbox Now Next service filter Now Next Changes outbox inbox outbox inbox outbox outbox
  • 76. Programme Identification Code def EITParsing(*service_ids): return pipeline( PSIPacketReconstructor(), EITPacketParser(), NowNextServiceFilter(*service_ids), NowNextChanges(), )
  • 77. Programme Transcoding Schematic (a pipeline) Programme Transcoder Pipethrough (“mencoder -o file options...”) inbox control signal inbox control _transcodingcomplete _stop signal
  • 78. Programme Transcoding Code class ProgrammeTranscoder(Axon.Component.component): Inboxes = { "inbox" : "TS packets containing audio and video", "control" : "the usual", "_transcodingcomplete" : "signal from the transcoder", } Outboxes = { "outbox" : "", "_stop" : "stop the transcoder", "signal" : "the usual", } def __init__(self, eitdata, mencoder_options, dir_prefix): super(ProgrammeTranscoder,self).__init__() self.eitdata = eitdata self.mencoder_options =mencoder_options self.dir_prefix = dir_prefix def main(self): # first, generate unique filename uid = str(time.time()) encodingfile = "/data/encoding"+self.dir_prefix+"/"+uid+".avi" waitingEIT = "/data/encoding"+self.dir_prefix+"/"+uid+".eit" finishedfile = "/data/finished"+self.dir_prefix+"/"+uid+".avi" finishedEIT = "/data/finished"+self.dir_prefix+"/"+uid+".eit" print uid,"Starting transcoding into: "+encodingfile transcoder = Pipethrough("mencoder -o "+encodingfile+" "+self.mencoder_options) print uid,"Transcoder pipethough =",transcoder.name data_linkage = self.link( (self,"inbox"), (transcoder,"inbox"), passthrough=1 ) ctrl_linkage = self.link( (self,"_stop"), (transcoder,"control")) done_linkage = self.link( (transcoder,"signal"), (self,"_transcodingcomplete") )
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 85.