* [linux-dvb] RE : inserting user PIDs in TS
@ 2008-05-13 20:32 Andrea Venturi
0 siblings, 0 replies; 3+ messages in thread
From: Andrea Venturi @ 2008-05-13 20:32 UTC (permalink / raw)
To: linux-dvb
Thierry Lelegard wrote:
>
>
>> I would like to know that can we insert user defined PIDs into the TS
>> stream. how should i go about? What standard should i follow? How
should I
>> format the the packets ( segment - section etc...).
>> can any body help in this regard.
>
> Yes, in theory, you can.
>
> Keep in mind, however, that multiplexing is a quite difficult job
> (this is what multiplexers are made for).
hi,
if i can suggest a starting point, there's already a free software
project for transport stream manipulation; it's called JustDVb-It, the
GPL licensed package we made in our previous company Cineca since 2004:
http://www.cineca.tv/labs/mhplab/JustDVb-It%202.0.html
it's a set of simple tools (following unix filosophy) you can put
together in some customized ways to accomplish complex tasks.
for example, it can filter PID on a TS, swap some PIDs with others,
transform python described PSI tables in sections then in TS packets,
and create DSMCC carousels too..
there's a live CD to demo it with a DVB ASI port in a sample
configuration (for italian MHP based interactive television)
the current version can't restamp PCR, as it's quite a complex task, but
this feature is something that we are releasing RSN in our new-born
start-up Avalpa (http://www.avalpa.com). stay tuned!
HTH
bye
andrea venturi
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 3+ messages in thread
* [linux-dvb] inserting user PIDs in TS
@ 2008-05-13 13:13 Gurumurti Laxman Maharana
2008-05-13 13:29 ` [linux-dvb] RE : " Thierry Lelegard
0 siblings, 1 reply; 3+ messages in thread
From: Gurumurti Laxman Maharana @ 2008-05-13 13:13 UTC (permalink / raw)
To: Krzysztof Burghardt; +Cc: linux-dvb
Hi all
I would like to know that can we insert user defined PIDs into the TS
stream. how should i go about? What standard should i follow? How should I
format the the packets ( segment - section etc...).
can any body help in this regard.
Thanks with regards.
guru
> 2008/5/12 Gurumurti Laxman Maharana <gurumurti@nkindia.com>:
>> I am looking for information EPG format. Can any body guide me in this
>> regard. How EPGs are formated and streamed along with the programs.
>> Thanks with regards.
>
> Electronic Programme Guide is an application, so you can implement it
> on your own.
>
> If you want to read about Service Information (SI) in DVB (data you
> see in EPG comes from SI) start with ETSI EN 300 468[1] and Event
> Information Table (EIT) section. All DVB specifications are available
> from dvb.org[2].
>
> [1] I'm not sure if they like deep links, but just put spec name to
> Google to get URL to PDF
> [2] http://www.dvb.org/technology/standards/
>
> --
> Krzysztof Burghardt <krzysztof@burghardt.pl>
> http://www.burghardt.pl/
>
--
guru
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 3+ messages in thread
* [linux-dvb] RE : inserting user PIDs in TS
2008-05-13 13:13 [linux-dvb] " Gurumurti Laxman Maharana
@ 2008-05-13 13:29 ` Thierry Lelegard
2008-05-19 11:26 ` Morgan Tørvolt
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Lelegard @ 2008-05-13 13:29 UTC (permalink / raw)
To: linux-dvb
>I would like to know that can we insert user defined PIDs into the TS
>stream. how should i go about? What standard should i follow? How should I
>format the the packets ( segment - section etc...).
>can any body help in this regard.
Yes, in theory, you can.
Keep in mind, however, that multiplexing is a quite difficult job
(this is what multiplexers are made for).
Several issue (no specific order):
- What is your target application in the STB? What kind of data does it
expect? How does it determine the data PID?
- Selecting a data format. If you target an EPG as your previous postings
suggest, you need to build EIT-schedule sections. See ETSI EN 300 468,
"Digital Video Broadcasting (DVB); Specification for Service Information
(SI) in DVB systems".
- Build TS packets from sections. See ISO/IEC 13818-1, "Information technology,
Generic coding of moving pictures and associated audio information: Systems"
(a.k.a. "MPEG-2 system layer"). Also be careful to update continuity counters.
- Insert TS packets in the transport stream. Several possibilities:
1) Really "insert" (ie. "add") packets in the TS. Note that this will increase
the bitrate of the TS, which may be a problem depending on the transport medium.
You will also have to resample all PCR's, which can be very tricky.
2) Replace existing packets with yours, without deleting any. This way, the
bitrate of the TS remains the same and you do not need to modify the PCR.
Now, the question is "which packets should I replace?" since these packets
will be deleted from the TS. Two possibilities:
2.1) If your data naturally replace one PID, replace all packets from this
PID. If you want to replace the EIT for instance, replace all packets from
PID 0x0012. But keep in mind that this PID potentially contains 4 types of
EIT's: schedule and present/following, both either "actual" or "other".
So, if you replace only one type of EIT, be cautious to keep to others
and to reinject them in your rebuilt PID.
2.2) If you create a new PID, the simplest method is to "steal" stuffing
packets (any packet from PID 0x1FFF). Most TS contain stuffing, sometimes
more than 1 Mb/s of stuffing. If your required data rate is less than the
suffing rate of the TS, this is the simplest method.
- Finally, make sure your PID is referenced somewhere, in accordance with
your application: predefined standard PID such as 0x0012 for EIT or as a
component of a service in a PMT, or as a new data service with a dedicated
PMT (also require to update the PAT and optionally the SDT and NIT).
Remember that if your TS is going through a MUX, PID remapping may occur
and your TS need to be consistent from the beginning.
I have already done all of this (creating sections, packetizing them,
stealing stuffing, adding components in a PMT, etc). It works quite well
but it is not really easy without the appropriate tools (you need to code
everything yourself).
-Thierry
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-dvb] RE : inserting user PIDs in TS
2008-05-13 13:29 ` [linux-dvb] RE : " Thierry Lelegard
@ 2008-05-19 11:26 ` Morgan Tørvolt
0 siblings, 0 replies; 3+ messages in thread
From: Morgan Tørvolt @ 2008-05-19 11:26 UTC (permalink / raw)
To: Thierry Lelegard; +Cc: linux-dvb
I am not sure that I agreen on having to modify PCR even if you add
data to the mux. Every service has it's own PCR, If you add a new pid
without PCR, then you just have to increase output datarate
accordingly. As long as the PCR leaves the muxing software at the same
time as it would do without injecting the pid, there should be no
difference at the receiving end. You should be able to inject any
ammount of pids and data as long as you don't introduce a lot of PCR
jitter (given that the receiving end can handle the increased datarate
of course)
-Morgan-
On 13/05/2008, Thierry Lelegard <thierry.lelegard@tv-numeric.com> wrote:
> >I would like to know that can we insert user defined PIDs into the TS
> >stream. how should i go about? What standard should i follow? How should I
> >format the the packets ( segment - section etc...).
> >can any body help in this regard.
>
>
> Yes, in theory, you can.
>
> Keep in mind, however, that multiplexing is a quite difficult job
> (this is what multiplexers are made for).
>
> Several issue (no specific order):
>
> - What is your target application in the STB? What kind of data does it
> expect? How does it determine the data PID?
>
> - Selecting a data format. If you target an EPG as your previous postings
> suggest, you need to build EIT-schedule sections. See ETSI EN 300 468,
> "Digital Video Broadcasting (DVB); Specification for Service Information
> (SI) in DVB systems".
>
> - Build TS packets from sections. See ISO/IEC 13818-1, "Information technology,
> Generic coding of moving pictures and associated audio information: Systems"
> (a.k.a. "MPEG-2 system layer"). Also be careful to update continuity counters.
>
> - Insert TS packets in the transport stream. Several possibilities:
>
> 1) Really "insert" (ie. "add") packets in the TS. Note that this will increase
> the bitrate of the TS, which may be a problem depending on the transport medium.
> You will also have to resample all PCR's, which can be very tricky.
>
> 2) Replace existing packets with yours, without deleting any. This way, the
> bitrate of the TS remains the same and you do not need to modify the PCR.
> Now, the question is "which packets should I replace?" since these packets
> will be deleted from the TS. Two possibilities:
>
> 2.1) If your data naturally replace one PID, replace all packets from this
> PID. If you want to replace the EIT for instance, replace all packets from
> PID 0x0012. But keep in mind that this PID potentially contains 4 types of
> EIT's: schedule and present/following, both either "actual" or "other".
> So, if you replace only one type of EIT, be cautious to keep to others
> and to reinject them in your rebuilt PID.
>
> 2.2) If you create a new PID, the simplest method is to "steal" stuffing
> packets (any packet from PID 0x1FFF). Most TS contain stuffing, sometimes
> more than 1 Mb/s of stuffing. If your required data rate is less than the
> suffing rate of the TS, this is the simplest method.
>
> - Finally, make sure your PID is referenced somewhere, in accordance with
> your application: predefined standard PID such as 0x0012 for EIT or as a
> component of a service in a PMT, or as a new data service with a dedicated
> PMT (also require to update the PAT and optionally the SDT and NIT).
> Remember that if your TS is going through a MUX, PID remapping may occur
> and your TS need to be consistent from the beginning.
>
> I have already done all of this (creating sections, packetizing them,
> stealing stuffing, adding components in a PMT, etc). It works quite well
> but it is not really easy without the appropriate tools (you need to code
> everything yourself).
>
>
> -Thierry
>
>
>
> _______________________________________________
> linux-dvb mailing list
> linux-dvb@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-19 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 20:32 [linux-dvb] RE : inserting user PIDs in TS Andrea Venturi
-- strict thread matches above, loose matches on Subject: below --
2008-05-13 13:13 [linux-dvb] " Gurumurti Laxman Maharana
2008-05-13 13:29 ` [linux-dvb] RE : " Thierry Lelegard
2008-05-19 11:26 ` Morgan Tørvolt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox