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
video = av.open(url)
container = av.open(outpout_url, "w", format="rtsp", options={'rtsp_transport': 'tcp'})
stream = container.add_stream('h264')
stream.pix_fmt = 'yuv420p'
stream.options = {"preset": "ultrafast", "vcodec": "rawvideo"}
for packet in video.demux():
if packet.dts is None:
continue
for frame in packet.decode():
if packet.stream.type != 'video':
continue
print("frame = ", frame)
img = frame.to_ndarray(format='bgr24')
frame2 = av.VideoFrame.from_ndarray(img, format='bgr24')
for packet2 in stream.encode(frame2):
container.mux(packet2)
I get many noise like square
Expected behavior
the same as FFMPEG cmd
Versions
OS: Linux
PyAV runtime: 9.0.0
{{ Complete output of `python -m av --version`. If this command won't run, you are likely dealing with the build issue and should use the appropriate template. }}
PyAV build:
{{ Complete output of `python setup.py config --verbose`. }}
This discussion was converted from issue #902 on March 10, 2022 06:23.
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
-
Overview
when i use
It works well
So how can i do this by Pyav
I try:
I get many noise like square
Expected behavior
the same as FFMPEG cmd
Versions
Research
I have done the following:
Beta Was this translation helpful? Give feedback.
All reactions