"Buffer has no PTS" with this H264 IP Camera

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

"Buffer has no PTS" with this H264 IP Camera

Mandar Joshi
Hello everyone,
I am facing this weird problem with an H264 IP camera.
While trying to record the stream, mp4mux gives an errror "Buffer has no PTS".
This doesn't happen every time. Most of the time, restarting the
pipeline solves the problem.
The problem is similar to what an user has mentioned here
https://stackoverflow.com/questions/42874691/gstreamer-for-android-buffer-has-no-pts
but I am facing this on Fedora 25 x86_64 with GStreamer 1.10.4.

The pipeline I am using is somewhat complex but essentialls this is what it does
gst-launch-1.0 -e rtspsrc location=rtsp://127.0.0.1:8556/vstarcam !
rtph264depay ! h264parse ! mp4mux ! filesink location=1.mp4

Things I have tried
1. Adding a timestamp using appsink appsrc and then feeding the output
to shmsink and streaming the camera from there. What I do is
 -----------------------------------------------------------------------------------------
  GST_BUFFER_PTS (app_buffer) = camera->appsrc_timestamp;
  GST_BUFFER_DURATION (app_buffer) = gst_util_uint64_scale_int (1,
GST_SECOND, camera->fps);
  camera->appsrc_timestamp += GST_BUFFER_DURATION (app_buffer);
 -----------------------------------------------------------------------------------------
Can I do the above with pad probes?

2. The problem doesn't present itself while using the mkv container.
But for some reason the recorded video in mkv isn't seekable
correctly.

3. Setting h264parse properties
g_object_set (parser, "disable-passthrough", TRUE, "config-interval", 1, NULL);
This didn't make any difference.

What else can I try?
I would appreciate any inputs.

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

Re: "Buffer has no PTS" with this H264 IP Camera

A_Goodiwn
Hello! Maybe this link will help you.
There is a workaround on h264parse module:
https://stackoverflow.com/questions/42874691/gstreamer-for-android-buffer-has-no-pts




--
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: "Buffer has no PTS" with this H264 IP Camera

Thornton, Keith
Hi
In my experience, qtmux reports "buffer has no PTS" if two consecutive buffers have the same timestamp. This can occur if h264parse receives a frame with invalid timestamp e.g. CLOCK_TIME_NONE it then guesses a timestamp. You could insert a pad-probe which checks the timestamps before h264parse and checks that the timestamp is plausible.

-----Urspr√ľngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von A_Goodiwn
Gesendet: Donnerstag, 12. Oktober 2017 08:22
An: [hidden email]
Betreff: Re: "Buffer has no PTS" with this H264 IP Camera

Hello! Maybe this link will help you.
There is a workaround on h264parse module:
https://stackoverflow.com/questions/42874691/gstreamer-for-android-buffer-has-no-pts




--
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: "Buffer has no PTS" with this H264 IP Camera

Mandar Joshi
> In my experience, qtmux reports "buffer has no PTS" if two consecutive buffers have the same timestamp. This can occur if h264parse receives a frame with invalid timestamp e.g. CLOCK_TIME_NONE it then guesses a timestamp. You could insert a pad-probe which checks the timestamps before h264parse and checks that the timestamp is plausible.
>
> Hello! Maybe this link will help you.
> There is a workaround on h264parse module:
> https://stackoverflow.com/questions/42874691/gstreamer-for-android-buffer-has-no-pts
>
Thank You for sharing this. I found the C API call doc for
gst_base_parse_set_pts_interpolation on this page
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseParse.html#gst-base-parse-set-pts-interpolation

Will try it out and see if it fixes the issue.

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

Re: "Buffer has no PTS" with this H264 IP Camera

Mailing List SVR
Il 13/10/2017 09:04, Mandar Joshi ha scritto:

>> In my experience, qtmux reports "buffer has no PTS" if two consecutive buffers have the same timestamp. This can occur if h264parse receives a frame with invalid timestamp e.g. CLOCK_TIME_NONE it then guesses a timestamp. You could insert a pad-probe which checks the timestamps before h264parse and checks that the timestamp is plausible.
>>
>> Hello! Maybe this link will help you.
>> There is a workaround on h264parse module:
>> https://stackoverflow.com/questions/42874691/gstreamer-for-android-buffer-has-no-pts
>>
> Thank You for sharing this. I found the C API call doc for
> gst_base_parse_set_pts_interpolation on this page
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseParse.html#gst-base-parse-set-pts-interpolation
>
> Will try it out and see if it fixes the issue.

This bug could be related

https://bugzilla.gnome.org/show_bug.cgi?id=788777

if your issue does not happen in gstreamer 1.10.2 and lower is the same
regression,

Nicola

>
> Regards
> Mandar Joshi
> _______________________________________________
> 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