question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Videostream-cli webcam to another videostream-cli not working

See original GitHub issue

Thank you for this amazing package.

I am trying to use this package for streaming on raspberry pi to Ubuntu machine receiving frames and handle it with opencv like in server example. Tried those on raspberry pi:

  1. Server example works fine
  2. Webcam works fine
  3. Videostream-cli example, streaming an mp4 video works fine and timing is correct But running videostream-cli with webcam instead of video doesn’t work, I receive first one or couple of frames correctly then the stream get stopped hang or receiving curropted frames.
  • I had tried different type of cameras
  • and test on raspberry pi 3 and 4
  • tried different versions of ffmpeg even downloading source and compile it Non of them was able to stream successfully.

Why is this happening since both sever and webcam both works fine, means PYAV and FFMPEG installed correctly.

This how I am running videostream-cli: on raspberry pi: python cli.py offer and this how I modified the code to make offer stream from webcam:

# create media source
    if args.play_from:
        player = MediaPlayer(args.play_from)
    else:
        if args.role == "offer":
            options = {"framerate": "30", "video_size": "640x480"}
            player = MediaPlayer("/dev/video0", format="v4l2", options=options)
        else:
            player = None

on Ubuntu machine I run python cli.py answer --record-to video.mp4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
jlainecommented, Feb 23, 2020

No I do not have a raspberry pi. Bear in mind this is my free time I’m giving at no charge. Don’t expect me to go out and buy gear to reproduce issues.

0reactions
jlainecommented, Mar 7, 2021

No response from submitter, closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Starting and streaming direct show webcam from command line
In wxwindows, go in and set the camera as default: Settings -- Preferences -- click the Advanced options checkbox -- access -- dshow....
Read more >
Stream camera video and audio with FFmpeg
Stream camera video and audio to another computer inside local network with FFmpeg. ... From command line prompt type and execute
Read more >
Troubleshooting streaming video - Amazon Rekognition
This topic provides troubleshooting information for using Amazon Rekognition Video with streaming videos.
Read more >
Stream Command 3.1 and Elgato Game Capture HD
They contain areas where you can add your Webcam, or other customized information. First, highlight the numbered scene you want to use. The,...
Read more >
YouTube Live Streaming API Overview | Google Developers
Each broadcast is associated with one video stream. ... that would be pertinent to a live broadcast but not to other YouTube videos....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found