SlideShare a Scribd company logo
1 of 27
Download to read offline
Down, Set, Hike!
October 26, 2013
Video Integration on Pac-12 Networks
Thursday, August 14, 14
Web Developer, Pac-12 Networks
Lance Geng
Project Team
Senior Developer, Phase2
Joshua Turton
Thursday, August 14, 14
Game Plan
Technical Requirements
Thursday, August 14, 14
Pac-12 networks has a vision to be one of the industry leaders in online sports media, integrating videos from all 12 conference schools as well as original
content generated in their downtown San Francisco studio.
Phase2 was contracted to help implement their vision. One major component of this project was the video solution, which is the part we’re talking about
today.
Key Video Requirements
Thursday, August 14, 14
[Read requirements]
Key Video Requirements
• High traffic, bullet-proof uptime
• Single-console editorial experience, with quick uploading
• Import of external content
• Tagging by sport, school, team, and type
• Integration with scheduled events: before, during and after
• Subscription-based access to streaming & premium content
Thursday, August 14, 14
[Read requirements]
The Offense
How we did it
Thursday, August 14, 14
Pac-12 had an existing video site - built by Lullabot, who did some great work on it - which accomplished some of these goals, but not all of them. We
expanded on their work, added features, and tied it all together with a big bow on top.
Here’s how...
Running Game
Integration with Ooyala & Drupal
Thursday, August 14, 14
Pac-12’s integration with Ooyala required some key functionality, each of which posed their own unique challenges.
These challenges included a way for users to dynamically add/edit/delete metadata fields to a video, an integration with services and chunked uploads for
handling large file sizes, and keeping all of this in sync between The Network, The Schools & Ooyala.
Custom Field
A new, custom field type allows for direct uploads to Ooyala. That
same field type stores reference information for both Live
Broadcasts and On Demand videos.
Thursday, August 14, 14
The foundation of our integration with Ooyala is the custom Ooyala Video field type. Because both Video on Demand and Live Broadcasts share many of the
same properties, we decided to only make one field that could be shared by both.
The actual field stores only the video’s Unique ID, provided by Ooyala. Ooyala is responsible for delivering video content and rendering the video player.
We simply save a reference to the video in Drupal, and let the video provider handle the rest.
Asynchronous Uploads
Thursday, August 14, 14
Our videos are huge, so how can we best approach the upload issue?
[PRESS SPACE BAR]
This is a second function of our custom field and handler. Once the user has entered a title and chosen a video file, the upload can be initiated.
We send an AJAX request to the services module which includes the title, the file name, the total size of the file and the desired size of each chunk to send
to the server. Services initiates the calls to our Ooyala Video module which sends the provided information to Ooyala. Ooyala returns a serialized array of
upload URLs for each chunk of video which we then pass back to the client to handle the upload.
On the client we take each URL, splice the file chunk that coordinates with that URL and then send each one to Ooyala. This allows us to asynchronously
handle the file upload, greatly increasing the speed in which a large file can be transmitted to Ooyala for processing.
Asynchronous Uploads
• Problem: How do you upload a 2 GB video quickly, without
interrupting the editorial workflow?
Thursday, August 14, 14
Our videos are huge, so how can we best approach the upload issue?
[PRESS SPACE BAR]
This is a second function of our custom field and handler. Once the user has entered a title and chosen a video file, the upload can be initiated.
We send an AJAX request to the services module which includes the title, the file name, the total size of the file and the desired size of each chunk to send
to the server. Services initiates the calls to our Ooyala Video module which sends the provided information to Ooyala. Ooyala returns a serialized array of
upload URLs for each chunk of video which we then pass back to the client to handle the upload.
On the client we take each URL, splice the file chunk that coordinates with that URL and then send each one to Ooyala. This allows us to asynchronously
handle the file upload, greatly increasing the speed in which a large file can be transmitted to Ooyala for processing.
Asynchronous Uploads
• Problem: How do you upload a 2 GB video quickly, without
interrupting the editorial workflow?
• Solution: use the Services module to implement a chunked
Ajax upload, while the editor finishes filling in other fields.
Thursday, August 14, 14
Our videos are huge, so how can we best approach the upload issue?
[PRESS SPACE BAR]
This is a second function of our custom field and handler. Once the user has entered a title and chosen a video file, the upload can be initiated.
We send an AJAX request to the services module which includes the title, the file name, the total size of the file and the desired size of each chunk to send
to the server. Services initiates the calls to our Ooyala Video module which sends the provided information to Ooyala. Ooyala returns a serialized array of
upload URLs for each chunk of video which we then pass back to the client to handle the upload.
On the client we take each URL, splice the file chunk that coordinates with that URL and then send each one to Ooyala. This allows us to asynchronously
handle the file upload, greatly increasing the speed in which a large file can be transmitted to Ooyala for processing.
Track Segments
Thursday, August 14, 14
Our Live Broadcast video type, “EPG”, has the extra requirement of a Track & a Track Segment. A Track is essentially a channel and a Track Segment is a
slot in time on a given Track. A single EPG can have several Track Segments attached to it.
Tracks were implemented as a basic taxonomy.
For Track Segments, we implemented a custom database table. The reason we chose to do this was that Track Segments are never edited by users - they
are all imported from scheduling data.
We did not want all of the overhead of a full blown entity just to attach this data to our Ooyala Video fields. All of this is tracked in a separate custom table,
which is also queried by the events display code that Josh will talk about in a few minutes.
Metadata Configuration
Thursday, August 14, 14
Metadata is a key/value pair of custom data that is stored in Ooyala with a video. It tells us sport, team, date, and other important information about the
video.
[PRESS SPACE BAR]
In the past, entry of this information has been a tedious task for our content team. Rather than creating individual custom fields for each type of metadata
we needed to store, we decided to borrow Drupal’s Form API for presentation, and stored the data as a serialized blob in our database.
We built a custom configuration tool, pictured here, to manage these fields. This allowed us to assign field types to existing metadata fields.
Metadata Configuration
• Problem: How to handle
tedious metadata entry and
configuration?
Thursday, August 14, 14
Metadata is a key/value pair of custom data that is stored in Ooyala with a video. It tells us sport, team, date, and other important information about the
video.
[PRESS SPACE BAR]
In the past, entry of this information has been a tedious task for our content team. Rather than creating individual custom fields for each type of metadata
we needed to store, we decided to borrow Drupal’s Form API for presentation, and stored the data as a serialized blob in our database.
We built a custom configuration tool, pictured here, to manage these fields. This allowed us to assign field types to existing metadata fields.
Metadata Configuration
• Problem: How to handle
tedious metadata entry and
configuration?
• Solution: Leverage FAPI and
key to existing Ooyala
metadata.
Thursday, August 14, 14
Metadata is a key/value pair of custom data that is stored in Ooyala with a video. It tells us sport, team, date, and other important information about the
video.
[PRESS SPACE BAR]
In the past, entry of this information has been a tedious task for our content team. Rather than creating individual custom fields for each type of metadata
we needed to store, we decided to borrow Drupal’s Form API for presentation, and stored the data as a serialized blob in our database.
We built a custom configuration tool, pictured here, to manage these fields. This allowed us to assign field types to existing metadata fields.
Keeping it in Sync
A handful of custom
drush commands helps
keep the Network in
sync with their Schools
and Ooyala.
Thursday, August 14, 14
One of the biggest challenges was keeping all of our videos in sync. The main idea of this project is that Drupal would become the master point of record
for all of our videos, including those uploaded through external platforms by our Schools.
This meant that video data would need to be pulled from Ooyala on a regular basis, and video nodes created. To do this, we created some custom Drush
commands. These commands were responsible for pulling down either EPG or VOD videos and importing/updating them in Drupal. These commands can
be scheduled to run in custom intervals by either Jenkins or Acquia CRON.
When a video is published, we push all of our meta-data in Drupal for the video back up to Ooyala using their PHP API.
Passing Game
Content Prioritization on Event Nodes
Thursday, August 14, 14
Once all the videos are imported, uploaded, parsed, encoded, and ready to view... we need someplace to find and view them. That leads us to the Event
Node.
Events are one of the most complicated pieces of content on the site.
Events display related content from any one of a number of other content types, defined using the Node Reference module. What content appears where
and when is based on a complicated algorithm, incorporating time of day, content type, taxonomy, and freshness of content.
Content related to the event
Thursday, August 14, 14
Here is the order of prioritization for related event content. [PRESS SPACE BAR]
[Read bullets]
Within any content type if there are multiple items at the same level, they’ll be sequenced in reverse chronological order.
There are secondary rules, based on school and team, if the above doesn’t have enough results to fill out an event node.
• EPG (streaming video), if one is currently playing.
• VOD (Video on demand), tagged with Highlight taxonomy term
• VOD, tagged with Replay taxonomy term
• VOD, untagged
• Photo Gallery
• Article, tagged with Preview or Recap taxonomy term
• Article, untagged
• Podcast
Content related to the event
Thursday, August 14, 14
Here is the order of prioritization for related event content. [PRESS SPACE BAR]
[Read bullets]
Within any content type if there are multiple items at the same level, they’ll be sequenced in reverse chronological order.
There are secondary rules, based on school and team, if the above doesn’t have enough results to fill out an event node.
Thursday, August 14, 14
Here’s what an *incomplete pass* at that query looked like. It was an attempt to find an EPG node, based on the Event’s NID, and then loaded that node.
If it didn’t find one, then it attempted to do the same with VOD.
If you dig into this query, you can see that it doesn’t do anything with the taxonomy terms, and that additional queries will be necessary to handle
Galleries, Articles, and Podcasts.
It was quickly apparent that this methodology wouldn’t work; the database load from this operation would likely have killed the site.
Thursday, August 14, 14
The solution to this database issue turned out to be more database work. Specifically, a new table called event_priority, which allows us to store a weight
for each node related to a given event. This weight is calculated once, when a content node is saved or updated, based on the rules shown earlier. Then,
when an event it loaded, it queries this table with a tiny, super-fast, well-indexed query.
Which is much, much better.
More information about this process is available on Phase2’s blog.
The Defense
What we would do differently
Thursday, August 14, 14
All that said, there are definitely some things we have learned through this process.
Video Metadata Storage
• Metadata is stored as a serialized array in a database blob
• The intent was to keep it from the full field API overhead
• Doesn’t allow for filtering and sorting by views, or auto-
complete fields
• End solution was to add capability to import / export
process to transfer data into fields
• Better solution would have been to use fields originally
Thursday, August 14, 14
We made a decision very early on to store metadata in a database blob in a self-contained table. Our intention was to shield this data from the processing
overhead of a full-fledged Drupal field.
This backfired on us.
We wound up later needing to use that data in views as a filter or sort parameter, and to allow it to inform auto-complete fields. Thus, we had to add a
workaround to the import and export process that *also* stored most of those data items in fields.
The better solution would have been to use fields from the start.
Home-grown Video Solution
• Assembled using openly available components including:
• Brightcove’s Zencoder or Amazon Elastic Transcoder
• Amazon S3
• Drupal Video module, which supports multiple players
• Less expensive
• More possible customization
Thursday, August 14, 14
A possible avenue of exploration for Pac-12’s future exploration and development is to build their own video solution.
Phase2 has had some good results lately with another sports client creating a video hosting and encoding solution using an assortment of openly available
components. These include Brightcove’s Zencoder or Amazon Elastic Transcoder, Amazon S3 hosting, and the Drupal video module, which supports
multiple different players.
This would have multiple advantages:
First and foremost, Drupal would be truly the source-of-truth for all video data. No more pushing metadata back and forth!
It’s also a less expensive solution, with a much higher possible degree of customization.
Post-game Interview
Questions?
Thursday, August 14, 14
We have time for a few questions.
Senior Developer, Phase2
Email: jturton@phase2technology.com
Joshua Turton
Twitter: @sjinteractive
Web Developer, Pac-12 Networks
Email: lgeng@pac-12.org
Lance Geng
Thursday, August 14, 14
PHASE2TECHNOLOGY.COMPHASE2TECHNOLOGY.COMPAC-12.COM
Thursday, August 14, 14

More Related Content

More from Phase2

Beyond websites: A Modern Digital Experience Platform
Beyond websites: A Modern Digital Experience PlatformBeyond websites: A Modern Digital Experience Platform
Beyond websites: A Modern Digital Experience PlatformPhase2
 
Omnichannel For Government
Omnichannel For Government Omnichannel For Government
Omnichannel For Government Phase2
 
Bad camp2016 Release Management On Live Websites
Bad camp2016 Release Management On Live WebsitesBad camp2016 Release Management On Live Websites
Bad camp2016 Release Management On Live WebsitesPhase2
 
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8Phase2
 
The Future of Digital Storytelling - Phase2 Talk
The Future of Digital Storytelling - Phase2 TalkThe Future of Digital Storytelling - Phase2 Talk
The Future of Digital Storytelling - Phase2 TalkPhase2
 
Site building with end user in mind
Site building with end user in mindSite building with end user in mind
Site building with end user in mindPhase2
 
Fields, entities, lists, oh my!
Fields, entities, lists, oh my!Fields, entities, lists, oh my!
Fields, entities, lists, oh my!Phase2
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and TricksPhase2
 
NORTH CAROLINA Open Source, OpenPublic, OpenShift
NORTH CAROLINA Open Source, OpenPublic, OpenShiftNORTH CAROLINA Open Source, OpenPublic, OpenShift
NORTH CAROLINA Open Source, OpenPublic, OpenShiftPhase2
 
Drupal 8 for Enterprise: D8 in a Changing Digital Landscape
Drupal 8 for Enterprise: D8 in a Changing Digital LandscapeDrupal 8 for Enterprise: D8 in a Changing Digital Landscape
Drupal 8 for Enterprise: D8 in a Changing Digital LandscapePhase2
 
Riding the Drupal Wave: The Future for Drupal and Open Source Content Manage...
Riding the Drupal Wave:  The Future for Drupal and Open Source Content Manage...Riding the Drupal Wave:  The Future for Drupal and Open Source Content Manage...
Riding the Drupal Wave: The Future for Drupal and Open Source Content Manage...Phase2
 
Site Building with the End User in Mind
Site Building with the End User in MindSite Building with the End User in Mind
Site Building with the End User in MindPhase2
 
The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"Phase2
 
User Testing For Humanitarian ID App
User Testing For Humanitarian ID AppUser Testing For Humanitarian ID App
User Testing For Humanitarian ID AppPhase2
 
Redhat.com: An Architectural Case Study
Redhat.com: An Architectural Case StudyRedhat.com: An Architectural Case Study
Redhat.com: An Architectural Case StudyPhase2
 
The New Design Workflow
The New Design WorkflowThe New Design Workflow
The New Design WorkflowPhase2
 
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)Phase2
 
