record H264 stream use multifilesink

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

record H264 stream use multifilesink

Michelle Guo
Hi eveyone:
The pipeline I used like this:
gst-launch-1.0 rtpbin name=rtpbin latency=100 \
 udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay \
! tee name=teevideo teevideo. ! queue ! vpudec ! overlaysink \
teevideo. ! queue !
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1" ! matroskamux
name=mux mux. ! multifilesink location="/home/root/save%d.mkv" next-file=4
post-messages=TRUE max-files=300 max-file-size=10485760

I receive H264 stream from udpsrc, then play video and record H264 data into
several files.

The problem is described like this:
The pipeline works well, but, the files saved in the disk is not playable.
1. The first one save0.mkv can be played by VLC, but can not query duration,
so VLC can not fast forward and rewind.
2. The other files excepet the first one(save1.mkv, save2.mkv...) can not
play by VLC;

Can anybody give me some help?




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

Re: record H264 stream use multifilesink

Gst-Geek
Hi  Michelle Guo,

MKV file splitting not possible with multifilesink. Use splitmuxsink to
split the files.

Below should work for u..

gst-launch-1.0 rtpbin name=rtpbin latency=100 \
 udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay \
! tee name=teevideo teevideo. ! queue ! vpudec ! overlaysink \
teevideo. ! queue !
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1"  !
splitmuxsink location="/home/root/save%d.mkv" muxer=matroskamux
max-files=300 max-size-bytes=10485760



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

Re: record H264 stream use multifilesink

Gst-Geek
In reply to this post by Michelle Guo
Hi  Michelle Guo,

MKV file splitting not possible with multifilesink. Use splitmuxsink to
split the files.

Below should work for u..

gst-launch-1.0 rtpbin name=rtpbin latency=100 \
 udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay \
! tee name=teevideo teevideo. ! queue ! vpudec ! overlaysink \
teevideo. ! queue !
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1"  !
splitmuxsink location="/home/root/save%d.mkv" muxer=matroskamux
max-files=300 max-size-bytes=10485760



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

Re: record H264 stream use multifilesink

Nicolas Dufresne-5
In reply to this post by Michelle Guo
Le mardi 10 octobre 2017 à 22:20 -0700, Michelle Guo a écrit :

> The pipeline I used like this:
> gst-launch-1.0 rtpbin name=rtpbin latency=100 \
>  udpsrc
> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
> port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay \
> ! tee name=teevideo teevideo. ! queue ! vpudec ! overlaysink \
> teevideo. ! queue !
> "video/x-h264,width=1024,height=768,framerate=(fraction)25/1" ! matroskamux
> name=mux mux. ! multifilesink location="/home/root/save%d.mkv" next-file=4
> post-messages=TRUE max-files=300 max-file-size=10485760
>
> I receive H264 stream from udpsrc, then play video and record H264 data into
> several files.
>
> The problem is described like this:
> The pipeline works well, but, the files saved in the disk is not playable.
> 1. The first one save0.mkv can be played by VLC, but can not query duration,
> so VLC can not fast forward and rewind.
> 2. The other files excepet the first one(save1.mkv, save2.mkv...) can not
> play by VLC;
>
> Can anybody give me some help?
May I suggest you to have a look into splitmuxsink instead. This is a
muxer friendly stream splitter, that will let you split with fixed
duration. Each output file will be a valid stream. At least MKV and MOV
have been tested. To play the result in a gapless fashion with
GStreamer, you can use splitmuxsrc.

regards,
Nicolas

p.s. What you have in hand, is a "streamable" mkv, whithout an index.
These MKV are only playable from start to end, normal speed on most
player. In GStreamer, we implement binary search for this case, but
it's not very efficient, neither it is very precise. That's for the
first file, all the other file are randomly split, hence being detected
as corrupted files, unplayable by any player really.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: record H264 stream use multifilesink

Michelle Guo
In reply to this post by Gst-Geek
Hi Vinod,

Thank you for you reply.

I use splitmuxsink, the files recorded are playable, but I encounted the new
problem.

In my pipeline, I use tee element to split the stream to two branches, one
is to play, the other is to record. If I use splitmuxsink in record branch,
both of these two branches can not work. However, if I remove play branch
and only have the record  branch, the files can be recorded successfully and
can be played by VLC.

So do you have any idea?
Thank you!

Michelle
 



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

Re: record H264 stream use multifilesink

