multifilesink - how to interpret values sent via bus message?

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

multifilesink - how to interpret values sent via bus message?

Ralph Heinkel
Hi,

I'm (successfully) splitting a video from a DVD into separate files
using 'multifilesink', by splitting at every new key frame.
The command I used is shown below.

What I need to do is to keep track of the produced files, and in
particular I'm interested to get timestamp (when the file was
produced) and duration of the individual files.
However when looking at the messages produced by multifilesink all
junks seem to have identical durations, offsets etc (of absurd high
values). Also the timestamp is just increasing in discrete steps. And
this is even though all junks have slightly different sizes (around
10secs +/- 1).

Can anybody help? (I'm a bloody beginner with gstreamer, so please
help me with 'basic' explanations ;-)

Thanks a lot,

Ralph

PS: I'm using gstreamer 0.10.35 on legacy opensuse 12.1 on a 32bit
machine.

-------------------
My call:

gst-launch -m dvdreadsrc title=2 ! multifilesink next-file=2
            location='m-%05d.ts' post-messages=true


The log:
[...]
Got message #24 from element "multifilesink0" (element):
GstMultiFileSink, filename=(string)m-00000.ts, index=(int)0,
timestamp=(guint64)10000000000, stream-time=(guint64)10000000000,
running-time=(guint64)10000000000,
duration=(guint64)18446744073709551615,
offset=(guint64)18446744073709551615,
offset-end=(guint64)18446744073709551615;
Got message #25 from element "multifilesink0" (element):
GstMultiFileSink, filename=(string)m-00001.ts, index=(int)1,
timestamp=(guint64)20000000000, stream-time=(guint64)20000000000,
running-time=(guint64)20000000000,
duration=(guint64)18446744073709551615,
offset=(guint64)18446744073709551615,
offset-end=(guint64)18446744073709551615;
Got message #26 from element "multifilesink0" (element):
GstMultiFileSink, filename=(string)m-00002.ts, index=(int)2,
timestamp=(guint64)30000000000, stream-time=(guint64)30000000000,
running-time=(guint64)30000000000,
duration=(guint64)18446744073709551615,
offset=(guint64)18446744073709551615,
offset-end=(guint64)18446744073709551615;

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: multifilesink - how to interpret values sent via bus message?

Nezer Zaidenberg
Hi Ralph,

I think what you need is non-linear editing. There is a project called gnonlin which is a part of gstreamer and does just that. It can cut a movie into multiple parts in any manner you like.
If you are only using it for one dvd you could also check out VLMC (VideoLan Movie Creator) which has a nice gui for non-linear editing.
After you do this, you get multiple movies (as the parts of the original), which you can query (using gstreamer for instance) for duration.

If this still doesn't help, and you want to pursue the original solution, could you post your pipeline for reference?

Best regards,
   Nezer

On Tue, Dec 6, 2011 at 9:00 PM, Ralph Heinkel <[hidden email]> wrote:
Hi,

I'm (successfully) splitting a video from a DVD into separate files using 'multifilesink', by splitting at every new key frame.
The command I used is shown below.

What I need to do is to keep track of the produced files, and in particular I'm interested to get timestamp (when the file was produced) and duration of the individual files.
However when looking at the messages produced by multifilesink all junks seem to have identical durations, offsets etc (of absurd high values). Also the timestamp is just increasing in discrete steps. And this is even though all junks have slightly different sizes (around 10secs +/- 1).

