Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- height = 240
- width = 320
- out, _ = (
- ffmpeg
- .input('in.mp4')
- .output('pipe:', format='rawvideo', pix_fmt='rgb24')
- .run(capture_stdout=True)
- )
- send = (
- ffmpeg
- .input('pipe:', format='rawvideo', pix_fmt='rgb24')
- .output('rtsp://10.0.0.37:3333')
- .run_async(pipe_stdin=True)
- )
- video = (
- np
- .frombuffer(out, np.uint8)
- .reshape([-1, height, width, 3])
- )
- send.stdin.write(video[0].tobytes())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement