Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gstreamer RTSP videostream freezes after first frame #519

Closed
Gerbaum opened this issue Jan 18, 2023 · 4 comments
Closed

Gstreamer RTSP videostream freezes after first frame #519

Gerbaum opened this issue Jan 18, 2023 · 4 comments
Assignees
Labels
needs triage new issues

Comments

@Gerbaum
Copy link

Gerbaum commented Jan 18, 2023

My Spec:

Ubuntu 20.04 on imx6 quadcore board
Kernel 5.4.45
v4l2loopback version: 0.12.7

Hi,
my first gstreamer pipe is:

gst-launch-1.0 -v v4l2src device=/dev/video4 ! image/jpeg,width=1920,height=1080,framerate=30/1 ! videorate drop-only=true ! image/jpeg,framerate=10/1 ! jpegdec ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! v4l2sink device=/dev/video15

Pipeline takes MJPEG Stream from USB Camera, limits framerate to 10 fps, decodes to Raw, and after a videoconvert it sends the stream to loopback device 15.

My Second Stream is:

gst-launch-1.0 -e -v rtspclientsink name=s location=rtsp://localhost:8554/mystream v4l2src device=/dev/video15 ! video/x-raw,width=1920,height=1080,format=I420,framerate=30/1 ! queue ! videorate drop-only=true ! video/x-raw,width=1920,height=1080,format=I420,framerate=10/1 ! v4l2h264enc extra-controls="controls,video_bitrate=2000000;" ! video/x-h264, framerate=10/1 ! s.sink_1

Pipelines takes Raw Stream from loopback device 15, limits fps to 10 and encodes to h264. Last part is a sink to rtsp server from RTSP-Simple-Server running on the same device.

Running both streams together no error happens.

But if I want to watch the rtsp stream in vlc player, there is freeze after first frame. After a raise of vlc buffer time to 3 seconds, there is about one fps.

The pipe works without problems in vlc player, after skipping loopback part and connect the stream to one pipe.

Could there be a problem with the timing of the frames, cause I send 10 fps to loopback15 with first pipe and grap 30 fps with second one?

Thanks

@Gerbaum Gerbaum added the needs triage new issues label Jan 18, 2023
@schplorg
Copy link

schplorg commented Mar 20, 2023

Try a different commit or stable release, fixed first frame frozen issues for me with streaming from OBS to virtual camera
https://obsproject.com/forum/threads/only-getting-a-still-image-first-frame-from-virtual-camera.164890/
https://gist.github.com/schplorg/1a8bb359a4267de71b482c9fc4ffad4e

@pfactum
Copy link
Contributor

pfactum commented Mar 23, 2023

@umlaeute
Copy link
Owner

thx!

@umlaeute
Copy link
Owner

that should be fixed with #533 (which has been merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage new issues
Projects
None yet
Development

No branches or pull requests

4 participants