support async
nice to support async ?
the ffmpeg parameter can be run using another python ffmpeg module e.g. module
typed-ffmpeg
ffmpeg-python
e.g. code
import ffmpeg
url = 'http://takemotopiano.aa1.netvolante.jp:8190/nphMotionJpeg?Resolution=320x240&Quality=Standard&Framerate=30'
output = 'rtsp_%Y_%m_%d_%H_%M_%S.mp4'
scale = 'scale = 320 : -1'
segment_time = '00:01:00'
stream = ffmpeg.input(url).output(filename = output,
vcodec = 'libx264', #acodec = 'copy',
reset_timestamps = 1,
strftime = 1,
f = 'segment',
segment_time = segment_time,
segment_atclocktime = 1,
vf = scale,
r = 25, ).overwrite_output().run_async()
to stop async
stream.terminate()
best regards
I'm not sure if I follow. You don't mean async as in await ... using asyncio, or do are you?
Your code example feels more like it will do the work in the background in a thread or something. This is out of scope of this library, because it represents a very specific use-cases, and one that can be implemented on top of imageio_ffmpeg.
I'm not sure if I follow. You don't mean async as in
await ...usingasyncio, or do are you?Your code example feels more like it will do the work in the background in a thread or something. This is out of scope of this library, because it represents a very specific use-cases, and one that can be implemented on top of
imageio_ffmpeg.
yes
objective create video continously from rtsp camera with duration that defined in segment_time parameter