public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Weird TS Stream from DMX_SET_PES_FILTER
       [not found] <1519873602.105111237502250958.JavaMail.root@email>
@ 2009-03-19 22:38 ` Bob Ingraham
  2009-03-20  9:09   ` [linux-dvb] " Brice Dubost
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Ingraham @ 2009-03-19 22:38 UTC (permalink / raw)
  To: linux-dvb, linux-media

Hello,

I've been using the Linux DVB API to grab DBV-S MPEG2 video packets using a TechniSat S2 card.

But something seems odd about DMX_SET_PES_FILTER.

It returns a TS packets for my pid just fine, but by MPEG2 frames have no PES headers!  The raw compressed MPEG2 frames just immediately follow the TS/adapation-field headers directly.

When I wrote my TS packet decoder, I was expecting to have to decode PES headers after the TS header. But instead I found the raw compressed frames.

They decode fine (with ffmpeg's libavcodec mpeg2 decoder,) and they look fine when rendered using SDL.

But besides my own program, I can't get vlc or mplayer to decode this stream. Both vlc and mplayer sense a TS stream, but then they never render anything because, I suspect, that they can't find PES headers.

So, two questions:

1. Am I crazy or is DMX_SET_PES_FILTER returning a non-standard TS stream?

2. Is there a way to receive a compliant MPEG-TS (or MPEG2-PS,) stream?

3. Should I use DMX_SET_FILTER instead?

4. If so, what goes in the filter/mask members of the dmx_filter_t struct?


Thanks,
Bob

PS: I use the following to filter on my video stream pid (0x1344):

 struct dmx_pes_filter_params f;

 memset(&f, 0, sizeof(f));
 f.pid = (uint16_t) pid;
 f.input = DMX_IN_FRONTEND;
 f.output = DMX_OUT_TS_TAP;
 f.pes_type = DMX_PES_OTHER;
 f.flags   = DMX_IMMEDIATE_START;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-dvb] Weird TS Stream from DMX_SET_PES_FILTER
  2009-03-19 22:38 ` Weird TS Stream from DMX_SET_PES_FILTER Bob Ingraham
@ 2009-03-20  9:09   ` Brice Dubost
  0 siblings, 0 replies; 2+ messages in thread
From: Brice Dubost @ 2009-03-20  9:09 UTC (permalink / raw)
  To: linux-media; +Cc: linux-dvb

Bob Ingraham wrote:
> Hello,
> 
> I've been using the Linux DVB API to grab DBV-S MPEG2 video packets using a TechniSat S2 card.
> 
> But something seems odd about DMX_SET_PES_FILTER.
> 
> It returns a TS packets for my pid just fine, but by MPEG2 frames have no PES headers!  The raw compressed MPEG2 frames just immediately follow the TS/adapation-field headers directly.
> 
> When I wrote my TS packet decoder, I was expecting to have to decode PES headers after the TS header. But instead I found the raw compressed frames.
> 
> They decode fine (with ffmpeg's libavcodec mpeg2 decoder,) and they look fine when rendered using SDL.
> 
> But besides my own program, I can't get vlc or mplayer to decode this stream. Both vlc and mplayer sense a TS stream, but then they never render anything because, I suspect, that they can't find PES headers.
> 
> So, two questions:
> 
> 1. Am I crazy or is DMX_SET_PES_FILTER returning a non-standard TS stream?
> 
> 2. Is there a way to receive a compliant MPEG-TS (or MPEG2-PS,) stream?
> 
> 3. Should I use DMX_SET_FILTER instead?
> 
> 4. If so, what goes in the filter/mask members of the dmx_filter_t struct?
> 
> 
> Thanks,
> Bob
> 
> PS: I use the following to filter on my video stream pid (0x1344):
> 
>  struct dmx_pes_filter_params f;
> 
>  memset(&f, 0, sizeof(f));
>  f.pid = (uint16_t) pid;
>  f.input = DMX_IN_FRONTEND;
>  f.output = DMX_OUT_TS_TAP;
>  f.pes_type = DMX_PES_OTHER;
>  f.flags   = DMX_IMMEDIATE_START;
> 
> 

Hello,
I use exactly the same parameters and I get a raw mpeg2-TS stream (ie
packet of 188 bytes with the TS headers as defined in the mpeg2-ts norm)

If you want your stream to be read with VLC you need also the PAT and
the PMT pids. If you want the sound you'll need also the PCR pid.

I don't know how to get the PES headers

Hope this information will help you

Regards

-- 
Brice

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-20  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1519873602.105111237502250958.JavaMail.root@email>
2009-03-19 22:38 ` Weird TS Stream from DMX_SET_PES_FILTER Bob Ingraham
2009-03-20  9:09   ` [linux-dvb] " Brice Dubost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox