Guest8365 has quit [Read error: Connection reset by peer]
bitbinge has joined #ffmpeg
QuackDoc has joined #ffmpeg
lemourin5 has joined #ffmpeg
lemourin5 is now known as lemourin
thilo has quit [Ping timeout: 245 seconds]
thilo has joined #ffmpeg
vincejv has quit [Ping timeout: 264 seconds]
user23 has quit [Remote host closed the connection]
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
LionEagle has quit [Ping timeout: 260 seconds]
Haxxa has quit [Ping timeout: 246 seconds]
lemourin has quit [Read error: Connection reset by peer]
Jhonny2x4 has quit [Quit: WeeChat 4.1.2]
lemourin has joined #ffmpeg
Tinos has joined #ffmpeg
Tano has quit [Quit: WeeChat 4.0.4]
Keshl has quit [Ping timeout: 255 seconds]
Keshl has joined #ffmpeg
navi has quit [Quit: WeeChat 4.0.4]
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
minimal has quit [Quit: Leaving]
lusciouslover has quit [Ping timeout: 276 seconds]
lusciouslover has joined #ffmpeg
waleee has quit [Ping timeout: 264 seconds]
emmanuelux has quit [Quit: au revoir]
jtgd has quit [Quit: WeeChat 4.1.2]
jtgd has joined #ffmpeg
bitbinge has quit [Ping timeout: 240 seconds]
Haxxa has joined #ffmpeg
praise_the_sun has quit [Quit: Client closed]
vincejv has joined #ffmpeg
<Sketch>
i have some saved streams where the video gets desynced from the audio aftter some time. like half of the file will play fine, then the video just starts playing at like 10x speed and ends way before the audio.
<Sketch>
i was googling for ways to fix this and saw some stuff about using -video_pts audio but it seems like that option doesn't exist anymore? am i missing something?
AbleBacon has quit [Read error: Connection reset by peer]
praise_the_sun has joined #ffmpeg
Keshl has quit [Read error: Connection reset by peer]
Keshl_ has joined #ffmpeg
nate has quit [Quit: moo]
nate has joined #ffmpeg
vincejv has quit [Ping timeout: 240 seconds]
HarshK23 has joined #ffmpeg
epony has quit [Remote host closed the connection]
elastic_dog has quit [Quit: elastic_dog]
elastic_dog has joined #ffmpeg
epony has joined #ffmpeg
irc_user has joined #ffmpeg
Keshl_ is now known as Keshl
nigetilly has joined #ffmpeg
stevenliu has joined #ffmpeg
stevenliu_ has quit [Ping timeout: 264 seconds]
epony has quit [Remote host closed the connection]
lexano has quit [Ping timeout: 245 seconds]
lexano has joined #ffmpeg
rv1sr has joined #ffmpeg
Jhonny2x4 has joined #ffmpeg
YuGiOhJCJ has joined #ffmpeg
vincejv has joined #ffmpeg
hjckr has joined #ffmpeg
ivanich has joined #ffmpeg
irc_user has quit [Quit: Connection closed for inactivity]
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
TheSilentLink has quit [Ping timeout: 252 seconds]
nigetilly has quit [Remote host closed the connection]
nigetilly has joined #ffmpeg
nigetilly has quit [Ping timeout: 240 seconds]
Jibwood has joined #ffmpeg
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
irc_user has joined #ffmpeg
fling has quit [Remote host closed the connection]
Ogobaga has quit [Remote host closed the connection]
<antto>
"User is required to call avformat_free_context() to clean up the allocation by avformat_new_stream()"
<antto>
great, but this returns (allocates) an AVStream, while avformat_free_context() deallocates an AVFormatContext
ACI-XCIX_0001 has joined #ffmpeg
ACI-XCIX_0001 has quit [Quit: Client closed]
ACI-XCIX_0001 has joined #ffmpeg
QuackDoc has quit [Remote host closed the connection]
lavaball has joined #ffmpeg
bitbinge has quit [Ping timeout: 240 seconds]
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Tinos has quit [Quit: Client closed]
FH_thecat has quit [Quit: Leaving]
Vonter has quit [Ping timeout: 268 seconds]
Vonter has joined #ffmpeg
bitbinge has joined #ffmpeg
FH_thecat has joined #ffmpeg
LionEagle has joined #ffmpeg
<klaxa>
antto: i think the interpretation here is that when you call avformat_new_stream() you receive a pointer to a newly allocated stream which is also stored in AVFormatContext and calling avformat_free_context() on the context will take care of freeing the streams (c.f.: https://ffmpeg.org/doxygen/trunk/avformat_8c_source.html#l00146 )
<antto>
well i left that out
irc_user has quit [Quit: Connection closed for inactivity]
<antto>
i got *some* audio now in the .mp4, but it's encoded as 44100, and i never have "44100" anywhere
<antto>
thus the result is only slowed-down and torn-apart audio in the left channel only
<hacksenwerk>
When I use ffplay -nodisp -loglevel quiet -f lavfi -i 'sine=f=1025 the tuner shows me 1024,09 Hz ...
<hacksenwerk>
ffplay -nodisp -loglevel quiet -f lavfi -i 'sine=f=432' and the tuner shows 431,61 Hz ... >:(
bitbinge has quit [Ping timeout: 240 seconds]
<antto>
hacksenwerk, does your tuner measure frequency via FFT?
<hacksenwerk>
antto: Hey. I don't know what that even means. :)
<antto>
transforms the audio into a spectre (like a spectro-scope), and measures a frequency out of that
<hacksenwerk>
It can do several things "Optional strobe or musical staff display"
<hacksenwerk>
That's from the github page I linked above.
<antto>
you can measure it yourself
<hacksenwerk>
antto: What do you mean?
<antto>
open the "tone" in a wave editor, zoom in and set the cursor at for example an up-going zero-crossing, then select from there to several cycles later the same zero-crossing
<antto>
make sure it's a lot, like more than 10 ;P~
<antto>
count how many are selected, then, somewhere in your sound editor you should be able to see how long (in number of samples) the selection is
<hacksenwerk>
antto: wave editor? So I save the sine as a file and open it with audacity for example?
rvalue has quit [Ping timeout: 245 seconds]
<antto>
the longer you measure such a stable tone, the more accurate the measurement will be
<antto>
yes
<hacksenwerk>
The tuner __is__ accurate.
<hacksenwerk>
ffmpeg isn't
<antto>
the tuner seems to be written in java, and i saw FFT in it ;P~
<antto>
paint me skeptical
<hacksenwerk>
the online tone generator is accurate, also other online generators and even youtube reference videos, only when I produce the sine with ffmpeg it's not
<hacksenwerk>
Tuner is in java and html yes, as it is written on the git
<antto>
no clue what ffmpeg does
<antto>
i see it likes doing integer math a lot tho
<antto>
measure it in a wave editor
<antto>
or send me the file i'll measure it
<hacksenwerk>
The file I produced with ffmpeg? You can create one yourself in a second...
<antto>
i'm not a ffmpeg-CLI-h4x0r at all
<hacksenwerk>
Me neither ;), here's the command: ffmpeg -f lavfi -i 'sine=f=1024:d=10' sine_1024hz.flac
<hacksenwerk>
That creates a flac file of a sine sound with 1024 Hz and a duration of 10 seconds.
hacksenwerk is now known as Guest6661
hacksenwerk has joined #ffmpeg
rvalue has joined #ffmpeg
<hacksenwerk>
antto: Sorry was kicked out because of internet connection problems...
<antto>
wtf
<hacksenwerk>
antto: what?
Guest6661 has quit [Ping timeout: 252 seconds]
<antto>
my mistake
<antto>
for 30 cycles i get 1023.9938..
fling_ has joined #ffmpeg
hussein1 has quit [Ping timeout: 240 seconds]
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
<hacksenwerk>
And what does that mean?
hussein1 has joined #ffmpeg
fling has quit [Ping timeout: 240 seconds]
<antto>
it means 30 cycles is too little ;P~
<antto>
but FFT can be a sketchy way to measure a steady tone's frequency
<antto>
do you see those horizontal "white" lines near the bottom?
<hacksenwerk>
yes
<antto>
that is a bass line
<antto>
measuring its frequency from this means you have to sorta tell me at what vertical coordinate this thick white line is
<antto>
i know the frequency of each pixel
<antto>
and then some interpolation
<antto>
this is NOT very accurate, especially if not done carefully
<antto>
and i think your tune does basically that
fling_ is now known as fling
<antto>
in fact, that tuner probably uses true FFT, which would be worse
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away, and yet it always breaks free.]
<hacksenwerk>
... so why it shows me 1024 Hz when I use __any__ online generator or a video but not ffmpeg?
<antto>
1024Hz is a low-ish frequency
<hacksenwerk>
That online tone generators produse 1024 Hz and the tuner shows me 1024 Hz. If it does not show 1024 Hz when I produce 1024 Hz with ffmpeg, than ffmpeg does not produce 1024 Hz.
<hacksenwerk>
Or is ffmpef correct and __all__ online tone generators and youtube reference videos for pitching and tuning are incorrect?
<hacksenwerk>
That seems not very likely don't you agree?
<antto>
well, i just generated a 1024 tone with audacity, inverted it, and for those 10 seconds it cancels out with the ffmpeg sine wave
<antto>
so i wonder if ffmpeg and audacity are "wrong" the same way ;P~
<hacksenwerk>
antto: So you produce a sine on the same device with the same hardware but two different "front ends" for that hardware... that's not very scientific...
<antto>
hardware?!
<antto>
why do you think the hardware matters here?
<hacksenwerk>
Several online tone generators means several different sources
<antto>
sure
<hacksenwerk>
antto: How does ffmpeg and audacity produce the sine?
<hacksenwerk>
With your hardware.
<antto>
my hardware is irrelevant
<hacksenwerk>
Same system, same results. when same way of doing it.
<antto>
they both do it in software
<antto>
at worst case, audacity might do it via using ffmpeg, but i hope not ;P~
minimal has joined #ffmpeg
<hacksenwerk>
Anyway this leads to nothing here... I compared that tuner with very expensive tuners from other musicians and it is correct. I don't think that Korg for exmaple produces shitty tuners...
<antto>
if you think the online tone generator gives a sine wave from a different hardware source - you're wrong
<hacksenwerk>
ffmpeg is faulty here. That's it.
<antto>
those would run on your computer too, just different software
<hacksenwerk>
antto: And the youtube videos?
<antto>
you're almost gonna make me write a program that generates a wav with 1024Hz sine wave
<antto>
but really, measuring frequency out of FFT is gonna be sensitive to certain things
<antto>
measuring the zero-crossings is sensitive to other things
MisterMinister has joined #ffmpeg
<antto>
for a steady long tone i'd choose the zero-crossings
<antto>
but 30 cycles is too short
<antto>
measure the number of zero crossings for like 1 second
Jhonny2x4 has quit [Read error: Connection reset by peer]
<antto>
that should be 1024 ;P~
navi has quit [Ping timeout: 246 seconds]
Jhonny2x4 has joined #ffmpeg
<antto>
there is a matching zero-crossing sample on the 44100th sample in the file
<antto>
COINCIDENCE? ;P~
navi has joined #ffmpeg
<hacksenwerk>
can you please confirm: 18:14 <hacksenwerk> [quote here] ?
<antto>
so, i could speculate that that's the 1024th cycle, and then the math goes like 44100/(44100/1024) == 1024
<antto>
you know what i "love" ?
<antto>
when your measuring device is f*cking with you
<antto>
happens too often
<hacksenwerk>
I'm not into such kinks.
bitbinge has joined #ffmpeg
<hacksenwerk>
Anyway gtg. Bye.
hacksenwerk has left #ffmpeg [#ffmpeg]
<antto>
and that's how myths are born
hendry has joined #ffmpeg
Jhonny2x4 has quit [Ping timeout: 240 seconds]
Jhonny2x4 has joined #ffmpeg
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
<znf>
Is there any way of limiting a ffmpeg process RSS size? ulimit seems to only limit RSS on linux 2.4, and then it doesn't do it anymore
<znf>
specifically, I have a bash script that spawns an ffmpeg process that takes input from stdin, outputs on stdout; this works fine for most of the time, but like 2-3 times a week, I have a "runaway" ffmpeg process that just eats up 8-10GB RSS
Jhonny2x4 has quit [Read error: Connection reset by peer]
<furq>
use cgroups or rlimit vm size instead
<furq>
but it sounds like you should actually figure out what's causing the issue
theobjectivedad has quit [Remote host closed the connection]
<znf>
I'm really not sure what's causing the issue
<znf>
There's about 30-40 ffmpeg processes running
<znf>
And there's no discernable pattern on why a random one goes nuts
theobjectivedad has joined #ffmpeg
<znf>
They process some dvb-c streams, fed by tvheadend, and so far every time it happened, it happened on a different channel
<BtbN>
you can limit it via cgroups. But the result will just be that the process gets killed, not that it just will stop using RAM
<znf>
I'm trying to figure out how to use cgroups, but I'm unsure about how the hierarchy works, seems like I'd have to make a cgroup for each process that gets spawned, because I want to limit each at 1GB RSS
<BtbN>
easiest way is probably to just use systemd-run
<furq>
yeah
<furq>
or use prlimit
<znf>
I'm not entirely sure systemd-run would handle my stdin/stdout properly in the context of feeding data to/from ffmpeg, you think it won't mind?
<znf>
looking into prlimit
<BtbN>
You'd have to spawn a shell and do stuff in that
<BtbN>
bit messy, but far from impossible
<BtbN>
probably will need to do the same with anything that sets up cgroups
<znf>
I'm already spawning a shell from tvheadend, which spawns ffmpeg, not sure how that will work out
<furq>
if you're doing all that in the script then just systemd-run the script
<znf>
how would systemd-run like to be spawned from a service that already uses systemd?
<BtbN>
It will run stuff as a new service no matter what
<znf>
cool, let's see
<furq>
it's intended to just run one-off stuff
<BtbN>
It creates an ephermal service for anything it runs though
<BtbN>
there will not be a user daemon running for a system user
<znf>
aaand nope
<znf>
Failed to create bus connection: No such file or directory
<znf>
:-/
<another|>
dbus
<BtbN>
Not dbus, there simply is no user-daemon for every system user
<BtbN>
only actual users get one, and by default also only when they log in via pam
<znf>
so... is there an actual solution without giving the user sudo rights?
<BtbN>
try running it as a proper user, and enable lingering for the user session
<znf>
it's a headless system, not a fan of that :D
<BtbN>
Then the answer is simply: You can't do that.
<BtbN>
Not sure what it being headless or not got anything to do with that though
<znf>
well, I'd have to move the app to a "real" user
<znf>
and then running it manually?
<BtbN>
Why manually?
<BtbN>
Just change the user
<BtbN>
or turn the one it uses into one that actually has a session
<znf>
I have no idea how to do that
<znf>
what does "having a session" mean in this case?
<BtbN>
it needs a user daemon, which is spawned as part of the user session
<BtbN>
which is spawned on login, or on boot if you enable lingering for that user
<BtbN>
And then you need to set some magic env vars for systemctl and friends to actually find that daemon if you try to access it from outside a login session
<znf>
and I'm assuming it also requires a >1000 UID
<BtbN>
I doubt it cares
<znf>
At this point I'm wondering if it's just easier to iterate over all ffmpeg pids and stuck them in a cgroup
<znf>
systemd user stuff confuses the hell out of me
<BtbN>
you could write a suid root program that moves the calling process to a pre-determined cgroup
<BtbN>
Problem is: the memory limit is per cgroup
Muimi has joined #ffmpeg
Muimi has quit [Client Quit]
<BtbN>
But I don't see the issue with just setting up a proper user session
<znf>
I'm honestly not familiar with anything about user sessions and dbus and user services, it's something that I never really needed; I've always seen dbus stuff as a strictly desktop thing that I never really cared about, so that's a lot to take in
<BtbN>
Just enable lingering and set that one XDG var, and see if it just works?
<BtbN>
I forgot the variable, but it should be all over google in regards to systemctl not being able to find the daemon
<znf>
mkay, let me see
<znf>
yeah, tvheadend doesn't really like me appending env vars to it's command line
AbleBacon has joined #ffmpeg
<znf>
I could alter the service to set that env var, but that means restarting a lot of streams
<znf>
guess I'll do it later
<znf>
oh wait, can I use -E I wonder
<znf>
nope
lavaball has quit [Remote host closed the connection]
<BtbN>
hm? Just add the variable to the services Environment
<znf>
yeah, but I need to restart the parent service for that
<BtbN>
yes, once
<znf>
yeah, I can't do it at this hour, I can do it later tough :)
<znf>
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/113/bus" -- this works
<znf>
> However, Ubuntu supports cgroupv2 only with version 21.10 or greater and before that your memory limit will fail silently – the program will start but it's memory usage is not limited at all.
<znf>
Ah, crap.
<znf>
I'm on 20.04
<znf>
but wait, I'm on 5.13
<BtbN>
what?
<znf>
no worky :(
<BtbN>
I have no idea what any of the things you just listed got to do with one another
<znf>
Someone on SO says that Ubuntu only supports cgroups v2 starting with Ubuntu 21.10
lucasta has joined #ffmpeg
<znf>
And I'm on 20.04 on this machine
<BtbN>
Isn't anything before that long irrelevant anyway?
<BtbN>
That OS is 4 years old
<znf>
no, 20.04 has support until 2025
<BtbN>
well, good time to update
<znf>
Update wouldn't be an issue. Building a custom kernel, again, is an issue :-/
<BtbN>
It got very little to do with the kernel
<znf>
Just systemd, you think?
<BtbN>
no, the used cgroup layout
<znf>
I'm not sure what that means - if it's not the kernel, and not systemd, then what decides the cgroup layout?
<BtbN>
Whoever mounts them
<BtbN>
The kernel supports v2 since a very long time
<BtbN>
userspace just took a while to catch up
Sakura`Kinomoto has quit [Ping timeout: 245 seconds]
Sakura`Kinomoto has joined #ffmpeg
Traneptora has joined #ffmpeg
SakuraChan has joined #ffmpeg
Sakura`Kinomoto has quit [Ping timeout: 246 seconds]