Memorial Sloan Kettering: Adventures in Drupal 8
Memorial Sloan Kettering: Adventures in Drupal 8Memorial Sloan Kettering: Adventures in Drupal 8
Memorial Sloan Kettering: Adventures in Drupal 8Phase2
 
How, When, and Why to Patch a Module
How, When, and Why to Patch a Module How, When, and Why to Patch a Module
How, When, and Why to Patch a Module Phase2
 
Drupal Is Not Your Web Site
Drupal Is Not Your Web SiteDrupal Is Not Your Web Site
Drupal Is Not Your Web SitePhase2
 

More from Phase2 (20)

Beyond websites: A Modern Digital Experience Platform
Beyond websites: A Modern Digital Experience PlatformBeyond websites: A Modern Digital Experience Platform
Beyond websites: A Modern Digital Experience Platform
 
Omnichannel For Government
Omnichannel For Government Omnichannel For Government
Omnichannel For Government
 
Bad camp2016 Release Management On Live Websites
Bad camp2016 Release Management On Live WebsitesBad camp2016 Release Management On Live Websites
Bad camp2016 Release Management On Live Websites
 
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
A FUTURE-FOCUSED DIGITAL PLATFORM WITH DRUPAL 8
 
The Future of Digital Storytelling - Phase2 Talk
The Future of Digital Storytelling - Phase2 TalkThe Future of Digital Storytelling - Phase2 Talk
The Future of Digital Storytelling - Phase2 Talk
 
