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

[Bug]: No video shown on RTSP tested with VLC #388

Closed
3 tasks done
humblemat810 opened this issue Mar 12, 2024 · 2 comments
Closed
3 tasks done

[Bug]: No video shown on RTSP tested with VLC #388

humblemat810 opened this issue Mar 12, 2024 · 2 comments
Assignees
Labels
ANSWERED IN DOCS 📖 Already answered in our Docs! INVALID 🛑 This doesn't seem right or non-applicable or missing information QUESTION ❓ User asked about the working/usage of VidGear APIs.

Comments

@humblemat810
Copy link

Description

just use any local file stream, open VLC netstream with same RTSP url,
tried default download or ffmpeg daily release, both simply vlc not showing anything

Issue Checklist

  • I have searched open or closed issues for my problem and found nothing related or helpful.
  • I have read the Documentation and found nothing related to my problem.
  • I've read the Issue Guidelines and wholeheartedly agree.

Expected behaviour

VLC should open a RTSP stream normally

Actual behaviour

Black screen on VLC

Steps to reproduce

  1. on win 10 system
    change file name to r"path to file"
  2. open VLC change netstream path

Terminal log output

No response

Python Code(Optional)

import cv2
from vidgear.gears import CamGear
from vidgear.gears import WriteGear

# open any valid video stream(for e.g `foo.mp4` file)
stream = CamGear(source=r"C:\Test_videos\BigBuckBunny.mp4").start()

# define required FFmpeg parameters for your writer
output_params = {"-f": "rtsp", "-rtsp_transport": "tcp"} $ also checked udp

# Define writer with defined parameters and RTSP address
# [WARNING] Change your RTSP address `rtsp://localhost:8554/mystream` with yours!
writer = WriteGear(
    output="rtsp://localhost:8554/mystream", logging=True, **output_params
    #, custom_ffmpeg= r'C:\Program Files\ffmpeg-2023-11-15-git-78f55457c9-full_build\bin\ffmpeg.exe'
)

# loop over
while True:

    # read frames from stream
    frame = stream.read()

    # check for frame if Nonetype
    if frame is None:
        break

    # {do something with the frame here}

    # write frame to writer
    writer.write(frame)

# safely close video stream
stream.stop()

# safely close writer
writer.close()

VidGear Version

0.3.2

Python version

3.10

OpenCV version

4.9.0

Operating System version

win 10

Any other Relevant Information?

No response

@humblemat810 humblemat810 added the BUG 🐛 Vidgear api's error, flaw or fault label Mar 12, 2024
Copy link

welcome bot commented Mar 12, 2024

Thanks for opening this issue, a maintainer will get back to you shortly!

In the meantime:

  • Read our Issue Guidelines, and update your issue accordingly. Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo.
  • Go comprehensively through our dedicated FAQ & Troubleshooting section.
  • For any quick questions and typos, please refrain from opening an issue, as you can reach us on Gitter community channel.

@abhiTronix
Copy link
Owner

@humblemat810 Did you setup a RTSP server first at rtsp://localhost:8554/mystream address? Or even considered reading docs properly first: https://abhitronix.github.io/vidgear/v0.3.1-stable/help/writegear_ex/#using-writegears-compression-mode-for-rtsprtp-live-streaming, Read it properly first and then it will work.

@abhiTronix abhiTronix added INVALID 🛑 This doesn't seem right or non-applicable or missing information QUESTION ❓ User asked about the working/usage of VidGear APIs. ANSWERED IN DOCS 📖 Already answered in our Docs! and removed BUG 🐛 Vidgear api's error, flaw or fault labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ANSWERED IN DOCS 📖 Already answered in our Docs! INVALID 🛑 This doesn't seem right or non-applicable or missing information QUESTION ❓ User asked about the working/usage of VidGear APIs.
Projects
None yet
Development

No branches or pull requests

2 participants