Michelle Guo
In reply to this post by Nicolas Dufresne-5
Hi Nicolas,

Thank you for you reply.

I use splitmuxsink, the files recorded are playable, but I encounted the new
problem.

In my pipeline, I use tee element to split the stream to two branches, one
is to play, the other is to record. If I use splitmuxsink in record branch,
both of these two branches can not work. However, if I remove play branch
and only have the record  branch, the files can be recorded successfully and
can be played by VLC.

So do you have any idea?
Thank you!

regards,
Michelle



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

Re: record H264 stream use multifilesink

Nicolas Dufresne-5
In reply to this post by Michelle Guo
Le jeudi 12 octobre 2017 à 08:01 -0700, Michelle Guo a écrit :

> I use splitmuxsink, the files recorded are playable, but I encounted the new
> problem.
>
> In my pipeline, I use tee element to split the stream to two branches, one
> is to play, the other is to record. If I use splitmuxsink in record branch,
> both of these two branches can not work. However, if I remove play branch
> and only have the record  branch, the files can be recorded successfully and
> can be played by VLC.
>
> So do you have any idea?
Did you forget to add queues after the tee ?

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: record H264 stream use multifilesink

Michelle Guo
Hi Nicolas,

I use queue after tee.
My pipeline is like this:

gst-launch-1.0 rtpbin name=rtpbin \
 udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay ! tee
name=teevideo teevideo. ! queue ! vpudec ! overlaysink \
teevideo. ! queue !
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1" ! splitmuxsink
location="/../data/save%d.mkv" max-files=300 max-size-time=10000000000
muxer=matroskamux &

These two branches can not work well at the same time.

regards,
Michelle



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

Re: record H264 stream use multifilesink

Nicolas Dufresne-5
Le jeudi 12 octobre 2017 à 18:37 -0700, Michelle Guo a écrit :

> I use queue after tee.
> My pipeline is like this:
>
> gst-launch-1.0 rtpbin name=rtpbin \
>  udpsrc
> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
> port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay ! tee
> name=teevideo teevideo. ! queue ! vpudec ! overlaysink \
> teevideo. ! queue !
> "video/x-h264,width=1024,height=768,framerate=(fraction)25/1" ! splitmuxsink
> location="/../data/save%d.mkv" max-files=300 max-size-time=10000000000
> muxer=matroskamux &
>
> These two branches can not work well at the same time.

Maybe make the overlaysink "async=0", this way GStreamer won't wait for
something to reach the multifilesink because it renders to overlaysink.

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

AW: record H264 stream use multifilesink

Thornton, Keith
In reply to this post by Nicolas Dufresne-5
Hi, we solved this problem by creating a bin with a queue and a filesink and adding this bin to the splitmuxsink

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Nicolas Dufresne
Gesendet: Donnerstag, 12. Oktober 2017 20:24
An: Discussion of the development of and with GStreamer <[hidden email]>
Betreff: Re: record H264 stream use multifilesink

Le jeudi 12 octobre 2017 à 08:01 -0700, Michelle Guo a écrit :

> I use splitmuxsink, the files recorded are playable, but I encounted
> the new problem.
>
> In my pipeline, I use tee element to split the stream to two branches,
> one is to play, the other is to record. If I use splitmuxsink in
> record branch, both of these two branches can not work. However, if I
> remove play branch and only have the record  branch, the files can be
> recorded successfully and can be played by VLC.
>
> So do you have any idea?

Did you forget to add queues after the tee ?

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

Re: record H264 stream use multifilesink

Michelle Guo
In reply to this post by Nicolas Dufresne-5
Hi Nicolas;

Thank you for your advice and explaination.

I use "async=false" after overlaysink, the play branch and the record branch
can both work well. When I play the MKV files using VLC, mosaic appears on
the screen, so why the video can not be played successfully?

regards;
Michelle



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

Re: AW: record H264 stream use multifilesink

Michelle Guo
In reply to this post by Thornton, Keith
Hi Thornton,

Thank you for your reply.

My pipeline is shown below:
gst-launch-1.0 rtpbin name=rtpbin \
>  udpsrc
> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
> port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay ! tee
> name=teevideo teevideo. ! queue ! vpudec ! overlaysink async=false \
> teevideo. ! queue !
> "video/x-h264,width=1024,height=768,framerate=(fraction)25/1" !
> splitmuxsink
> location="/../data/save%d.mkv" max-files=300 max-size-time=10000000000
> muxer=matroskamux &

The play branch and record branch can both work well. However, when I play
MKV video using VLC, mosaic appears on the screen, so the video can not play
successfully.

Since I am a new learner on Gstreamer, could you explain you solution in
details?

Thank you

regards,
Michelle



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

Re: record H264 stream use multifilesink

Michelle Guo
In reply to this post by Nicolas Dufresne-5
Hi Nicolas

Thank you for your help before, I solved my problem successfully. In the
record branch, I use the default muxer instead of matroskamux, and save the
file as *.mp4 instead of *.mkv, then, these two branches can work both well
without mosaic.

The pipeline is like this:
    gst-launch-1.0 rtpbin name=rtpbin \
  udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay ! tee
 name=teevideo teevideo. ! queue ! vpudec ! overlaysink async=false \
 teevideo. ! queue !
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1" !
splitmuxsink location="/../data/save%d.mp4" max-files=300
max-size-time=10000000000 &

Recently, I find a new problem. The last mp4 file is unplayable, I think
maybe because the splitmuxsink is not be closed. If I use C programe to
explain this pipeline, I use
 "gst_object_unref(GST_OBJECT(m_pipeline));" to close the pipeline, and I
hope the splitmuxsink element can be closed by this way, however, the last
mp4 file is still unplayable.

I hope you can give me some advice to close splitmuxsink element and make
the last mp4 file in the playable state. Thank you so much!


regsrds;
Michelle



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

AW: record H264 stream use multifilesink

Thornton, Keith
Hi, you need to send an EOS event down the pipeline and wait till it is received by the sink. The sink then posts a message on the bus. The mov block is written to the end of the file when this EOS is received by the sink.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Michelle Guo
Gesendet: Montag, 6. November 2017 11:20
An: [hidden email]
Betreff: Re: record H264 stream use multifilesink

Hi Nicolas

Thank you for your help before, I solved my problem successfully. In the record branch, I use the default muxer instead of matroskamux, and save the file as *.mp4 instead of *.mkv, then, these two branches can work both well without mosaic.

The pipeline is like this:
    gst-launch-1.0 rtpbin name=rtpbin \
  udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay ! tee  name=teevideo teevideo. ! queue ! vpudec ! overlaysink async=false \  teevideo. ! queue !
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1" !
splitmuxsink location="/../data/save%d.mp4" max-files=300
max-size-time=10000000000 &

Recently, I find a new problem. The last mp4 file is unplayable, I think maybe because the splitmuxsink is not be closed. If I use C programe to explain this pipeline, I use  "gst_object_unref(GST_OBJECT(m_pipeline));" to close the pipeline, and I hope the splitmuxsink element can be closed by this way, however, the last
mp4 file is still unplayable.

I hope you can give me some advice to close splitmuxsink element and make the last mp4 file in the playable state. Thank you so much!


regsrds;
Michelle



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

Re: AW: record H264 stream use multifilesink

Michelle Guo
Hi Thornton,

Thank you for your reply.
I don't know how to send EOS event, is the EOS event sent by the pipeline,
or by the element ?
When the splitmuxsink receive EOS event, how to write mov block to the end
of the file ?
Whether I need probe in my pipeline?
Could you give me some example?

regsrds;
Michelle





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

AW: AW: record H264 stream use multifilesink

Thornton, Keith
Hi,
I'm not sure it will help you but here is an example. There is some cleaning up to do after the EOS has been received which isn't included.
I call the disconnect function with the first element in the branch which I wish to disconnect (In my case the queue after a tee), The last element in the branch (in my case usually the filesink embedded in the splitmuxsink)and the tee pad to which the branch of the pipeline is connected (might be e.g. my recording branch)



    typedef struct
    {
        GstElement* branchFirstElement;
        GstElement* branchLastElement;
        BaseConnector* pConnector;
        GstPad* pTeePad;
        gboolean removing;
                gulong probeId;
    }GstBranchDescriptor;


    static GstPadProbeReturn event_probe_cb(GstPad* lastPadInPipeline, GstPadProbeInfo* info, gpointer userData)
    {
        GstBranchDescriptor* branchDescriptor = static_cast<GstBranchDescriptor*>(userData);
        BaseConnector* pConnector = branchDescriptor->pConnector;

        if (GST_EVENT_TYPE(GST_PAD_PROBE_INFO_DATA(info)) != GST_EVENT_EOS)
        {
            return GST_PAD_PROBE_PASS;
        }

        MULTIMEDIA_INFO << _T(" eos received by ") << lastPadInPipeline->object.parent->name;
        pConnector->setEosReceived();
        gst_pad_remove_probe(lastPadInPipeline, GST_PAD_PROBE_INFO_ID(info));

                m_unlinkMutex.lock();
                m_unlinkDone = true;
                m_unlinkCondition.wakeAll();
                pConnector->m_unlinkMutex.unlock();

                return GST_PAD_PROBE_PASS;
    }

    static GstPadProbeReturn base_connector_cb_blocked(GstPad* teeSrcPad, GstPadProbeInfo* info, gpointer userData)
    {
        Q_UNUSED(info);
        Q_UNUSED(teeSrcPad);
                GstBranchDescriptor* branchDescriptor = static_cast<GstBranchDescriptor*>(userData);
        GstPad* firstElementSinkPad = gst_element_get_static_pad(branchDescriptor->branchFirstElement, "sink");
                if (firstElementSinkPad == nullptr) {
                        ERROR << _T("gst_element_get_static_pad(branchDescriptor->branchFirstElement, sink); failed");
                        throw GstreamerException(GstreamerException::EVENT_FLOW_ERROR);
                }

                GstPad* lastPadInPipeline = nullptr;
        lastPadInPipeline = gst_element_get_static_pad(branchDescriptor->branchLastElement, "sink");
                if (lastPadInPipeline == nullptr) {
                        ERROR << _T("gst_element_get_static_pad(branchDescriptor->branchLastElement, sink); failed");
                        gst_object_unref(firstElementSinkPad);
                        throw GstreamerException(GstreamerException::EVENT_FLOW_ERROR);
                }

        DEBUG << _T("setting probe in ") << lastPadInPipeline->object.name << _T(" of ") << lastPadInPipeline->object.parent->name;
                gst_pad_unlink(branchDescriptor->pTeePad, firstElementSinkPad);
                gst_pad_remove_probe(branchDescriptor->pTeePad, branchDescriptor->probeId);

                gst_pad_add_probe(lastPadInPipeline, GstPadProbeType(GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM), event_probe_cb, userData, NULL);
                if (!gst_pad_send_event(firstElementSinkPad, gst_event_new_eos()))
        {
                        gst_object_unref(firstElementSinkPad);
                        MULTIMEDIA_ERROR << _T("failed to send eos from ") << firstElementSinkPad->object.name << _T(" of ") << firstElementSinkPad->object.parent->name;
                        throw GstreamerException(GstreamerException::EVENT_FLOW_ERROR);
                }
        INFO << _T("sent EOS from ") << firstElementSinkPad->object.name << _T(" of ") << firstElementSinkPad->object.parent->name;

        gst_object_unref(firstElementSinkPad);
        gst_object_unref(lastPadInPipeline);
        return GST_PAD_PROBE_OK;
    }


    bool BaseConnector::disconnect(GstElement* firstElement, GstElement* lastElement, GstPad* connectorPad)
    {
        if (connectorPad == nullptr || firstElement == nullptr || lastElement == nullptr){
                        ERROR << _T("an error occured while disconnecting the pipeline");
            throw GstreamerException(GstreamerException::EVENT_FLOW_ERROR);
        }

                if (m_activeConnectionCounter == 0) {
                        WARN << _T("received disconnect request for pipeline with no active connections");
                        return true;
                }
                INFO << m_namePrefix.data() << _T(" disconnecting branch nr. ") << m_activeConnectionCounter;
                INFO << firstElement->object.name << _T(",  ") << lastElement->object.name << _T(",  ") << connectorPad->object.name << _T(",  ") << connectorPad->object.parent->name;
                disconnectLock();
                if (m_activeConnectionCounter == 1)  // This is the last connection send EOS along the whole pipeline
                {
                        sendEOSDownPipeline();
                }
                else
                {
                        GstBranchDescriptor* branchDescriptor = new GstBranchDescriptor;
                        branchDescriptor->branchFirstElement = firstElement;
                        branchDescriptor->branchLastElement = lastElement;
                        branchDescriptor->pConnector = this;
                        branchDescriptor->pTeePad = connectorPad;
                        branchDescriptor->removing = false;

                        m_eosReceived = false;
                        m_unlinkDone = false;
                        int unlinkDoneCount = INITIAL_UNLINK_DONE_COUNT;
                        branchDescriptor->probeId = gst_pad_add_probe(connectorPad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, static_cast<GstPadProbeCallback>(base_connector_cb_blocked), static_cast<gpointer>(branchDescriptor), NULL);


                        // wait for cb_pad_probe() call
                        {
                                m_unlinkMutex.lock();
                                while (!m_unlinkDone && unlinkDoneCount) {
                                        m_unlinkCondition.wait(&m_unlinkMutex, 1000);
                                        if (m_unlinkDone) {
                                                break;
                                        }
                                        else {
                                                unlinkDoneCount--;
                                                if (unlinkDoneCount == 0) {
                                                        ERROR << _T(" Failed to send EOS down pipeline");
                                                        m_unlinkMutex.unlock();
                                                        throw GstreamerException(GstreamerException::EVENT_FLOW_ERROR);
                                                }
                                                if (logLimiter.doLog()) {
                                                        WARN << _T("m_unlinkDone == false");
                                                }
                                        }
                                }
                                m_unlinkDone = false;
                                m_unlinkMutex.unlock();
                                INFO << "unlink done";
                        }

                        if (!m_eosReceived)
                        {
                                ERROR << _T(" Failed to dismantle pipeline containing ") << lastElement->object.name;
                                throw GstreamerException(GstreamerException::EVENT_FLOW_ERROR);
                        }





-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Michelle Guo
Gesendet: Montag, 20. November 2017 13:01
An: [hidden email]
Betreff: Re: AW: record H264 stream use multifilesink

Hi Thornton,

Thank you for your reply.
I don't know how to send EOS event, is the EOS event sent by the pipeline, or by the element ?
When the splitmuxsink receive EOS event, how to write mov block to the end of the file ?
Whether I need probe in my pipeline?
Could you give me some example?

regsrds;
Michelle





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

Re: AW: AW: record H264 stream use multifilesink

Michelle Guo
Hi Thornton;
       Thank you for your reply.

       I use the following methord to get the filesink of splitmuxsink:
   GstElement*lastelement = gst_bin_get_by_name((GstBin*)splitmuxsink,
"sink");

       However, It failed, so can you tell me why?
       Thank you.



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

AW: AW: AW: record H264 stream use multifilesink

Thornton, Keith
Hi,
you created your splitmuxsink. If you added the sink by setting the splitmuxsink sink property it might have a different name. I suggest you generate a dot file and look what name your filesink has. In general, the usage is correct.



-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Michelle Guo
Gesendet: Freitag, 22. Dezember 2017 07:27
An: [hidden email]
Betreff: Re: AW: AW: record H264 stream use multifilesink

Hi Thornton;
       Thank you for your reply.

       I use the following methord to get the filesink of splitmuxsink:
   GstElement*lastelement = gst_bin_get_by_name((GstBin*)splitmuxsink,
"sink");

       However, It failed, so can you tell me why?
       Thank you.



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

Re: AW: AW: AW: record H264 stream use multifilesink

Michelle Guo
Hi Thornton;
I use the following way to create splitmuxsink:
GstElement *splitmuxsink;
splitmuxsink= gst_element_factory_create (splitmuxsink, "splitmuxsink");

 I use the default sink, and in my program, I have never set the
splitmuxsink sink property, so I think in the following function,  the
return value lastelement will be "filesink", and I can get the sinkpad of
lastelement.
    GstElement*lastelement = gst_bin_get_by_name((GstBin*)splitmuxsink,
"sink");
However, the lastelement is NULL, so I can not get the sinkpad of this
element. I was confused by this result.




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

AW: AW: AW: AW: record H264 stream use multifilesink

Thornton, Keith
Hi,
When I create a splitmuxsink without setting the sink property, the sink cannot be got by name. If you want to access the filesink by name you have to create a filesink with a name and set it in the splitmuxsink using the sink property.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Michelle Guo
Gesendet: Samstag, 23. Dezember 2017 15:53
An: [hidden email]
Betreff: Re: AW: AW: AW: record H264 stream use multifilesink

Hi Thornton;
I use the following way to create splitmuxsink:
GstElement *splitmuxsink;
splitmuxsink= gst_element_factory_create (splitmuxsink, "splitmuxsink");

 I use the default sink, and in my program, I have never set the splitmuxsink sink property, so I think in the following function,  the return value lastelement will be "filesink", and I can get the sinkpad of lastelement.
    GstElement*lastelement = gst_bin_get_by_name((GstBin*)splitmuxsink,
"sink");
However, the lastelement is NULL, so I can not get the sinkpad of this element. I was confused by this result.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel