The current implementation of the Ingest API expects the ingested media packages to - in the case of multi stream recordings - contain tracks of equal length that are starting at the same time. In order to support custom-built capture agents, the ingest API has been extended to support the addition of tracks that don’t start at time 0, are shorter or contain pauses. This presentation will describe what is possible for users of the extended api as well as how the implementation is turning the partial tracks into compliant media packages.
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Opencast: Extending the ingest API to support partial tracks
1. Extending the ingest API
to support partial tracks
SWITCH / Entwine
Lukas, Rohner
Software Engineer
for the open minded
http://entwinemedia.com
@entwinemedia
2. – for the open minded
What is it about
The current implementation of the Ingest API expects the ingested
media packages to contain tracks of equal length that are starting at
the same time.
The SWITCHcast recorder is able to deal with pauses and other crazy
situations during recording.
In order to support these use cases, the ingest API has been
extended to support the addition of tracks that don’t start at time 0,
are shorter or contain pauses.
3. – for the open minded
Current behavior (Sample)
Presentation Track
Presenter Track
Audio Track
Ingested Tracks
Time
4. – for the open minded
Current behavior (Sample)
Presentation Track
Presenter Track
Audio Track
Audio Track
Muxed together
Time
5. – for the open minded
New behavior partial tracks (Sample)
Presentation Part A
Presenter Part A Presenter Part B Presenter Part C
Audio Part A Audio Part B
Presentation Part B
Ingested Partial Tracks
Time
6. – for the open minded
New behavior partial tracks (Sample)
Presentation Part BPresentation Part A
Presenter Part A Presenter Part B Presenter Part C
Audio Part A Audio Part B
Extract first/last image frames
Time
7. – for the open minded
New behavior partial tracks (Sample)
Presentation Part BPresentation Part A
Presenter Part A Presenter Part B Presenter Part C
Frame Frame
… … …
Audio Part A Audio Part BSilent Track
Convert image frames to videos fill the gaps
Time
8. – for the open minded
New behavior partial tracks (Sample)
Concatenated Presentation Track
Concatenated Presenter Track
Concatenated Audio Track
Concatenate partial tracks
Time
9. – for the open minded
How it works
SMIL catalog
Synchronized Multimedia Integration Language (W3C)
XML Structure
Already used in the cutting tool
FFmpeg
Extract first/last image frames
Converting image to videos fill gaps
Generating silent audio
Audio/Video concatenation
10. – for the open minded
How to use
Extended Ingest API
zipped mediapackage (create it yourself)
Transactional API
11. – for the open minded
Extended Ingest API
POST /ingest/addPartialTrack
Parameter Type Description
url String The location of the media
flavor String The kind of media
startTime Integer The start time
mediaPackage String The media package as XML
12. – for the open minded
Extended Ingest API
POST /createMediaPackage
POST /addPartialTrack ("presenter/partial", 10)
POST /addPartialTrack ("presenter/partial", 50)
POST /ingest
Track
TrackTrack
13. – for the open minded
How to use
PartialImportWorkflowOperationHandler
Inserted at first position in the workflow
Reading SMIL
Instructing FFmpeg commands
14. – for the open minded
Questions?
Available in Matterhorn 2.1
lukas@entwinemedia.com
Thanks to SWITCH