19:40
I'm trying to use ffmpeg to undistort footage from a GoPro MAX. The GoPro outputs footage in the form of an LRV file, which contains both a front view and a back view (not a navigable 360 video). In other words, I'm taking one of these "180 degree" videos and undistorting it in the following manner:
ffmpeg -i FILENAME.MP4 -vf lenscorrection=cx=0.5:cy=0.5:k1=-0.535:k2=0.065 NEWFILENAME.MP4
Additional info that may help: Resolution is 704x704, Lens type appears to be Max SuperView
These k1 and k2 values appear to work decently well for undistortion, yet they result (...)
19:03
I've never used ffmpeg (in Windows Command) before and am a newbie coder so any help would be much appreciated! I have videos that were filmed with a variable frame rate of 120fps. These videos have a playback frame rate of 120fps, and I need to convert them to a playback frame rate of 30fps without resampling.
I tried running the below line of code and managed to create a file that listed a frame rate of 30fps (when I left click the file I find this info within Properties >Details) , but the length of the video (listed in Properties) had not changed, I would expect the new (...)
16:29
I'm trying to import pydub into my python program but any time I run the code it says it can't locate where ffmpeg is. I have tried everything including putting "pip install ffmpeg-python" in command prompt, juggling around the locations of the ffmpeg and python files, changing the system environment lables in PATH (although this is not saving for some reason)
I don't know what to do from here
My exact code from before would've looked like this:
import pydub
import ffmpeg
from pydub import AudioSegment
trumpet = (...)
15:56
Good afternoon, please, I really need help.
I'm putting a watermark on the video:
with tempfile.TemporaryFile("wb", delete=False, suffix=".png") as watermark_file:
watermark_file.write(buff.read())
(
ffmpeg
.input(str(path))
.output(
os.environ.get("TEMP")+f"\\\\uuid.hex_path.name",
vf=f"movie='watermark_file.name' [watermark]; [in][watermark] overlay='overlay' [out]"
)
.global_args('-copyts')
.run()
)
In a temporary folder, I create a file in which I write a watermark from (...)
15:50
What is the simplest way to add an easing function to an animation? I'm currently trying to animate a zoom value, but for some reason, it goes completely over the final zoom value i constrained it to (my easing function should output values between 0 and 1): This is the part of a bigger expression which i just cannot understand:
if(gt(in_time\\,3.7999999046325685)\\,3 - ((0.3) * (((exp((5*(it-3.80)) - 1))/(exp(5*0.80)-1))))\\,3)
Note: (exp((5*(it-3.80)) - 1))/(exp(50.80)-1))) are values between 0 and 1 for the animation duration of 0.8 seconds, however the resulting zoom goes (...)
12:41
What steps are needed to stream RTSP from FFmpeg?
Streaming UDP is not a problem, but as I want to stream to mobile devices which can natively read RTSP streams, I couldn't find any setup which tells what exactly is needed. Do I need an RTSP streaming server like LIVE555 or can I use FFmpeg only?
My Command:
ffmpeg -i space.mp4 -vcodec libx264 -tune zerolatency -crf 18 -f rtsp -muxdelay 0.1 rtsp://192.168.1.200:1234
I get an Input/Output error.
Do I need a SDP description to use RTSP?
And if yes where do I have to put (...)
05:38
When I make the next upload, if the duration of the clip is very short it generates a corrupt file and if it is a little longer, for example 19 seconds, it generates a file that starts from second 8
const passThroughStream = new PassThrough();
const response = await new Promise((resolve, reject) =>
const command = ffmpeg()
.input(`$import.meta.env.BUCKET_URL$m3u8S3`)
.inputOptions([`-ss $TIME_OFFSET`])
.outputOptions([`-t $end - start`, '-c:v libvpx', '-c:a libvorbis', '-f webm'])
.on('start', (commandLine) => (...)
05:53
I tried to use QSV hardware decoding under ffmpeg, using the integrated graphics 730 on my computer. Here's the code I used to initialize the decoder
const AVCodec* codec = NULL;
int ret;
int err = 0;
// Create the QSV hardware device.
ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_QSV, "auto", NULL, 0);
if (ret < 0)
char error_string[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(error_string, AV_ERROR_MAX_STRING_SIZE, ret);
LError("Error creating QSV device: ", error_string);
return NULL;
// (...)
03:19
i've been trying to create a transport stream using FFMPEG, when i tried it in VLC it was working immediately, however when i stream from FFMPEG to VLC i can't get it to work, here's my string:
ffmpeg -re -i http://ip-of-shoutcast-stream:port?listen -c:a aac -b:a 128k -ar 44100 -ac 2 -vn -f mpegts udp://ip-of-destination-pc:1234?pkt_size=1316
In VLC i use the same network source i used when VLC was streaming in the main PC:
udp://ip-of-main-pc:1234
But it doesn't play or show any errors, the orange bar only goes back and (...)
03:21
I'm using FFMPEG to convert to stream to UDP local network but not able unless I define pkt_size
ffmpeg -re -i test.mp4 -f mpegts udp://127.0.0.1:23000?pkt_size=1316
Is there a way or work around to omit that option? I have an device encoder aplication without pkt_size option. So only if pkt_size is defined (and equal) VLC is able to capture.
I want VLC to work this way if possible
ffmpeg -re -i test.mp4 -f mpegts udp://127.0.0.1:23000 (...)