Site building with end user in mind
Site building with end user in mindSite building with end user in mind
Site building with end user in mind
 
Fields, entities, lists, oh my!
Fields, entities, lists, oh my!Fields, entities, lists, oh my!
Fields, entities, lists, oh my!
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and Tricks
 
NORTH CAROLINA Open Source, OpenPublic, OpenShift
NORTH CAROLINA Open Source, OpenPublic, OpenShiftNORTH CAROLINA Open Source, OpenPublic, OpenShift
NORTH CAROLINA Open Source, OpenPublic, OpenShift
 
Drupal 8 for Enterprise: D8 in a Changing Digital Landscape
Drupal 8 for Enterprise: D8 in a Changing Digital LandscapeDrupal 8 for Enterprise: D8 in a Changing Digital Landscape
Drupal 8 for Enterprise: D8 in a Changing Digital Landscape
 
Riding the Drupal Wave: The Future for Drupal and Open Source Content Manage...
Riding the Drupal Wave:  The Future for Drupal and Open Source Content Manage...Riding the Drupal Wave:  The Future for Drupal and Open Source Content Manage...
Riding the Drupal Wave: The Future for Drupal and Open Source Content Manage...
 
Site Building with the End User in Mind
Site Building with the End User in MindSite Building with the End User in Mind
Site Building with the End User in Mind
 
The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"The Yes, No, and Maybe of "Can We Build That With Drupal?"
The Yes, No, and Maybe of "Can We Build That With Drupal?"
 
User Testing For Humanitarian ID App
User Testing For Humanitarian ID AppUser Testing For Humanitarian ID App
User Testing For Humanitarian ID App
 
Redhat.com: An Architectural Case Study
Redhat.com: An Architectural Case StudyRedhat.com: An Architectural Case Study
Redhat.com: An Architectural Case Study
 
The New Design Workflow
The New Design WorkflowThe New Design Workflow
The New Design Workflow
 
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
Drupal 8, Don’t Be Late (Enterprise Orgs, We’re Looking at You)
 
Memorial Sloan Kettering: Adventures in Drupal 8
Memorial Sloan Kettering: Adventures in Drupal 8Memorial Sloan Kettering: Adventures in Drupal 8
Memorial Sloan Kettering: Adventures in Drupal 8
 
How, When, and Why to Patch a Module
How, When, and Why to Patch a Module How, When, and Why to Patch a Module
How, When, and Why to Patch a Module
 
