Pipeline to convert a transport stream into an AVI file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pipeline to convert a transport stream into an AVI file

Julien Pauty
Hello,

I'm trying to convert a file containing transport stream into a regular AVI file. Since it's not possible (yet) to seek into a transport stream, I would like to convert it into a format where seeking is supported. My idea was to extract the video and audio streams and then to store them into an AVI container.

I made this pipeline:
gst-launch avimux name=mux ! filesink location=/tmp/test2.avi  filesrc location=257.ts ! mpegtsdemux name=demux demux.video_0078 ! mux.video_00  demux.audio_0082 !  mux.audio_00

This does not work and exits with the following errors:

Définition du pipeline à PAUSED...
Le pipeline est en phase de PREROLL...
ERREUR : de l'élément /GstPipeline:pipeline0/GstFileSrc:filesrc0 : Internal data stream error.
Information de débogage supplémentaire :
gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR : pipeline refuse to go into setup phase
Définition du pipeline à NULL...
Libération du pipeline (FREE)...

(I translated the main info, rest is in french).

I do have a pipeline that convert the file:

gst-launch avimux name=mux ! filesink location=/tmp/test2.avi  filesrc location=257.ts ! mpegtsdemux name=demux demux.video_0078 !  queue  ! mpeg2dec ! ffmpegcolorspace ! mpeg2enc ! queue ! mux.video_00  demux.audio_0082 ! queue ! mad ! audioconvert ! lame ! queue ! mux.audio_00

This one involves decoding and recoding video, which is useless since the formats are the same. I would like to just extract streams and store them into a different container.

Is it possible to make such pipeline ? Using avi is not a requirement. I just want to convert the transport stream into a format that supports seeking well.

Thanks for your help,

Julien


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline to convert a transport stream into an AVI file

LIANG ZHAO-2
more debug log needed, especially the caps of mpegtsdemux srcpads, if these srcpad caps are not compatible with avimux, these elements can not be connected into one pipeline.
 
Zhao Liang

From: Julien Pauty [mailto:[hidden email]]
Sent: Friday, November 28, 2008 6:48 AM
To: Discussion of the development of GStreamer
Subject: [gst-devel] Pipeline to convert a transport stream into an AVI file

Hello,

I'm trying to convert a file containing transport stream into a regular AVI file. Since it's not possible (yet) to seek into a transport stream, I would like to convert it into a format where seeking is supported. My idea was to extract the video and audio streams and then to store them into an AVI container.

I made this pipeline:
gst-launch avimux name=mux ! filesink location=/tmp/test2.avi  filesrc location=257.ts ! mpegtsdemux name=demux demux.video_0078 ! mux.video_00  demux.audio_0082 !  mux.audio_00

This does not work and exits with the following errors:

Définition du pipeline à PAUSED...
Le pipeline est en phase de PREROLL...
ERREUR : de l'élément /GstPipeline:pipeline0/GstFileSrc:filesrc0 : Internal data stream error.
Information de débogage supplémentaire :
gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR : pipeline refuse to go into setup phase
Définition du pipeline à NULL...
Libération du pipeline (FREE)...

(I translated the main info, rest is in french).

I do have a pipeline that convert the file:

gst-launch avimux name=mux ! filesink location=/tmp/test2.avi  filesrc location=257.ts ! mpegtsdemux name=demux demux.video_0078 !  queue  ! mpeg2dec ! ffmpegcolorspace ! mpeg2enc ! queue ! mux.video_00  demux.audio_0082 ! queue ! mad ! audioconvert ! lame ! queue ! mux.audio_00

This one involves decoding and recoding video, which is useless since the formats are the same. I would like to just extract streams and store them into a different container.

Is it possible to make such pipeline ? Using avi is not a requirement. I just want to convert the transport stream into a format that supports seeking well.

Thanks for your help,

Julien


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline to convert a transport stream into an AVI file

Julien Pauty
Hello,

Here are the capabilities of avimux and mpegtsdemux:

avimux:

audio/mpeg

SINK template: 'audio_%d'
mpegversion: 1
          layer: [ 1, 3 ]
           rate: [ 1000, 96000 ]
       channels: [ 1, 2 ]
audio/mpeg
    mpegversion: 4
           rate: [ 1000, 96000 ]
       channels: [ 1, 2 ]

SINK template: 'video_%d'
video/mpeg
          width: [ 16, 4096 ]
         height: [ 16, 4096 ]
      framerate: [ 0/1, 2147483647/1 ]
    mpegversion: { 1, 2, 4 }
    systemstream: false

mpegtsdemux:

audio/mpeg
    mpegversion: { 1, 4 }

video/mpeg
      mpegversion: { 1, 2, 4 }
      systemstream: false

To me they seem compatible.

I'm using the last version of gstreamer. For the mpegtsdemux I'm using the CVS version, only for this plugin though. I wanted to test the very last version.

Using the ffdemux_mpegts, I'm able to convert the file, but the sound is bad. It sounds like if the sound is muted several times per second. This is the pipeline i'm using:

gst-launch avimux name=mux ! filesink location=/tmp/test2.avi sync=true  filesrc location=257.ts do-timestamp=true ! ffdemux_mpegts name=demux demux.video_00 ! 'video/mpeg'   ! queue ! mux.video_00  demux.audio_00 ! 'audio/mpeg' ! queue !  mad ! audioconvert ! lame ! queue ! mux.audio_00

Thank you,

Julien


2008/11/28 Zhao Liang-E3423C <[hidden email]>
more debug log needed, especially the caps of mpegtsdemux srcpads, if these srcpad caps are not compatible with avimux, these elements can not be connected into one pipeline.
 
Zhao Liang

From: Julien Pauty [mailto:[hidden email]]
Sent: Friday, November 28, 2008 6:48 AM
To: Discussion of the development of GStreamer
Subject: [gst-devel] Pipeline to convert a transport stream into an AVI file

Hello,

I'm trying to convert a file containing transport stream into a regular AVI file. Since it's not possible (yet) to seek into a transport stream, I would like to convert it into a format where seeking is supported. My idea was to extract the video and audio streams and then to store them into an AVI container.

I made this pipeline:
gst-launch avimux name=mux ! filesink location=/tmp/test2.avi  filesrc location=257.ts ! mpegtsdemux name=demux demux.video_0078 ! mux.video_00  demux.audio_0082 !  mux.audio_00

This does not work and exits with the following errors:

Définition du pipeline à PAUSED...
Le pipeline est en phase de PREROLL...
ERREUR : de l'élément /GstPipeline:pipeline0/GstFileSrc:filesrc0 : Internal data stream error.
Information de débogage supplémentaire :
gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR : pipeline refuse to go into setup phase
Définition du pipeline à NULL...
Libération du pipeline (FREE)...

(I translated the main info, rest is in french).

I do have a pipeline that convert the file:

gst-launch avimux name=mux ! filesink location=/tmp/test2.avi  filesrc location=257.ts ! mpegtsdemux name=demux demux.video_0078 !  queue  ! mpeg2dec ! ffmpegcolorspace ! mpeg2enc ! queue ! mux.video_00  demux.audio_0082 ! queue ! mad ! audioconvert ! lame ! queue ! mux.audio_00

This one involves decoding and recoding video, which is useless since the formats are the same. I would like to just extract streams and store them into a different container.

Is it possible to make such pipeline ? Using avi is not a requirement. I just want to convert the transport stream into a format that supports seeking well.

Thanks for your help,

Julien


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel