is eos on shutdown needed when stopping a pipeline

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

is eos on shutdown needed when stopping a pipeline

filnet
Hi,

gst-launch has an eos on shutdown option to make sure that, amongst other cases, video captured to file are properly finalized.

My question is whether this eos is also needed when programatically stopping a pipeline ?
Will a stop do the eos or is it the responsibility of the application to send that eos in any case ?

Philippe.


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

AW: is eos on shutdown needed when stopping a pipeline

Thornton, Keith

Hi,

Eos is necessary for instance when you are writing to an mp4 container. Without the eos, the mov block will not be written (in the normal case) and the file will be unplayable

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von philippe renon
Gesendet: Mittwoch, 13. Dezember 2017 09:32
An: [hidden email]
Betreff: is eos on shutdown needed when stopping a pipeline

 

Hi,

 

gst-launch has an eos on shutdown option to make sure that, amongst other cases, video captured to file are properly finalized.

 

My question is whether this eos is also needed when programatically stopping a pipeline ?

Will a stop do the eos or is it the responsibility of the application to send that eos in any case ?

 

Philippe.

 


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

Re: AW: is eos on shutdown needed when stopping a pipeline

filnet
Ok. So just stopping a pipeline is not always enough when recording a video to file.

We have a pipeline as such:

dx9screencapsrc monitor=0 cursor=true ! tee name=t
    t. ! queue ! timeoverlay ! autovideosink
    t. ! queue ! videoconvert ! x264enc tune=zerolatency tune=zerolatency bitrate=498 ! mpegpsmux ! filesink location=D:\capture.mpg

The produced capture.mpg file is readable with VLC but not with Windows Media Player.
I am trying to understand why WMP can't play it.


Le Mercredi 13 décembre 2017 9h50, "Thornton, Keith" <[hidden email]> a écrit :


Hi,
Eos is necessary for instance when you are writing to an mp4 container. Without the eos, the mov block will not be written (in the normal case) and the file will be unplayable
 
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von philippe renon
Gesendet: Mittwoch, 13. Dezember 2017 09:32
An: [hidden email]
Betreff: is eos on shutdown needed when stopping a pipeline
 
Hi,
 
gst-launch has an eos on shutdown option to make sure that, amongst other cases, video captured to file are properly finalized.
 
My question is whether this eos is also needed when programatically stopping a pipeline ?
Will a stop do the eos or is it the responsibility of the application to send that eos in any case ?
 
Philippe.
 
_______________________________________________
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: is eos on shutdown needed when stopping a pipeline

Olivier Crête-3
Hi,

For PS files you need to write the header, so you need to send the EOS event to the pipeline then wait for the EOS message to be sent back. This is what gst-launch -e does.

Olivier

On December 13, 2017 10:35:52 AM EST, philippe renon <[hidden email]> wrote:

>Ok. So just stopping a pipeline is not always enough when recording a
>video to file.
>We have a pipeline as such:
>
>dx9screencapsrc monitor=0 cursor=true ! tee name=t
>    t. ! queue ! timeoverlay ! autovideosink
>    t. ! queue ! videoconvert ! x264enc tune=zerolatency
>tune=zerolatency bitrate=498 ! mpegpsmux ! filesink
>location=D:\capture.mpg
>The produced capture.mpg file is readable with VLC but not with Windows
>Media Player.I am trying to understand why WMP can't play it.
>
>Le Mercredi 13 décembre 2017 9h50, "Thornton, Keith"
><[hidden email]> a écrit :
>
>
>#yiv7462131277 #yiv7462131277 -- _filtered #yiv7462131277
>{font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered
>#yiv7462131277 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7462131277
>{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered
>#yiv7462131277 {panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv7462131277
>{panose-1:2 11 6 9 4 5 4 2 2 4;}#yiv7462131277 #yiv7462131277
>p.yiv7462131277MsoNormal, #yiv7462131277 li.yiv7462131277MsoNormal,
>#yiv7462131277 div.yiv7462131277MsoNormal
>{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv7462131277
>a:link, #yiv7462131277 span.yiv7462131277MsoHyperlink
>{color:#0563C1;text-decoration:underline;}#yiv7462131277 a:visited,
>#yiv7462131277 span.yiv7462131277MsoHyperlinkFollowed
>{color:#954F72;text-decoration:underline;}#yiv7462131277
>span.yiv7462131277E-MailFormatvorlage17
>{color:windowtext;}#yiv7462131277 .yiv7462131277MsoChpDefault
>{font-size:10.0pt;} _filtered #yiv7462131277 {margin:70.85pt 70.85pt
>2.0cm 70.85pt;}#yiv7462131277 div.yiv7462131277WordSection1
>{}#yiv7462131277 Hi, Eos is necessary for instance when you are writing
>to an mp4 container. Without the eos, the mov block will not be written
>(in the normal case) and the file will be unplayable    Von:
>gstreamer-devel
>[mailto:[hidden email]]Im Auftrag von
>philippe renon
>Gesendet: Mittwoch, 13. Dezember 2017 09:32
>An: [hidden email]
>Betreff: is eos on shutdown needed when stopping a pipeline    Hi,   
>gst-launch has an eos on shutdown option to make sure that, amongst
>other cases, video captured to file are properly finalized.    My
>question is whether this eos is also needed when programatically
>stopping a pipeline ? Will a stop do the eos or is it the
>responsibility of the application to send that eos in any case ?   
>Philippe.    _______________________________________________
>gstreamer-devel mailing list
>[hidden email]
>https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>  

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

Re: is eos on shutdown needed when stopping a pipeline

mdsheraj123
In reply to this post by filnet
In eos_on_shutdown you send eos message on interrupt and such and handle it in GST_MESSAGE_EOS.

Look into https://github.com/GStreamer/gstreamer/blob/master/tools/gst-launch.c

Not sure how the flag makes the end behaviour different rather than just printing new messages. Anyways for limited size videos, you quit at end of the video and on interrupt, you quit ultimately.
Maybe passing the eos message itself has some effect. Which I doubt given

https://gstreamer.freedesktop.org/documentation/gstreamer/gstevent.html?gi-language=c#gst_event_new_eos
gst_event_new_eos
GstEvent *
gst_event_new_eos ()
Create a new EOS event. The eos event can only travel downstream synchronized with the buffer flow. Elements that receive the EOS event on a pad can return GST_FLOW_EOS as a GstFlowReturn when data after the EOS event arrives.

The EOS event will travel down to the sink elements in the pipeline which will then post the GST_MESSAGE_EOS on the bus after they have finished playing any buffered data.

When all sinks have posted an EOS message, an EOS message is forwarded to the application.

The EOS event itself will not cause any state transitions of the pipeline.