

"-f", "h264", # Define pipe format to be h264 "-c:v", "copy", # Tell ffmpeg to copy the video stream as is (without decding and encoding) "-i", in_stream, # Read stream from file vid.264 "-c:v", "h264", # Tell ffmpeg that input stream codec is h264 Here is a working code sample (please read the comments): import ffmpeg

It seems like my command doesn't type appropriately.Ĭould you kindly give me some suggestion about how to deal with this problem?Īssuming you want to grab the video stream without modifying the data, you need to set different set of arguments to FFmpeg: However, after I run this program about 10 second, my console shows the warning message: max delay reached. Pipe = sp.Popen(mand, stdout = sp.PIPE, bufsize=1024**3, shell=True) "-i", "rtsp://:xxx/Streaming/Channels/101?transportmode=multicast", Here is my code: class CCTVReader(threading.Thread): I wish that I can query the data as the same format "h264" and put into a python queue in order to the future use.

The information of the live stream video is, fps:29 resolution: 1280*720. Currently, I am trying to use python with FFmpeg to query rtsp data which the original format is h264.
