-
Notifications
You must be signed in to change notification settings - Fork 17
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
Accept all media types #19
Conversation
I need more info about this problem. What stream source you using? RTSP? Removing this options is not very good. StreamAssist will receive unnecessary video frames. |
I've created a very simple script with the options you are using on the stream.py file: import av
kwargs = {
'options':
{
'fflags': 'nobuffer',
'flags': 'low_delay',
'timeout': '5000000',
'rtsp_flags': 'prefer_tcp',
'allowed_media_types': 'audio',
},
'timeout': 5
}
container = av.open("rtsp://192.168.xxx.yyy:8554/mycamera", **kwargs)
for frame in container.decode(audio=0):
print(frame) And I get this error:
I don't know how to use the go2rtc to get the stream info, could you help me with that? EDIT: I used
|
Well. Looks like you using go2rtc as a source. The |
I didn't know about the |
We still don't know where this is useful. Except go2rtc. Which should be fixed at go2rtc side. |
Not everybody is using go2rtc for their cameras, so it's practical to have the option to allow all media types. Either way, thank you for this integration! |
I don't know of any other examples where one needs to disable this option. It works fine. |
I have two cameras that need this option:
I've installed Frigate to use the go2rtc, but before doing that, I couldn't use your StreamAssist integration. |
I don't have any problems with my Tapo camera. @relust also said there is no problems. Are you sure you used direct link? |
@Gompman has one same error (ExitError) for go2rtc source. And one another error (PermissionError) for direct source. Do you have Maybe you can share your stream with me in PM? I don't like some dummy fixes. Every fix has to have an explanation and a meaning. |
I've tried all these with my Sricam and Tapo cameras using direct RTSP stream and I have the This is the python app to test it: import av
kwargs = {
'options':
{
'rtsp_flags': 'prefer_tcp',
'allowed_media_types': 'audio',
},
'timeout': 5
}
# container = av.open("rtsp://user:pass@192.168.xxx.yyy:10554/tcp/av1_1", **kwargs) # Sricam
# container = av.open("rtsp://user:pass@192.168.xxx.yyy:554/Streaming/Channels/102", **kwargs) # Hikvision
# container = av.open("rtsp://192.168.xxx.yyy:554/onvif1", **kwargs) # Sricam
container = av.open("rtsp://user:pass@192.168.xxx.yyy/stream2", **kwargs) # Tapo
for frame in container.decode(audio=0):
print(frame) This is the error:
I've also tried using the ffplay which also doesn't work:
|
Oh. I don't know if it is important, but you using VERY old ffmpeg. It's better to try 5 or 6. Can you also show SDP response from camera? For example via |
I've updated to FFMPEG 6 and I have the same issue. Here is the detailed output: Output
|
I wanted to remind you of this Pull Request. |
I don't like the idea of putting the choice of this strange and confusing option on the user. |
I get what you mean, though by automatically catching the error would take more time to start listening to events. |
Fixes an issue with some cameras that don't allow media types of type audio.
I've tried it on my Sricam camera.