21:44
I am running a script using conda environment on Windows and getting this error (stack trace below), which is apparently caused by python executable not being able to find the ffmpeg.exe. There are numerous questions about this, but none of the solutions unfortunately worked for me, so I hope someone has fresh ideas.
What I tried:
conda install -c conda-forge ffmpeg (after this I can run ffmpeg in command line, but still getting the error)
pip install ffmpeg-python
Added the folder where ffmpeg.exe is located in conda env to the Windows Path as well as to sys.path in (...)
16:19
I try following splited cli, they work well
ffmpeg -i "$input_file" -filter_complex "[0:v]trim=start=0:end=10,setpts=PTS/10[v1];[0:a]atrim=start=0:end=10,asetpts=PTS/10[a1]" -map "[v1]" -map "[a1]" -shortest -t 1 "$output_file" -y
ffmpeg -i "$input_file" -filter_complex "[0:v]trim=start=10:end=13,setpts=PTS-STARTPTS[v2];[0:a]atrim=start=10:end=13,asetpts=PTS-STARTPTS[a2]" -map "[v2]" -map "[a2]" -shortest "$output_file" -y
but when i merge them:
ffmpeg -i "$input_file" -filter_complex (...)
15:59
I'm trying to write a script to run and maintain my live stream to youtube. Once every few hours my ffmpeg output shows that every frame is the same, so stream is not working. I want to get frame number from ffmpeg output and compare it to next output.
My output:
frame=1903903 fps= 19 q=-1.0 size=50678531kB time=28:24:20.53 bitrate=4059.8kbits/s speed= 1xframe=1903915 fps= 19 q=-1.0 size=50678759kB time=28:24:21.03 bitrate=4059.8kbits/s speed= 1xframe=1903928 fps= 19 q=-1.0 size=50679013kB time=28:24:21.55 bitrate=4059.8kbits/s speed= 1xframe=1903941 fps= 19 q=-1.0 (...)
13:03
I 've a problem with ffmpeg (4.1 version, I know it is old). ffmpeg is working and suddenly stop sending packets.
I thorow the command like this:
nice -19 ffmpeg -fflags +genpts -f fbdev -r 8 -i /dev/fb0 -f mpegts udp://$STREAMER_IP:$STREAMER_PORT?pkt_size=1316
I can see the streaming on my VLC. In a moment, the stream stops. ffmpeg process is still running. Checking the ffmpeg logs I can see that time is not pgrogresing:
frame= 2135 fps=7.8 q=2.0 size= 2597kB time=00:04:26.50 bitrate= 79.8kbits/s speed=0.978x
frame= 2135 fps=7.8 q=2.0 size= 2597kB (...)
16:52
class ROSImageStream:
def __init__(self):
self.bridge = CvBridge()
self.websocket_clients = []
rospy.init_node('image_stream_node', anonymous=True)
rospy.Subscriber("/vision/image/color", Image, self.callback)
def callback(self, data):
cv_image = self.bridge.imgmsg_to_cv2(data, "bgr8")
_, jpeg = cv2.imencode('.jpg', cv_image, [int(cv2.IMWRITE_JPEG_QUALITY), 50])
Currently, I am attempting to send streaming images via WebSocket. At the moment, I am transmitting them in JPEG-to-byte format and also streaming camera (...)
16:14
I'm building a video editor where I can trim multiple clips and adjust the videos by cropping each clip. For example the first clip is centered in the middle and the second clip would be centered at the very right (for more details it's to crop a vertical format from a landscape video). And the goal is obviously to merge every clip in the end into one video.
I currently use this to trim and crop.:
// Constructing the filter string dynamically based on trim times
const filterString = metadata.trim_times.map(( start, end ) => (...)