22:42
I'm working on a Discord bot that connects to a voice channel, listens to the audio, and sends it to a WebSocket server. Initially, everything works fine, but after some time, the bot freezes and stops sending/receiving audio buffers. After a certain period, the bot stops processing audio. There are no errors thrown, but the audio buffers stop being sent and received. Here are the key parts of the code I use to handle the connection and audio processing:
let count = 0;
await entersState(connection, VoiceConnectionStatus.Ready, 30000);
const player = (...)
22:10
I have a webcam video recorder program built with python, opencv and ffmpeg
It works ok except that the color of the video is more blue than the reality. The problem seems to come from color format of images.
It seems that OpenCv is giving BGR images and ffmpeg+libx264 is expecting YUV420p. I've read that YUV420p correspond to YCbCr.
opencv has no conversion from BGR to YCbCr. It only has a conversion to YCrCb.
I have made some searchs and tried different alternatives to try converting opencv image to something that could be ok for (...)
21:33
I'm working on a Discord bot that connects to a voice channel, listens to the audio, and sends it to a WebSocket server. Initially, everything works fine, but after some time, when I try to reconnect after losing the connection, I encounter `AbortError` repeatedly. Despite several attempts to handle this error, the problem persists. The error occurs during the reconnection attempts. Here is the error message I keep receiving:
Attempting to reconnect: Try 1 of 5Reconnect attempt 2 failed: AbortError: The operation was abortedat EventTarget.abortListener (node:events:1008:14)at (...)
15:20
I am constructing complexFilters to procedurally generate audio with ffmpeg via fluent-ffmpeg. The interesting part of my fluent-ffmpeg complex filters look like:
"filter": "volume",
"options":
"volume": "min(1, max(0, ((cos(PI * t * 1 / 13) * 1 + cos(PI * t * 1 / 7) * 0.5 + cos(PI * t * 1 / 3) * 0.25) +
-0.5 ) * 0.75 * -1 + 0.5))",
"eval": "frame"
,
"inputs": "track_1_output",
"outputs": "track_1_adjusted"
,
Note that I am using an expression to determine the volume dynamically. To simplify my tests, I'm (...)
14:16
I am trying to build a tool where people can position their subtitles on an HTML5 video and then I will burn the subtitles into the video for them.
I can easily get the position of the subtitles, in whatever format I need, that's easy. However, no combination of values that I feed to ffmpeg are working.
My holy grail is an x and y offest (aka offset 5% from the left, 10% from the bottom, in terms of video height/width).
To achieve this, I would like the subtitles to start in the very bottom-left corner.
ffmpeg -y -i english.mp4 -vf (...)
10:00
How would I go about getting a list of all the file extensions supported by FFmpeg for use in an ExtensionFilter used by FileChooser in JavaFX?
I am familiar with the "-codecs" and "-formats" options from FFmpeg, but these list the format and codec names which do not necessarily coincide with their file extensions.
e.g. (partial output from "ffmpeg -formats")
D aac raw ADTS AAC (Advanced Audio Coding)
DE ac3 raw AC-3
E matroska Matroska
parsing aac and ac3 from the output of ffmpeg would work fine to create file extensions for those (...)
09:28
I have a bash script, now I need to convert it to bat.
What the script does is based on the shortcut the script checks the audio codec and video codec using ffprobe and then loops through all the files in the folder to convert the file(s) using the presets based on which one the shortcut calls.
It also limits the processor usage before running ffmpeg.
Here's the script:
#!/bin/sh
FILES="/home/red/Downloads/to_convert/*"
to_convert="/home/red/Downloads/to_convert"
TYPE="$1"
#echo "$TYPE"
if [ -e '/tmp/convert.txt' ]; then
echo (...)
03:46
I am procedurally constructing complexFilters for ffmpeg via fluent-ffmpeg. My fluent-ffmpeg complex filters look like:
"filter": "volume",
"options":
"volume": "min(1, max(0, ((cos(PI * t * 1 / 13) * 1 + cos(PI * t * 1 / 7) * 0.5 + cos(PI * t * 1 / 3) * 0.25) +
-0.5 ) * 0.75 * -1 + 0.5))",
"eval": "frame"
,
"inputs": "track_1_output",
"outputs": "track_1_adjusted"
,
Note that I am using an expression to determine the volume dynamically.
Here I'm testing on the command line, to understand the (...)