Can anybody help? (I'm a bloody beginner with gstreamer, so please help me with 'basic' explanations ;-)

Thanks a lot,

Ralph

PS: I'm using gstreamer 0.10.35 on legacy opensuse 12.1 on a 32bit machine.

-------------------
My call:

gst-launch -m dvdreadsrc title=2 ! multifilesink next-file=2
          location='m-%05d.ts' post-messages=true


The log:
[...]
Got message #24 from element "multifilesink0" (element): GstMultiFileSink, filename=(string)m-00000.ts, index=(int)0, timestamp=(guint64)10000000000, stream-time=(guint64)10000000000, running-time=(guint64)10000000000, duration=(guint64)18446744073709551615, offset=(guint64)18446744073709551615, offset-end=(guint64)18446744073709551615;
Got message #25 from element "multifilesink0" (element): GstMultiFileSink, filename=(string)m-00001.ts, index=(int)1, timestamp=(guint64)20000000000, stream-time=(guint64)20000000000, running-time=(guint64)20000000000, duration=(guint64)18446744073709551615, offset=(guint64)18446744073709551615, offset-end=(guint64)18446744073709551615;
Got message #26 from element "multifilesink0" (element): GstMultiFileSink, filename=(string)m-00002.ts, index=(int)2, timestamp=(guint64)30000000000, stream-time=(guint64)30000000000, running-time=(guint64)30000000000, duration=(guint64)18446744073709551615, offset=(guint64)18446744073709551615, offset-end=(guint64)18446744073709551615;

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: multifilesink - how to interpret values sent via bus message?

Ralph Heinkel
Hi Nezer,

thanks for your hint with gnonlin. Unfortunately its documentation is
so sparse that I have no indication on how to use it. So some sample
code would be really helpful.

What I actually want to do is to read a video/audio stream (i.e. a TV
channel) from a DVB card and split that data stream into small junks
of MPEG-TS files (each about 4 secs long). For each junk I need to
know the timestamp (+/- some msecs) when that data was received from
the DVB card, and how long that junk plays. All of this should work in
batch mode (using python gst), using a GUI is not an option.

Any indication on how the gnonlin project could do this would be
appreciated a lot.

Thanks and ciao ciao

Ralph

On 12/07/2011 03:38 PM, Nezer Zaidenberg wrote:

> Hi Ralph,
>
> I think what you need is non-linear editing. There is a project called
> gnonlin which is a part of gstreamer and does just that. It can cut a
> movie into multiple parts in any manner you like.
> If you are only using it for one dvd you could also check out VLMC
> (VideoLan Movie Creator) which has a nice gui for non-linear editing.
> After you do this, you get multiple movies (as the parts of the
> original), which you can query (using gstreamer for instance) for
> duration.
>
> If this still doesn't help, and you want to pursue the original
> solution, could you post your pipeline for reference?
>
> Best regards,
>     Nezer
>
> On Tue, Dec 6, 2011 at 9:00 PM, Ralph Heinkel <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I'm (successfully) splitting a video from a DVD into separate
>     files using 'multifilesink', by splitting at every new key frame.
>     The command I used is shown below.
>
>     What I need to do is to keep track of the produced files, and in
>     particular I'm interested to get timestamp (when the file was
>     produced) and duration of the individual files.
>     However when looking at the messages produced by multifilesink all
>     junks seem to have identical durations, offsets etc (of absurd
>     high values). Also the timestamp is just increasing in discrete
>     steps. And this is even though all junks have slightly different
>     sizes (around 10secs +/- 1).
>
>     Can anybody help? (I'm a bloody beginner with gstreamer, so please
>     help me with 'basic' explanations ;-)
>
>     Thanks a lot,
>
>     Ralph
>
>     PS: I'm using gstreamer 0.10.35 on legacy opensuse 12.1 on a 32bit
>     machine.
>
>     -------------------
>     My call:
>
>     gst-launch -m dvdreadsrc title=2 ! multifilesink next-file=2
>                location='m-%05d.ts' post-messages=true
>
>
>     The log:
>     [...]
>     Got message #24 from element "multifilesink0" (element):
>     GstMultiFileSink, filename=(string)m-00000.ts, index=(int)0,
>     timestamp=(guint64)__10000000000,
>     stream-time=(guint64)__10000000000,
>     running-time=(guint64)__10000000000,
>     duration=(guint64)__18446744073709551615,
>     offset=(guint64)__18446744073709551615,
>     offset-end=(guint64)__18446744073709551615;
>     Got message #25 from element "multifilesink0" (element):
>     GstMultiFileSink, filename=(string)m-00001.ts, index=(int)1,
>     timestamp=(guint64)__20000000000,
>     stream-time=(guint64)__20000000000,
>     running-time=(guint64)__20000000000,
>     duration=(guint64)__18446744073709551615,
>     offset=(guint64)__18446744073709551615,
>     offset-end=(guint64)__18446744073709551615;
>     Got message #26 from element "multifilesink0" (element):
>     GstMultiFileSink, filename=(string)m-00002.ts, index=(int)2,
>     timestamp=(guint64)__30000000000,
>     stream-time=(guint64)__30000000000,
>     running-time=(guint64)__30000000000,
>     duration=(guint64)__18446744073709551615,
>     offset=(guint64)__18446744073709551615,
>     offset-end=(guint64)__18446744073709551615;
>
>     _________________________________________________
>     gstreamer-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.freedesktop.org/__mailman/listinfo/gstreamer-__devel
>     <http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel