video freezes when change input mode

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

asimfile

  • Posts: 1
  • Joined: Mon May 27, 2019 6:08 am
  • Real Name: Mohd Asim

video freezes when change input mode

PostMon May 27, 2019 7:15 am

Hi,
I am using Blackmagic decklink duo 2 card to capture video from camera into v4l2 device and use Qt camera and videowidget to display live video.

I am using following pipeline code.
Code: Select all
gst-launch-1.0 decklinkvideosrc device-number=0 mode=auto drop-no-signal-frames=true ! deinterlace ! videoscale ! video/x-raw,width=960,height=540 ! videorate max-rate=30 ! videoconvert ! tee ! v4l2sink device=/dev/video0 sync=false

It works fine but when i switch output video mode in camera (ie 50p to 50i ) the video freezes for a variable time and then restart.
The time duration of video freeze is same time duration if calculate from start till mode switch.

for eg:-
if switch mode after 10 minute from start, the video freezes for 10 minute.
if switch mode after 20 minute from start, the video freezes for 20 minute.

I think the issue is with gst clock synchronization and raised issue on gstreamer bug page.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/974

It shows following debug messages during freeze:-

:00:36.413496149 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:634:gst_decklink_video_src_update_time_mapping: New time mapping causes difference of 0:00:09.859546400
0:00:36.413515392 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:636:gst_decklink_video_src_update_time_mapping: Maximum allowed per frame 0:00:00.001668333
0:00:36.413539206 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:934:VideoInputFrameArrived: Received no audio packet at 0:00:35.952360722
0:00:36.413591782 8567 0x557fdd53ec50 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:1046:gst_decklink_video_src_create: Outputting buffer 0x557fdd8f4aa0 with timestamp 0:00:01.301300000 and duration 0:00:00.033366666
0:00:36.446824157 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:916:VideoInputFrameArrived: Failed to get timecode: 0x00000001
0:00:36.446863826 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:634:gst_decklink_video_src_update_time_mapping: New time mapping causes difference of 0:00:09.844520587
0:00:36.446882001 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:636:gst_decklink_video_src_update_time_mapping: Maximum allowed per frame 0:00:00.001668333
0:00:36.446906130 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:934:VideoInputFrameArrived: Received no audio packet at 0:00:35.985727437
0:00:36.446957850 8567 0x557fdd53ec50 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:1046:gst_decklink_video_src_create: Outputting buffer 0x557fdd8f4bb0 with timestamp 0:00:01.334666666 and duration 0:00:00.033366666
0:00:36.480160023 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:916:VideoInputFrameArrived: Failed to get timecode: 0x00000001
0:00:36.480200415 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:634:gst_decklink_video_src_update_time_mapping: New time mapping causes difference of 0:00:09.829494774
0:00:36.480218902 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:636:gst_decklink_video_src_update_time_mapping: Maximum allowed per frame 0:00:00.001668333
0:00:36.480243565 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:934:VideoInputFrameArrived: Received no audio packet at 0:00:36.019062782
0:00:36.480298276 8567 0x557fdd53ec50 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:1046:gst_decklink_video_src_create: Outputting buffer 0x557fdd8f4660 with timestamp 0:00:01.368033333 and duration 0:00:00.033366666
Offline

OliverLowe

  • Posts: 2
  • Joined: Tue May 21, 2019 4:46 pm
  • Real Name: Oliver Lowe

Re: video freezes when change input mode

PostSun Jun 09, 2019 2:53 pm

asimfile wrote:Hi,
I am using Blackmagic decklink duo 2 card to capture video from camera into v4l2 device and use Qt camera and videowidget to display live video.

I am using following pipeline code.
Code: Select all
gst-launch-1.0 decklinkvideosrc device-number=0 mode=auto drop-no-signal-frames=true ! deinterlace ! videoscale ! video/x-raw,width=960,height=540 ! videorate max-rate=30 ! videoconvert ! tee ! v4l2sink device=/dev/video0 sync=false

It works fine but when i switch output video mode in camera (ie 50p to 50i ) the video freezes for a variable time and then restart.
The time duration of video freeze is same time duration if calculate from start till mode switch.

for eg:-
if switch mode after 10 minute from start, the video freezes for 10 minute.
if switch mode after 20 minute from start, the video freezes for 20 minute.

I think the issue is with gst clock synchronization and raised issue on gstreamer bug page.
https://gitlab.freedesktop.org/gstreame ... issues/974

It shows following debug messages during freeze:-

:00:36.413496149 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:634:gst_decklink_video_src_update_time_mapping: New time mapping causes difference of 0:00:09.859546400
0:00:36.413515392 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:636:gst_decklink_video_src_update_time_mapping: Maximum allowed per frame 0:00:00.001668333
0:00:36.413539206 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:934:VideoInputFrameArrived: Received no audio packet at 0:00:35.952360722
0:00:36.413591782 8567 0x557fdd53ec50 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:1046:gst_decklink_video_src_create: Outputting buffer 0x557fdd8f4aa0 with timestamp 0:00:01.301300000 and duration 0:00:00.033366666
0:00:36.446824157 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:916:VideoInputFrameArrived: Failed to get timecode: 0x00000001
0:00:36.446863826 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:634:gst_decklink_video_src_update_time_mapping: New time mapping causes difference of 0:00:09.844520587
0:00:36.446882001 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:636:gst_decklink_video_src_update_time_mapping: Maximum allowed per frame 0:00:00.001668333
0:00:36.446906130 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:934:VideoInputFrameArrived: Received no audio packet at 0:00:35.985727437
0:00:36.446957850 8567 0x557fdd53ec50 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:1046:gst_decklink_video_src_create: Outputting buffer 0x557fdd8f4bb0 with timestamp 0:00:01.334666666 and duration 0:00:00.033366666
0:00:36.480160023 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:916:VideoInputFrameArrived: Failed to get timecode: 0x00000001
0:00:36.480200415 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:634:gst_decklink_video_src_update_time_mapping: New time mapping causes difference of 0:00:09.829494774
0:00:36.480218902 8567 0x7fc4e4009e00 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:636:gst_decklink_video_src_update_time_mapping: Maximum allowed per frame 0:00:00.001668333
0:00:36.480243565 8567 0x7fc4e4009e00 DEBUG decklink gstdecklink.cpp:934:VideoInputFrameArrived: Received no audio packet at 0:00:36.019062782
0:00:36.480298276 8567 0x557fdd53ec50 DEBUG decklinkvideosrc gstdecklinkvideosrc.cpp:1046:gst_decklink_video_src_create: Outputting buffer 0x557fdd8f4660 with timestamp 0:00:01.368033333 and duration 0:00:00.033366666

Facing the same issue here and getting the same errors.

Help is appreciated.
Thanks in advance,
Regards,
Oliver
https://freejobalert.vip/ https://gimp.software/ https://notepad.software/

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 3 guests