Splitting Video in a Recording Pipeline

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

Splitting Video in a Recording Pipeline

lijinshyam
Hi

  I am,trying to implement a recorder that will split a larger media file or a live source in to smaller chunks.
First i created a pipeline to record the steam from filesrc and rtspsrc . For Implementing the file change i put a callback in the encoder element which keep on checking the size of the file created by the pipeline. When the filesize is reached the predefined size then i will put the pipeline in to GST_STATE_PAUSE.   Then i move the recorded file to the destination .,after that that the state of the pipeline is set to GST_STATE_NULL. and i unref the main pipeline.Here the first video is created and after that the same pipeline is created and the video is recorded . I can Implement file change in this way..But is this the right way to Implement my idea..?

Pipeline Created --->> GST_STATE_READY---->> GST_STATE_PAUSE ---->>GST_STATE_PLAYING-----{
after a predefined file size splitting file } -->> GST_STATE_PAUSE--->> GST_STATE_READY-->>GST_STATE_NULL-->>unref the pipeline

After this the same method is repeated to create the second chunk. Is there any better way to Implement idea...?


Regards

LijiN

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Splitting Video in a Recording Pipeline

Marco Ballesio
Hi,

as all my emails of today, I'm pretty in late.. I hope this helps anyway.

On Thu, Dec 9, 2010 at 4:15 PM, LIJIN SYAM K <[hidden email]> wrote:
> Hi
>
>   I am,trying to implement a recorder that will split a larger media file or
> a live source in to smaller chunks.
> First i created a pipeline to record the steam from filesrc and rtspsrc .
> For Implementing the file change i put a callback in the encoder element
> which keep on checking the size of the file created by the pipeline.

The encoder element would not consider the overhead generated by the
muxer and by other possible streams (for instance, if you're doing
this with the video encoder you would not get the quantity of audio
data written).

When debugging, I usually install a data probe on the filesrc sink pad
in order to get the proper size of the file while writing it, but
maybe there are more elegant ways to handle the thing. Be careful
about the execution context!

http://www.gstreamer.net/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html

> When
> the filesize is reached the predefined size then i will put the pipeline in
> to GST_STATE_PAUSE.   Then i move the recorded file to the destination
> .,after that that the state of the pipeline is set to GST_STATE_NULL.
> unref the main pipeline.

it's actually possible to re-use the same pipeline (after
reconfiguring its properties).

> Here the first video is created and after that the
> same pipeline is created and the video is recorded . I can Implement file
> change in this way..But is this the right way to Implement my idea..?
>
> Pipeline Created --->> GST_STATE_READY---->> GST_STATE_PAUSE
> ---->>GST_STATE_PLAYING-----{
> after a predefined file size splitting file } -->> GST_STATE_PAUSE--->>
> GST_STATE_READY-->>GST_STATE_NULL-->>unref the pipeline

I wonder if segment events may be of any help here..

Regards

>
> After this the same method is repeated to create the second chunk. Is there
> any better way to Implement idea...?
>
>
> Regards
>
> LijiN
> ------------------------------------------------------------------------------
> This SF Dev2Dev email is sponsored by:
>
> WikiLeaks The End of the Free Internet
> http://p.sf.net/sfu/therealnews-com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel