Store and read GstBuffer's to and from a file

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

Store and read GstBuffer's to and from a file

pfarmer
I am trying to store gstreamer buffer's to a filesink to be retrieved later
by a filesrc. This is for testing reasons where I want to record data on
various platforms with various cameras attached.
Immage I do:
```
gst-launch-1.0 videotestsrc num-buffers=10 ! x264enc ! video/x-h264,
stream-format=avc ! filesink location=test.raw
```
And load the avcC buffers with:
```
gst-launch-1.0 filesrc location=test.raw ! identity silent=false !
video/x-h264, stream-format=avc ! h264parse ! avdec_h264 ! autovideosink
```
I will get only 4096 Byte sized buffers from the filesrc which the parse is
unable to handle since the avc stream-format relies on packets with known
size.
In this very specific example I could use the byte-stream format. But the is
not an option for me since this is part of my testing process to be able to
deal with avc format implementations.

I saw rtpgstpay/depay which would be not ideal since it adds time stamping
and own packetization.

So is there a plugin or way to store "any" gstreamer buffer to a file, such
that I can later retrieve them and inject them into the pipeline again
(possibly losing time-stamp information)?

If there is no other way then using rtpgstpay/depay how could I use those
elements?






--
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: Store and read GstBuffer's to and from a file

Nicolas Dufresne-5


Le dim. 17 nov. 2019 15 h 10, pfarmer <[hidden email]> a écrit :
I am trying to store gstreamer buffer's to a filesink to be retrieved later
by a filesrc. This is for testing reasons where I want to record data on
various platforms with various cameras attached.
Immage I do:
```
gst-launch-1.0 videotestsrc num-buffers=10 ! x264enc ! video/x-h264,
stream-format=avc ! filesink location=test.raw
```
And load the avcC buffers with:
```
gst-launch-1.0 filesrc location=test.raw ! identity silent=false !
video/x-h264, stream-format=avc ! h264parse ! avdec_h264 ! autovideosink
```

H264parse is unable to process avcC from arbitrary alignment. Store data in byte-stream format or use one file per-AU (multifilesink).

I will get only 4096 Byte sized buffers from the filesrc which the parse is
unable to handle since the avc stream-format relies on packets with known
size.
In this very specific example I could use the byte-stream format. But the is
not an option for me since this is part of my testing process to be able to
deal with avc format implementations.

I saw rtpgstpay/depay which would be not ideal since it adds time stamping
and own packetization.

So is there a plugin or way to store "any" gstreamer buffer to a file, such
that I can later retrieve them and inject them into the pipeline again
(possibly losing time-stamp information)?

If there is no other way then using rtpgstpay/depay how could I use those
elements?






--
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: Store and read GstBuffer's to and from a file

pfarmer
Thanks a lot. The Multifilesink will do what I want. It'll leave quiet some
files though.
What I want to achieve is to not have arbitrary alignment, rather a
buffer-alignment. In order to be able test the avc parsing.



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