Duration and Seek in MPEG TS File

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

Duration and Seek in MPEG TS File

Levi Pope
Has anyone been able to seek or get the duration of a TS file with Gstreamer.
I have tried using flutsdemux and it does not seem to work.

Thanks
Levi

-------------------------------------------------------------------------
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: Duration and Seek in MPEG TS File

Zaheer Merali
On Tue, Sep 2, 2008 at 9:51 PM, Levi Pope <[hidden email]> wrote:
> Has anyone been able to seek or get the duration of a TS file with
> Gstreamer.
> I have tried using flutsdemux and it does not seem to work.
>
> Thanks
> Levi

This is a missing feature.

Zaheer

-------------------------------------------------------------------------
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: Duration and Seek in MPEG TS File

Levi.Pope
I would like to implement this feature but I am not sure were to start.
Is there any information on how Gstreamer performs seeks and duration
queries?

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Zaheer Merali
Sent: Tuesday, September 02, 2008 4:45 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Duration and Seek in MPEG TS File

On Tue, Sep 2, 2008 at 9:51 PM, Levi Pope <[hidden email]> wrote:
> Has anyone been able to seek or get the duration of a TS file with
> Gstreamer.
> I have tried using flutsdemux and it does not seem to work.
>
> Thanks
> Levi

This is a missing feature.

Zaheer

------------------------------------------------------------------------
-
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
Reply | Threaded
Open this post in threaded view
|

Re: Duration and Seek in MPEG TS File

Levi Pope
In reply to this post by Zaheer Merali
I would like to implement this feature but I am not sure were to start.
Is there any information on how Gstreamer performs seeks and duration queries?

On Tue, Sep 2, 2008 at 4:44 PM, Zaheer Merali <[hidden email]> wrote:
On Tue, Sep 2, 2008 at 9:51 PM, Levi Pope <[hidden email]> wrote:
> Has anyone been able to seek or get the duration of a TS file with
> Gstreamer.
> I have tried using flutsdemux and it does not seem to work.
>
> Thanks
> Levi

This is a missing feature.

Zaheer

-------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Duration and Seek in MPEG TS File

Edward Hervey
Administrator
In reply to this post by Zaheer Merali
Hi all,

  I opened a bug on bugzilla regarding that. Comments and patches
welcome.

  http://bugzilla.gnome.org/show_bug.cgi?id=550634

    Edward

On Tue, 2008-09-02 at 22:44 +0100, Zaheer Merali wrote:

> On Tue, Sep 2, 2008 at 9:51 PM, Levi Pope <[hidden email]> wrote:
> > Has anyone been able to seek or get the duration of a TS file with
> > Gstreamer.
> > I have tried using flutsdemux and it does not seem to work.
> >
> > Thanks
> > Levi
>
> This is a missing feature.
>
> Zaheer
>
> -------------------------------------------------------------------------
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Duration and Seek in MPEG TS File

Julien Pauty
Hello,

I just want to mention that I'm able to seek and get the duration of an mpeg TS.

I'm using a simple pipeline containing: filesrc ! flutsdemux ! queue ! videodec ! videosink ! queue ! audiodec! audiosink . To do the seek I'm calling seek_simple on the filesrc, with a byte position. Maybe this is not the best approach but it works. To convert bytes duration to time i'm calling query_convert on the pipeline itself.

To get the duration of the TS I first call querry_duraiton on the filesrc (bytes format) and then I request a convertion to time format to the pipeline.

That's the only way I found to do it. There may be an easier way, but in the mean time this is useable.

Best,

Julien

2008/9/3 Edward Hervey <[hidden email]>
Hi all,

 I opened a bug on bugzilla regarding that. Comments and patches
welcome.

 http://bugzilla.gnome.org/show_bug.cgi?id=550634

   Edward

On Tue, 2008-09-02 at 22:44 +0100, Zaheer Merali wrote:
> On Tue, Sep 2, 2008 at 9:51 PM, Levi Pope <[hidden email]> wrote:
> > Has anyone been able to seek or get the duration of a TS file with
> > Gstreamer.
> > I have tried using flutsdemux and it does not seem to work.
> >
> > Thanks
> > Levi
>
> This is a missing feature.
>
> Zaheer
>
> -------------------------------------------------------------------------
> 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


-------------------------------------------------------------------------
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
|

Query: ffmux_asf

Irfan Shaikh-2
 

Hi all,

I am unable to mux the raw elementry stream (Audio/Video) in an ASF container using ffmux_asf provided by ffmpeg.

Can i know how do i mux the audio/video elementry streams using ffmux_asf.

 

I hav tried using ffmux_asf element provided by ffmpeg.I have created following pipelines to investigate

ffmux_asf.

 

1) gst-launch filesrc location=/root/Desktop/teststreams/mpeg4/mpeg4_mp3.ASF ! ffdemux_asf ! ffmux_asf ! filesink location=/root/Desktop/test2.asf

ffmpeg (FFmpeg M$ MPEG-4 v2)

mp3lib (mp3lib MPEG layer-2, layer-3)

Result : test2.asf contains only audio.

 

2) gst-launch filesrc location=/root/Desktop/audioVideo/mjpegi.AVI ! avidemux ! ffmux_asf ! filesink location=/root/Desktop/test.asf

ffmpeg (FFmpeg MJPEG decoder)

mp3lib (mp3lib MPEG layer-2, layer-3)

Result : test.asf contains only audio.

 

3) H264 elementry stream

gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat ! ffmux_asf ! filesink location=/root/Desktop/ajit1.asf

ffmpeg H.264

Result : No output

 

4)MJPEG elementry stream

gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat ! ffmux_asf ! filesink location=/root/Desktop/ajit1.asf

Result : No output

 

5)gst-launch filesrc location=/root/Desktop/teststreams/g.711/alaw_8k_64kbps_mono.wav ! ffmux_asf ! filesink location=/root/Desktop/test6.asf

alaw (aLaw)

Result : No output

6)gst-launch filesrc location=/root/Desktop/teststreams/h.264/H264_Ray_QVGA__364kbps_HEAAC.asf ! asfdemux ! ffmux_asf ! filesink location=/root/Desktop/h2641.asf

ffmpeg (FFmpeg H.264)

Result : No output

7)gst-launch filesrc location=/root/Desktop/teststreams/h.264/h264_mp4.MP4 ! ffdemux_mov_mp4_m4a_3gp_3g2_mj2 ! ffmux_asf ! filesink location=/root/Desktop/abc.asf

ffmpeg (FFmpeg H.264)

Result : No output


 
Regards,
Irfan 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


-------------------------------------------------------------------------
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: Query: ffmux_asf

ved kpl
Hi,

"ffdemux_asf ! ffmux_asf" is not correct, although your pipeline will work.
You need to specify the link. Your output file has only audio data,
because the demux  gets the audio data first and continues linking the
audio pads of muxer & demuxer.

Try This.
gst-launch filesrc
location=/root/Desktop/teststreams/mpeg4/mpeg4_mp3.ASF ! ffdemux_asf
name=demux demux.audio_00 ! queue ! mux.audio_0 demux.video_00 ! queue
! mux.video_0 ffmux_asf name=mux ! filesink
location=/root/Desktop/test2.asf

"gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
ffmux_asf" is wrong. You are feeding  some unknown(no caps) data (that
too not even an elementary stream) to the muxer.

Ved

On Thu, Sep 18, 2008 at 3:38 PM, irfanshaikh
<[hidden email]> wrote:

>
>
> Hi all,
>
> I am unable to mux the raw elementry stream (Audio/Video) in an ASF
> container using ffmux_asf provided by ffmpeg.
>
> Can i know how do i mux the audio/video elementry streams using ffmux_asf.
>
>
>
> I hav tried using ffmux_asf element provided by ffmpeg.
>
> I have created following pipelines to investigate
>
> ffmux_asf.
>
>
>
> 1)
>
> gst-launch filesrc location=/root/Desktop/teststreams/mpeg4/mpeg4_mp3.ASF !
> ffdemux_asf ! ffmux_asf ! filesink location=/root/Desktop/test2.asf
>
> ffmpeg (FFmpeg M$ MPEG-4 v2)
>
> mp3lib (mp3lib MPEG layer-2, layer-3)
>
> Result : test2.asf contains only audio
>
> .
>
>
>
> 2)
>
> gst-launch filesrc location=/root/Desktop/audioVideo/mjpegi.AVI ! avidemux !
> ffmux_asf ! filesink location=/root/Desktop/test.asf
>
> ffmpeg (FFmpeg MJPEG decoder)
>
> mp3lib (mp3lib MPEG layer-2, layer-3)
>
> Result : test.asf contains only audio.
>
>
>
> 3) H264 elementry stream
>
> gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
> ffmux_asf ! filesink location=/root/Desktop/ajit1.asf
>
> ffmpeg H.264
>
> Result : No output
>
>
>
> 4)MJPEG elementry stream
>
> gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
> ffmux_asf ! filesink location=/root/Desktop/ajit1.asf
>
> Result : No output
>
>
>
> 5)
>
> gst-launch filesrc
> location=/root/Desktop/teststreams/g.711/alaw_8k_64kbps_mono.wav ! ffmux_asf
> ! filesink location=/root/Desktop/test6.asf
>
> alaw (aLaw)
>
> Result : No output
>
> 6)
>
> gst-launch filesrc
> location=/root/Desktop/teststreams/h.264/H264_Ray_QVGA__364kbps_HEAAC.asf !
> asfdemux ! ffmux_asf ! filesink location=/root/Desktop/h2641.asf
>
> ffmpeg (FFmpeg H.264)
>
> Result : No output
>
> 7)gst-launch filesrc location=/root/Desktop/teststreams/h.264/h264_mp4.MP4 !
> ffdemux_mov_mp4_m4a_3gp_3g2_mj2 ! ffmux_asf ! filesink
> location=/root/Desktop/abc.asf
>
> ffmpeg (FFmpeg H.264)
>
> Result : No output
>
>
> Regards,
> Irfan
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments contained in it.
>
> -------------------------------------------------------------------------
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Query: ffmux_asf

ved kpl
Hi,

Please "REPLY TO ALL".

Can you upload "mpeg4_mp3.ASF"?
Secondly, if you are reading the elementary stream from file directly
(filesrc ! mux),
I guess it wont work. The filesrc wont attach any caps and no
timestamp to the buffer and of course no parsed data.

Ved

On Thu, Sep 18, 2008 at 7:09 PM, irfanshaikh
<[hidden email]> wrote:

> Hi ved,
>
>                Thanks a lot for ur helpful reply.......It was like you giving me hand
> when i m sinking.
> But brother i tried to use the same pipeline as you suggested, the pipeline
> has stucked while prerolling.
>
> [root@localhost ffmpeg]# gst-launch filesrc
> location=/root/Desktop/teststreams/mpeg4/mpeg4_mp3.ASF ! ffdemux_asf
> name=demux demux.audio_00 ! queue ! mux.audio_0 demux.video_00 ! queue !
> mux.video_0 ffmux_asf name=mux ! filesink location=/root/Desktop/test2.asf
>
> (gst-launch-0.10:4308): GStreamer-WARNING **: Failed to load plugin
> '/usr/local/lib/gstreamer-0.10/libgstrtppayloads.so':
> /usr/local/lib/gstreamer-0.10/libgstrtppayloads.so: undefined symbol:
> gst_rtp_g729_pay_plugin_init
> Filesrc Base Init
> Filesrc Class Init
> Filesrc Init
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
>
> And one more thing i hav tried muxing the elementry stream that also is not
> working, there is no output file at all.
>
> 1) H264 elementry stream
>
>  gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
> ffmux_asf ! filesink location=/root/Desktop/ajit1.asf
>
>  ffmpeg H.264
>  Result : No output
>
>
>
>  2)MJPEG elementry stream
>
>  gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
> ffmux_asf ! filesink location=/root/Desktop/ajit1.asf
>
>  Result : No output
>
>
>        I would be thankful to you a lot if i am able to find some way to mux the
> audio/video elementry stream. Or else if not possible suggest me where i can
> luk to modify the code so as i get the proper muxed data.
>
>        Thanks in advance
>
> Regards,
> Irfan.
>
>
>
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.
>

-------------------------------------------------------------------------
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: Query: ffmux_asf

ved kpl
Try asfdemux too.

On Thu, Sep 18, 2008 at 7:40 PM, ved kpl <[hidden email]> wrote:

> Hi,
>
> Please "REPLY TO ALL".
>
> Can you upload "mpeg4_mp3.ASF"?
> Secondly, if you are reading the elementary stream from file directly
> (filesrc ! mux),
> I guess it wont work. The filesrc wont attach any caps and no
> timestamp to the buffer and of course no parsed data.
>
> Ved
>
> On Thu, Sep 18, 2008 at 7:09 PM, irfanshaikh
> <[hidden email]> wrote:
>> Hi ved,
>>
>>                Thanks a lot for ur helpful reply.......It was like you giving me hand
>> when i m sinking.
>> But brother i tried to use the same pipeline as you suggested, the pipeline
>> has stucked while prerolling.
>>
>> [root@localhost ffmpeg]# gst-launch filesrc
>> location=/root/Desktop/teststreams/mpeg4/mpeg4_mp3.ASF ! ffdemux_asf
>> name=demux demux.audio_00 ! queue ! mux.audio_0 demux.video_00 ! queue !
>> mux.video_0 ffmux_asf name=mux ! filesink location=/root/Desktop/test2.asf
>>
>> (gst-launch-0.10:4308): GStreamer-WARNING **: Failed to load plugin
>> '/usr/local/lib/gstreamer-0.10/libgstrtppayloads.so':
>> /usr/local/lib/gstreamer-0.10/libgstrtppayloads.so: undefined symbol:
>> gst_rtp_g729_pay_plugin_init
>> Filesrc Base Init
>> Filesrc Class Init
>> Filesrc Init
>> Setting pipeline to PAUSED ...
>> Pipeline is PREROLLING ...
>>
>> And one more thing i hav tried muxing the elementry stream that also is not
>> working, there is no output file at all.
>>
>> 1) H264 elementry stream
>>
>>  gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
>> ffmux_asf ! filesink location=/root/Desktop/ajit1.asf
>>
>>  ffmpeg H.264
>>  Result : No output
>>
>>
>>
>>  2)MJPEG elementry stream
>>
>>  gst-launch filesrc location=/root/Desktop/audioVideo/CodecH264.dat !
>> ffmux_asf ! filesink location=/root/Desktop/ajit1.asf
>>
>>  Result : No output
>>
>>
>>        I would be thankful to you a lot if i am able to find some way to mux the
>> audio/video elementry stream. Or else if not possible suggest me where i can
>> luk to modify the code so as i get the proper muxed data.
>>
>>        Thanks in advance
>>
>> Regards,
>> Irfan.
>>
>>
>>
>>
>> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.
>>
>

-------------------------------------------------------------------------
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