Invalid buffer timestamp; dropping buffer?

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

Invalid buffer timestamp; dropping buffer?

pisymbol .
I have a multistage pipeline that looks like this:

gst-launch-1.0 -v -e matroskamux name="muxer" streamable=true ! multifilesink post-messages=true next-file=5 max-file-duration=60000000000 location=capture.mkv \
  nvcamerasrc fpsRange="30.0 30.0" aeLock=true sensor_id=0 \
  ! 'video/x-raw(memory:NVMM), width=(int)4104, height=(int)3046, format=(string)I420, framerate=(fraction)30/1' \
  ! nvvidconv flip-method=3 ! 'video/x-raw(memory:NVMM), width=(int)1520, height=(int)2704, format=(string)I420' \
  ! omxh264enc bitrate=10000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! muxer.video_0 \
  nvcamerasrc fpsRange="30.0 30.0" aeLock=true sensor_id=1 \
  ! 'video/x-raw(memory:NVMM), width=(int)4104, height=(int)3046, format=(string)I420, framerate=(fraction)30/1' \
  ! nvvidconv flip-method=3 ! 'video/x-raw(memory:NVMM), width=(int)1520, height=(int)2704, format=(string)I420' \
  ! omxh264enc bitrate=10000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! muxer.video_1

Basically, I'm trying to capture streams from two cameras and mux them into one mkv file. This works on the command line and I can view the capture without issue.

However, when I try to import this into PyGst using parse_from_description() I don't get any output at all! I also don't get any explicit errors either. Instead I see this continuously:

0:00:03.297571465 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
0:00:03.298439263 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
0:00:03.310016224 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
0:00:03.317109682 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
0:00:03.340857644 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
0:00:03.348889524 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
0:00:03.376322341 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
0:00:03.377022270 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer

I'm not sure how to debug this. Googling suggests this is a latency issue but I don't see that could be since gst-launch-1.0 again works fine. Somewhere something got lost in translation.

NOTE: I've already set do_timestamp=true for the nvcamerasrc to no avail.

Any suggestions?

-aps

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

Re: Invalid buffer timestamp; dropping buffer?

Michael Gruner
They should be equivalent, so the problem must be somewhere in the python code. Maybe you can share a minimal example of your failing code.

> On Jun 12, 2019, at 7:39 AM, pisymbol . <[hidden email]> wrote:
>
> I have a multistage pipeline that looks like this:
>
> gst-launch-1.0 -v -e matroskamux name="muxer" streamable=true ! multifilesink post-messages=true next-file=5 max-file-duration=60000000000 location=capture.mkv \
>   nvcamerasrc fpsRange="30.0 30.0" aeLock=true sensor_id=0 \
>   ! 'video/x-raw(memory:NVMM), width=(int)4104, height=(int)3046, format=(string)I420, framerate=(fraction)30/1' \
>   ! nvvidconv flip-method=3 ! 'video/x-raw(memory:NVMM), width=(int)1520, height=(int)2704, format=(string)I420' \
>   ! omxh264enc bitrate=10000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! muxer.video_0 \
>   nvcamerasrc fpsRange="30.0 30.0" aeLock=true sensor_id=1 \
>   ! 'video/x-raw(memory:NVMM), width=(int)4104, height=(int)3046, format=(string)I420, framerate=(fraction)30/1' \
>   ! nvvidconv flip-method=3 ! 'video/x-raw(memory:NVMM), width=(int)1520, height=(int)2704, format=(string)I420' \
>   ! omxh264enc bitrate=10000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! muxer.video_1
>
> Basically, I'm trying to capture streams from two cameras and mux them into one mkv file. This works on the command line and I can view the capture without issue.
>
> However, when I try to import this into PyGst using parse_from_description() I don't get any output at all! I also don't get any explicit errors either. Instead I see this continuously:
>
> 0:00:03.297571465 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
> 0:00:03.298439263 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
> 0:00:03.310016224 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
> 0:00:03.317109682 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
> 0:00:03.340857644 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
> 0:00:03.348889524 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
> 0:00:03.376322341 11548   0x7f800021e0 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_0> Invalid buffer timestamp; dropping buffer
> 0:00:03.377022270 11548   0x7f84003b20 WARN             matroskamux matroska-mux.c:3558:gst_matroska_mux_write_data:<muxer:video_1> Invalid buffer timestamp; dropping buffer
>
> I'm not sure how to debug this. Googling suggests this is a latency issue but I don't see that could be since gst-launch-1.0 again works fine. Somewhere something got lost in translation.
>
> NOTE: I've already set do_timestamp=true for the nvcamerasrc to no avail.
>
> Any suggestions?
>
> -aps
> _______________________________________________
> 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: Invalid buffer timestamp; dropping buffer?

pisymbol .


On Wed, Jun 12, 2019 at 9:59 AM Michael Gruner <[hidden email]> wrote:
They should be equivalent, so the problem must be somewhere in the python code. Maybe you can share a minimal example of your failing code.

Mike, you're the man! I realized something when you said that:

So what I was doing was starting the bin returned from parse_bin_from_dsecription() instead of creating a separate pipeline (Gst.Pipeline()), adding it to that, and then starting the pipeline. I feel kinda dumb now. Sorry for the noise.

-aps


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

Re: Invalid buffer timestamp; dropping buffer?

Michael Gruner
Check out parse_launch() instead. You pass in the same gst-launch syntax, but returns a pipeline ready to play.

On Jun 12, 2019, at 8:19 AM, pisymbol . <[hidden email]> wrote:



On Wed, Jun 12, 2019 at 9:59 AM Michael Gruner <[hidden email]> wrote:
They should be equivalent, so the problem must be somewhere in the python code. Maybe you can share a minimal example of your failing code.

Mike, you're the man! I realized something when you said that:

So what I was doing was starting the bin returned from parse_bin_from_dsecription() instead of creating a separate pipeline (Gst.Pipeline()), adding it to that, and then starting the pipeline. I feel kinda dumb now. Sorry for the noise.

-aps

_______________________________________________
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: Invalid buffer timestamp; dropping buffer?

pisymbol .


On Wed, Jun 12, 2019, 10:50 AM Michael Gruner <[hidden email]> wrote:
Check out parse_launch() instead. You pass in the same gst-launch syntax, but returns a pipeline ready to play.

Wow thank you!

-aps

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