Drupal Is Not Your Web Site
Drupal Is Not Your Web SiteDrupal Is Not Your Web Site
Drupal Is Not Your Web Site
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Down, Set, Hike! Video Integration With Pac-12 Networks

  • 1. Down, Set, Hike! October 26, 2013 Video Integration on Pac-12 Networks Thursday, August 14, 14
  • 2. Web Developer, Pac-12 Networks Lance Geng Project Team Senior Developer, Phase2 Joshua Turton Thursday, August 14, 14
  • 3. Game Plan Technical Requirements Thursday, August 14, 14 Pac-12 networks has a vision to be one of the industry leaders in online sports media, integrating videos from all 12 conference schools as well as original content generated in their downtown San Francisco studio. Phase2 was contracted to help implement their vision. One major component of this project was the video solution, which is the part we’re talking about today.
  • 4. Key Video Requirements Thursday, August 14, 14 [Read requirements]
  • 5. Key Video Requirements • High traffic, bullet-proof uptime • Single-console editorial experience, with quick uploading • Import of external content • Tagging by sport, school, team, and type • Integration with scheduled events: before, during and after • Subscription-based access to streaming & premium content Thursday, August 14, 14 [Read requirements]
  • 6. The Offense How we did it Thursday, August 14, 14 Pac-12 had an existing video site - built by Lullabot, who did some great work on it - which accomplished some of these goals, but not all of them. We expanded on their work, added features, and tied it all together with a big bow on top. Here’s how...
  • 7. Running Game Integration with Ooyala & Drupal Thursday, August 14, 14 Pac-12’s integration with Ooyala required some key functionality, each of which posed their own unique challenges. These challenges included a way for users to dynamically add/edit/delete metadata fields to a video, an integration with services and chunked uploads for handling large file sizes, and keeping all of this in sync between The Network, The Schools & Ooyala.
  • 8. Custom Field A new, custom field type allows for direct uploads to Ooyala. That same field type stores reference information for both Live Broadcasts and On Demand videos. Thursday, August 14, 14 The foundation of our integration with Ooyala is the custom Ooyala Video field type. Because both Video on Demand and Live Broadcasts share many of the same properties, we decided to only make one field that could be shared by both. The actual field stores only the video’s Unique ID, provided by Ooyala. Ooyala is responsible for delivering video content and rendering the video player. We simply save a reference to the video in Drupal, and let the video provider handle the rest.
  • 9. Asynchronous Uploads Thursday, August 14, 14 Our videos are huge, so how can we best approach the upload issue? [PRESS SPACE BAR] This is a second function of our custom field and handler. Once the user has entered a title and chosen a video file, the upload can be initiated. We send an AJAX request to the services module which includes the title, the file name, the total size of the file and the desired size of each chunk to send to the server. Services initiates the calls to our Ooyala Video module which sends the provided information to Ooyala. Ooyala returns a serialized array of upload URLs for each chunk of video which we then pass back to the client to handle the upload. On the client we take each URL, splice the file chunk that coordinates with that URL and then send each one to Ooyala. This allows us to asynchronously handle the file upload, greatly increasing the speed in which a large file can be transmitted to Ooyala for processing.
  • 10. Asynchronous Uploads • Problem: How do you upload a 2 GB video quickly, without interrupting the editorial workflow? Thursday, August 14, 14 Our videos are huge, so how can we best approach the upload issue? [PRESS SPACE BAR] This is a second function of our custom field and handler. Once the user has entered a title and chosen a video file, the upload can be initiated. We send an AJAX request to the services module which includes the title, the file name, the total size of the file and the desired size of each chunk to send to the server. Services initiates the calls to our Ooyala Video module which sends the provided information to Ooyala. Ooyala returns a serialized array of upload URLs for each chunk of video which we then pass back to the client to handle the upload. On the client we take each URL, splice the file chunk that coordinates with that URL and then send each one to Ooyala. This allows us to asynchronously handle the file upload, greatly increasing the speed in which a large file can be transmitted to Ooyala for processing.
  • 11. Asynchronous Uploads • Problem: How do you upload a 2 GB video quickly, without interrupting the editorial workflow? • Solution: use the Services module to implement a chunked Ajax upload, while the editor finishes filling in other fields. Thursday, August 14, 14 Our videos are huge, so how can we best approach the upload issue? [PRESS SPACE BAR] This is a second function of our custom field and handler. Once the user has entered a title and chosen a video file, the upload can be initiated. We send an AJAX request to the services module which includes the title, the file name, the total size of the file and the desired size of each chunk to send to the server. Services initiates the calls to our Ooyala Video module which sends the provided information to Ooyala. Ooyala returns a serialized array of upload URLs for each chunk of video which we then pass back to the client to handle the upload. On the client we take each URL, splice the file chunk that coordinates with that URL and then send each one to Ooyala. This allows us to asynchronously handle the file upload, greatly increasing the speed in which a large file can be transmitted to Ooyala for processing.
  • 12. Track Segments Thursday, August 14, 14 Our Live Broadcast video type, “EPG”, has the extra requirement of a Track & a Track Segment. A Track is essentially a channel and a Track Segment is a slot in time on a given Track. A single EPG can have several Track Segments attached to it. Tracks were implemented as a basic taxonomy. For Track Segments, we implemented a custom database table. The reason we chose to do this was that Track Segments are never edited by users - they are all imported from scheduling data. We did not want all of the overhead of a full blown entity just to attach this data to our Ooyala Video fields. All of this is tracked in a separate custom table, which is also queried by the events display code that Josh will talk about in a few minutes.
  • 13. Metadata Configuration Thursday, August 14, 14 Metadata is a key/value pair of custom data that is stored in Ooyala with a video. It tells us sport, team, date, and other important information about the video. [PRESS SPACE BAR] In the past, entry of this information has been a tedious task for our content team. Rather than creating individual custom fields for each type of metadata we needed to store, we decided to borrow Drupal’s Form API for presentation, and stored the data as a serialized blob in our database. We built a custom configuration tool, pictured here, to manage these fields. This allowed us to assign field types to existing metadata fields.
  • 14. Metadata Configuration • Problem: How to handle tedious metadata entry and configuration? Thursday, August 14, 14 Metadata is a key/value pair of custom data that is stored in Ooyala with a video. It tells us sport, team, date, and other important information about the video. [PRESS SPACE BAR] In the past, entry of this information has been a tedious task for our content team. Rather than creating individual custom fields for each type of metadata we needed to store, we decided to borrow Drupal’s Form API for presentation, and stored the data as a serialized blob in our database. We built a custom configuration tool, pictured here, to manage these fields. This allowed us to assign field types to existing metadata fields.
  • 15. Metadata Configuration • Problem: How to handle tedious metadata entry and configuration? • Solution: Leverage FAPI and key to existing Ooyala metadata. Thursday, August 14, 14 Metadata is a key/value pair of custom data that is stored in Ooyala with a video. It tells us sport, team, date, and other important information about the video. [PRESS SPACE BAR] In the past, entry of this information has been a tedious task for our content team. Rather than creating individual custom fields for each type of metadata we needed to store, we decided to borrow Drupal’s Form API for presentation, and stored the data as a serialized blob in our database. We built a custom configuration tool, pictured here, to manage these fields. This allowed us to assign field types to existing metadata fields.
  • 16. Keeping it in Sync A handful of custom drush commands helps keep the Network in sync with their Schools and Ooyala. Thursday, August 14, 14 One of the biggest challenges was keeping all of our videos in sync. The main idea of this project is that Drupal would become the master point of record for all of our videos, including those uploaded through external platforms by our Schools. This meant that video data would need to be pulled from Ooyala on a regular basis, and video nodes created. To do this, we created some custom Drush commands. These commands were responsible for pulling down either EPG or VOD videos and importing/updating them in Drupal. These commands can be scheduled to run in custom intervals by either Jenkins or Acquia CRON. When a video is published, we push all of our meta-data in Drupal for the video back up to Ooyala using their PHP API.
  • 17. Passing Game Content Prioritization on Event Nodes Thursday, August 14, 14 Once all the videos are imported, uploaded, parsed, encoded, and ready to view... we need someplace to find and view them. That leads us to the Event Node. Events are one of the most complicated pieces of content on the site. Events display related content from any one of a number of other content types, defined using the Node Reference module. What content appears where and when is based on a complicated algorithm, incorporating time of day, content type, taxonomy, and freshness of content.
  • 18. Content related to the event Thursday, August 14, 14 Here is the order of prioritization for related event content. [PRESS SPACE BAR] [Read bullets] Within any content type if there are multiple items at the same level, they’ll be sequenced in reverse chronological order. There are secondary rules, based on school and team, if the above doesn’t have enough results to fill out an event node.
  • 19. • EPG (streaming video), if one is currently playing. • VOD (Video on demand), tagged with Highlight taxonomy term • VOD, tagged with Replay taxonomy term • VOD, untagged • Photo Gallery • Article, tagged with Preview or Recap taxonomy term • Article, untagged • Podcast Content related to the event Thursday, August 14, 14 Here is the order of prioritization for related event content. [PRESS SPACE BAR] [Read bullets] Within any content type if there are multiple items at the same level, they’ll be sequenced in reverse chronological order. There are secondary rules, based on school and team, if the above doesn’t have enough results to fill out an event node.
  • 20. Thursday, August 14, 14 Here’s what an *incomplete pass* at that query looked like. It was an attempt to find an EPG node, based on the Event’s NID, and then loaded that node. If it didn’t find one, then it attempted to do the same with VOD. If you dig into this query, you can see that it doesn’t do anything with the taxonomy terms, and that additional queries will be necessary to handle Galleries, Articles, and Podcasts. It was quickly apparent that this methodology wouldn’t work; the database load from this operation would likely have killed the site.
  • 21. Thursday, August 14, 14 The solution to this database issue turned out to be more database work. Specifically, a new table called event_priority, which allows us to store a weight for each node related to a given event. This weight is calculated once, when a content node is saved or updated, based on the rules shown earlier. Then, when an event it loaded, it queries this table with a tiny, super-fast, well-indexed query. Which is much, much better. More information about this process is available on Phase2’s blog.
  • 22. The Defense What we would do differently Thursday, August 14, 14 All that said, there are definitely some things we have learned through this process.
  • 23. Video Metadata Storage • Metadata is stored as a serialized array in a database blob • The intent was to keep it from the full field API overhead • Doesn’t allow for filtering and sorting by views, or auto- complete fields • End solution was to add capability to import / export process to transfer data into fields • Better solution would have been to use fields originally Thursday, August 14, 14 We made a decision very early on to store metadata in a database blob in a self-contained table. Our intention was to shield this data from the processing overhead of a full-fledged Drupal field. This backfired on us. We wound up later needing to use that data in views as a filter or sort parameter, and to allow it to inform auto-complete fields. Thus, we had to add a workaround to the import and export process that *also* stored most of those data items in fields. The better solution would have been to use fields from the start.
  • 24. Home-grown Video Solution • Assembled using openly available components including: • Brightcove’s Zencoder or Amazon Elastic Transcoder • Amazon S3 • Drupal Video module, which supports multiple players • Less expensive • More possible customization Thursday, August 14, 14 A possible avenue of exploration for Pac-12’s future exploration and development is to build their own video solution. Phase2 has had some good results lately with another sports client creating a video hosting and encoding solution using an assortment of openly available components. These include Brightcove’s Zencoder or Amazon Elastic Transcoder, Amazon S3 hosting, and the Drupal video module, which supports multiple different players. This would have multiple advantages: First and foremost, Drupal would be truly the source-of-truth for all video data. No more pushing metadata back and forth! It’s also a less expensive solution, with a much higher possible degree of customization.
  • 25. Post-game Interview Questions? Thursday, August 14, 14 We have time for a few questions.
  • 26. Senior Developer, Phase2 Email: jturton@phase2technology.com Joshua Turton Twitter: @sjinteractive Web Developer, Pac-12 Networks Email: lgeng@pac-12.org Lance Geng Thursday, August 14, 14