Yes Olaf you are right.

But you can convert PES Stream to ES STREAM after cutting them (if necessary) using PES2XX tools bundled in mpegtools package.

You have to sync all ES_STREAM before trying to remux them.

It may be possible to adapt the mplex code to enable remuxing PES streams as they are extracted from PES/TS stream defined on input.

Patrick.

Olaf Beck wrote:
Hello Patrick
Thanks for your answer and the patch, however the problem is that it's about ES streams (i.e. streams without PES sync information) or am I totaly off :). I mean the input type as I see it says ES_STREAM and not PES_STREAM ;-).

The extracted files from the tivo will either be:
- separate PES streams (files) one for Video and one (or more) for Audio. - a muxed PES stream (file) containing both video and audio. --NOTE--: The muxed stream has no PS information what so ever!

Anyways I must say thanks once again for replying!

Cheers Olaf

On Saturday 19 October 2002 01:35, Patrick GUENEAU wrote:

hello Olaf,

In mpegtools packaged with linux-dvb driver you can find mplex program
which can do what you want.

The doc says it can mux 1 video + 1 audio but in fact, the subroutines
are able to handle 2 audio PES streams. Have a look at the code (domplex
subroutine).

In case it may help you, here is a patch I proposed more a few months
ago in this Maillist:

You may need to adapt this patch to the latest mplex version as it may
have changed a bit.

========================================================================
--- mplex.cpp   Wed Jun 27 14:21:48 2001
+++ ../../../DVB/apps/mpegtools/mplex.cpp       Fri May 10 23:45:29 2002
@@ -240,7 +240,7 @@
        printf ("  --help,             -h:  print help message\n");
        printf ("  --type,             -t:  set output type (MPEG2, DVD,
SVCD (default), MPEG1, VCD, XSVCD)\n");
        printf ("  --of,               -o:  set output file\n");
-       printf ("  --input_stream,     -i:  set input stream type
(PS_STREAM (default), TS_STREAM, ES_STREAM (needs 2 input files audio
video))\n");
+       printf ("  --input_stream,     -i:  set input stream type
(PS_STREAM (default), TS_STREAM, ES_STREAM (needs 2 or 3 input files
<audio1> [ <audio2> ] <video>))\n");
        printf ("  --temp_dir,         -d:  directory for temporary
demux files\n");
        printf ("  --audio_delay,      -a:  set audio delay in ms\n");
        printf ("  --video_delay,      -v:  set video delay in ms\n");
@@ -332,6 +332,10 @@
        } else if (optind == argc-2 && !strcmp(inpt,"ES_STREAM")) {
                strcpy(AudioFilename,argv[optind]);
                strcpy(VideoFilename,argv[optind+1]);
+       } else if (optind == argc-3 && !strcmp(inpt,"ES_STREAM")) {
+               strcpy(AudioFilename,argv[optind]);
+               strcpy(Audio1Filename,argv[optind+1]);
+               strcpy(VideoFilename,argv[optind+2]);
        } else {
                usage(argv[0]);
        }
@@ -404,7 +408,11 @@
        if (ptsdiff > 0) video_delay_ms += ptsdiff/90;
        else audio_delay_ms += -ptsdiff/90;

-       domplex(1,1);
+       if (strlen(Audio1Filename))
+          domplex(1,2);
+        else
+          domplex(1,1);
+
        if (strcmp(inpt,"ES_STREAM")){
                unlink(AudioFilename);
                unlink(VideoFilename);

========================================================================

Have fun !!

Patrick.

Olaf Beck wrote:

Hello Folks,

I'm doing some work with a proprietary MPEG stream (TIVO - DirecTv). The
PS stream or what ever you would like to call it is of proprietary nature
but the PES stream is following the MPEG specs to some extent.

I now have code in a early stage and it looks like it will be quite easy
to extract two PES streams from the "TIVO-PS" stream. One audio (either
AC3 or MPEG)  and one Video. I want to extact the PES stream since it
will enable me to keep the PTS information so the final PS stream is in
sync.

Now for what all I have seen in forms of Open Source muxers is muxers
that only can mux ES streams or at least thats what a quick look tells
me. Does anyone know of a way to mux PES streams?

Cheers Olaf

PS: Yes, I could naturally modify a OSS muxer to take to PES streams but
I rather spend time coding on the extraction.






--
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.

Reply via email to