Prior to the 0.9 series, the documentation typically referred to the media scripts as the “webscripts”. Starting with the 0.9 series, the documentation refers to these scripts as “media scripts”.
Media scripts were previously installed to:
They are now installed to:
Return all media streams
The media scripts are now expected to return all available media streams when the library calls the ‘parse’ function. In the 0.4 series, the ‘parse’ function returned only one stream. This change leaves it for the applications to decide which one to use.
- Each media stream has now an ID (e.g. $container_$encoding_$height)
- The ‘default’ stream is now whatever the script returns as the first stream
When a media script returns >1 streams, it is expected to identify the media stream by assigning it an ID.
query_formats is now unused
The library no longer calls this function and it can be removed from the scripts ported from the 0.4 series to the 0.9 series. The use of this function has been obsoleted by Return all media streams.
No protocol categories
The library no longer supports “protocol categories”, thus returning this (‘r.categories’) from the media scripts is no longer required. Any code that does this, can be removed from the scripts ported from the 0.4 series to the 0.9 series. This change leaves it for the applications to decide what to do with unsupported media stream protocols.
All but the media stream URL are now optional properties. In practice, this means that the media scripts must not raise an error if a property could not be parsed, unless it is the media stream URL. Instead, the property should simply be set to an empty string value (or 0 if a numerical property type).
- The applications that previously depended on these, now optional, properties, will have to work around this change
New media properties have been introduced, e.g. height and width for video, and bitrate for audio.
The use of the ‘goto_url’ (previously “redirect_url”) instruction in a script no longer causes the library to reset the media properties. For example, if script A sets qargs.title, the library will pass this value to script B.