You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am trying to use PyAV to open (listen for) rtmp stream. My code is:
import av
print("opening video...")
container = av.open("rtmp://127.0.0.1:12345", options={'listen': '1'})
print("running test")
for packet in container.demux():
for frame in packet.decode():
print("frame", frame)
and I stream to it with ffmpeg -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -f flv rtmp://127.0.0.1:12345
or OBS studio, does not matter. I always get:
At the same time when I use ffmpeg to open (listen for) stream with ffmpeg -listen 1 -i rtmp:/127.0.0.1:12345 1.mp4 no errors happen, everything goes ok. ffmpeg is able to receive stream and save to 1,mp4
This discussion was converted from issue #1245 on March 03, 2024 04:25.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, I am trying to use PyAV to open (listen for) rtmp stream. My code is:
and I stream to it with
ffmpeg -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -f flv rtmp://127.0.0.1:12345
or OBS studio, does not matter. I always get:
opening video...
Unexpected stream , expecting 127.0.0.1:12345
Unexpected stream , expecting 127.0.0.1:12345
Segmentation fault
At the same time when I use ffmpeg to open (listen for) stream with
ffmpeg -listen 1 -i rtmp:/127.0.0.1:12345 1.mp4
no errors happen, everything goes ok. ffmpeg is able to receive stream and save to 1,mp4Beta Was this translation helpful? Give feedback.
All reactions