Bojan Ramšak
and 1 contributors


DVB::Carousel - Handling of simple DVB carousel database used by ringelspiel.


Add, delete and list MPEG-2 transport streams chunks in a carousel playout system.

    use DVB::Carousel;

    my $myCarousel = DVB::Carousel->new( 'databasefile');

    # initialize the basic databse table structure

    # add file to carousel by pid 12 with repetition rate 2000 ms
    $myCarousel->addFile( 12, "nit.ts", 2000);

    # add some binary data to carousel by pid 16 with repetition rate 30 s
    my $data = generateSomeData();
    $myCarousel->addMts( 16, \$data, 30000);

    # delete carousel data with pid 16 
    $myCarousel->deleteData( 16);



new( $dbfile )

Class initialization with sqlite3 database filename. Open existing or create new sqlite database.

initdb( )

Initialize database with some basic table structure; This service can then be played multiple times with different service_id. Therefore service_id is used when building sections and referencing data in sections.

addMts ( $pid, \$mts, $interval)

Add/update MPEG-2 transport stream (MTS) binary data for $pid into carousel. The MTS data consists of multiple packets each 188 bytes long. Return 1 on success.

addFile ( $pid, $fileName, $interval)

Same as addMts () except getting MPEG-2 transport stream FROM file.

deleteMts( $pid)

Remove MTS data from carousel by $pid. If $pid not defined, delete all.

Return 1 on success.

listMts( $pid)

List information on MPEG-2 transport stream data in carousel. $pid is an optional parameter used as selection filter.

Return reference to an array of arrays of MTS consisting of pid, repetition interval and timestamp of last update.

getMts( $pid)

Return reference to array of MPEG-2 transport stream data in carouselfor $pid. The elements of array are pid, repetition interval, MTS binary data and timestamp of last update.


Bojan Ramsak, <>


Please report any bugs or feature requests to bug-dvb-carousel at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc DVB::Carousel

You can also look for information at:



Copyright 2012 Bojan Ramsak.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 162:

'=item' outside of any '=over'

Around line 268:

You forgot a '=back' before '=head1'