From: Josef Wolf <jw@raven.inka.de>
To: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] How to convert MPEG-TS to MPEG-PS on the fly?
Date: Fri, 22 Aug 2008 16:44:48 +0200 [thread overview]
Message-ID: <20080822144448.GF32022@raven.wolf.lan> (raw)
In-Reply-To: <52113.203.82.187.131.1219367267.squirrel@webmail.planb.net.au>
On Fri, Aug 22, 2008 at 11:07:47AM +1000, Kevin Sheehan wrote:
> Barry was right on the money with the ts2ps suggestion below. It's part
> of the libdvb package. You don't have to use the dvb-mpegtools app, you
> can just use the lib in yours - no pipes, etc.
I know. But I still consider ts2ps to be too heavy for my application.
It goes and parses all the PES contents, which eats much CPU.
But at least, ts2pes was very helpful in analyzing the differences in
the stream between what I created and what ts2pes created. Finally, I
have found the problem:
I appears that PES_packet_length==0 is allowed in TS _only_. While
unpacking, the long packet (I have seen up to 100 kbytes) extracted
from the TS needs to be split up into smaller ones. ps2pes splits
into pieces with PES_packet_length==0x7fa and prepends an empty PES
header (with only the length specification) to each of the new packets.
Finally, I can generate a PES stream with one video and multiple
audio streams which is played pretty fine by mplayer and vlc.
Now I need to add the PS pack header (ts2ps adds 14 bytes) and the
system header (ts2ps adds 18 bytes). For this, I have two more
questions:
1. Is the system_header required at all? Table 2-33 in iso-13818-1
seems to make it optional.
2. For creating the PS pack header, the only missing information is
the program_mux_rate. How is this value calculated? How accurate
has this value to be? If the stream bit rate changes (maybe because
of changes in resolution), do I need to adopt this value and generate
a MPEG_program_end_code and add a new pack header with the new
value? Or will the player stop when it detects MPEG_program_end_code?
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
next prev parent reply other threads:[~2008-08-22 14:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 21:10 [linux-dvb] How to convert MPEG-TS to MPEG-PS on the fly? Josef Wolf
2008-08-20 21:17 ` Steven Toth
2008-08-20 21:48 ` Josef Wolf
2008-08-21 12:10 ` barry bouwsma
2008-08-21 17:45 ` Josef Wolf
2008-08-22 1:07 ` Kevin Sheehan
2008-08-22 5:15 ` barry bouwsma
2008-08-22 15:16 ` Josef Wolf
2008-08-22 14:44 ` Josef Wolf [this message]
2008-08-22 15:44 ` Nick Ludlam
2008-08-25 19:02 ` Josef Wolf
2008-08-26 6:49 ` Nico Sabbi
2008-08-26 12:00 ` barry bouwsma
2008-08-26 22:45 ` Josef Wolf
2008-08-27 7:26 ` barry bouwsma
2008-08-27 22:00 ` Josef Wolf
2008-08-28 14:40 ` Johannes Stezenbach
2008-08-28 19:34 ` Josef Wolf
2008-08-28 21:09 ` Johannes Stezenbach
2008-08-28 22:48 ` Josef Wolf
2008-08-29 5:49 ` Josef Wolf
2008-08-29 15:45 ` [linux-dvb] PTS/DTS clarification (Was: How to convert MPEG-TS to MPEG-PS on the fly?) Josef Wolf
2008-08-26 22:31 ` [linux-dvb] How to convert MPEG-TS to MPEG-PS on the fly? Josef Wolf
2008-08-21 19:17 ` Josef Wolf
2008-08-21 21:14 ` Josef Wolf
2008-08-22 8:10 ` [linux-dvb] RE : " Thierry Lelegard
2008-08-25 19:55 ` Josef Wolf
2008-08-26 6:50 ` Nico Sabbi
2008-08-26 21:19 ` Josef Wolf
2008-08-22 7:57 ` Thierry Lelegard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080822144448.GF32022@raven.wolf.lan \
--to=jw@raven.inka.de \
--cc=linux-dvb@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox