BtbN changed the topic of #ffmpeg to: Welcome to the FFmpeg USER support channel | Development channel: #ffmpeg-devel | Bug reports: https://ffmpeg.org/bugreports.html | Wiki: https://trac.ffmpeg.org/ | This channel is publically logged | FFmpeg 7.0 is released
Magissia has joined #ffmpeg
Dagger has quit [Ping timeout: 246 seconds]
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Dagger has joined #ffmpeg
mrelcee has quit [Quit: I want Waffles!]
mrelcee has joined #ffmpeg
gothicserpent has quit [Quit: gothicserpent]
gothicserpent has joined #ffmpeg
FlorianBad has joined #ffmpeg
Muimi has joined #ffmpeg
fling has quit [Remote host closed the connection]
fling has joined #ffmpeg
minimal has quit [Quit: Leaving]
FlorianBad has quit [Remote host closed the connection]
FlorianBad has joined #ffmpeg
iive has quit [Quit: They came for me...]
lavaball has quit [Remote host closed the connection]
ursa has quit [Ping timeout: 260 seconds]
Kruppt has quit [Quit: Leaving]
yans has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Dotz0cat has quit [Quit: ZNC 1.8.2 - https://znc.in]
billchenchina has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
Suchiman has quit [Quit: Connection closed for inactivity]
Vonter has joined #ffmpeg
fling has quit [Remote host closed the connection]
fling has joined #ffmpeg
MisterMinister has quit [Ping timeout: 265 seconds]
<intrac> can anyone confirm if there's a way to stop Ffmpeg using more than n megabytes of RAM? (if it goes above this it would quit and ideally restart)?
FlorianBad has quit [Remote host closed the connection]
<intrac> I sometimes have issues with it suddenly and unexpectedly using large amounts of memory
<intrac> it's transcoding video from two CCTV cameras and I wonder if glitches in the streams might then lead to this
<intrac> it arbitrarily starts using about 1 or 2 MB/sec of RAM
System_Error has quit [Ping timeout: 260 seconds]
rvalue- has joined #ffmpeg
rvalue has quit [Ping timeout: 248 seconds]
rvalue- is now known as rvalue
FlorianBad has joined #ffmpeg
StephenLynx has quit [Quit: Leaving]
lusciouslover has quit [Ping timeout: 260 seconds]
<furq> intrac: ulimit -v on *nix
<furq> but you should probably debug the issue
<intrac> furq: thanks
<intrac> yeah, I'll see if I can narrow down the cause if I have some time
<furq> at a guess one of the sources' timestamps is drifting away from the other one and some buffer is growing indefinitely
<furq> or your encode isn't keeping up with the sources but you'd probably have noticed that
<furq> actually if it happens suddenly then it's probably not the second thing
rvalue has quit [Ping timeout: 252 seconds]
<intrac> furq: it seems to happen gradually over time
<intrac> background; I have two IP CCTV cameras, which I take the streams from, resize down to a lower quality, use filter_complex to arrange them on a single frame (top/botton) and add a timecode
<intrac> if one of the cameras becomes inaccessible or the network connection goes down (and can't be re-established by ffmpeg)
<intrac> then often ffmpeg will keep using up RAM until it brings the system to a halt
<intrac> although that isn't what I experienced a few hours ago; in that example, both cameras appeared to be streaming ok, but ffmpeg's RAM use was slowly going up at about 1 or 2 MB/sec
<intrac> and had got to just over 900MB before I stopped it
<intrac> I restarted it. it's a few hours since then and the RAM usage seems stable at about 140 MB
<intrac> these are two RTSP streams from the cameras
<intrac> getting late here. will look at this another day.
<intrac> thanks for the other suggestions :)
rvalue has joined #ffmpeg
Krusher has joined #ffmpeg
evilscreww has joined #ffmpeg
rv1sr has joined #ffmpeg
ursa has joined #ffmpeg
cmc has quit [Remote host closed the connection]
cmc has joined #ffmpeg
flotwig has quit [Ping timeout: 248 seconds]
evilscreww has quit [Ping timeout: 250 seconds]
flotwig_ has joined #ffmpeg
rsx has joined #ffmpeg
coldfeet has joined #ffmpeg
Suchiman has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
yssh has joined #ffmpeg
billchenchina- has joined #ffmpeg
billchenchina has quit [Read error: Connection reset by peer]
meinside has quit [Quit: Connection closed for inactivity]
Blacker47 has joined #ffmpeg
yssh has quit [Quit: Client closed]
YuGiOhJCJ has joined #ffmpeg
jemius has joined #ffmpeg
billchenchina- has quit [Quit: Leaving]
flom84 has joined #ffmpeg
flom84 has quit [Client Quit]
lavaball has joined #ffmpeg
coldfeet has joined #ffmpeg
jprjr has quit [Ping timeout: 248 seconds]
jprjr has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
Kroko has joined #ffmpeg
jemius has quit [Quit: Leaving]
Fischmiep has quit [Read error: Connection reset by peer]
Fischmiep has joined #ffmpeg
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Kroko has quit [Remote host closed the connection]
emanuele6 has quit [Quit: WeeChat 4.4.3]
emanuele6 has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 276 seconds]
EmleyMoor has joined #ffmpeg
System_Error has joined #ffmpeg
cmc has quit [Ping timeout: 260 seconds]
cmc has joined #ffmpeg
<bpmedley> intrac: It's also common to have a watchdog cronjob simply kill a process if it consumes too many resources.
coldfeet has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
EmleyMoor has quit [Ping timeout: 252 seconds]
Krusher has quit [Read error: Connection reset by peer]
EmleyMoor has joined #ffmpeg
StephenLynx has joined #ffmpeg
\\Mr_C\\ has joined #ffmpeg
wyatt8740 has quit [Ping timeout: 252 seconds]
Marth64 has joined #ffmpeg
wyatt8740 has joined #ffmpeg
billchenchina has joined #ffmpeg
buzel has quit [Ping timeout: 265 seconds]
<KillerWasp> av_err2str() can't be used in C++, give: "error: se toma la dirección de la matriz temporal"
<JEEB> try with LC_ALL=C.UTF-8 ?
<JEEB> if you are not utilizing extern "C"
<KillerWasp> JEEB: thanks.
billchenchina- has joined #ffmpeg
lusciouslover has joined #ffmpeg
billchenchina has quit [Ping timeout: 245 seconds]
lavaball has joined #ffmpeg
flom84 has joined #ffmpeg
flom84 has quit [Remote host closed the connection]
billchenchina has joined #ffmpeg
billchenchina- has quit [Ping timeout: 264 seconds]
stolen has joined #ffmpeg
rsx has quit [Quit: rsx]
minimal has joined #ffmpeg
luva has quit [Read error: Connection reset by peer]
luva has joined #ffmpeg
jemius has joined #ffmpeg
buzel has joined #ffmpeg
<KillerWasp> I've been programming ffmpeg for a week and I still haven't achieved anything. I have a broken junk program right now, which is supposed to send a green still image with a yellow cross to the video channel directly from Twitch at a 30fps stream, and Twitch is still dead without showing anything.
<psykose> that's not true, you got halfway to a working program and learnt some stuff
<psykose> :)
luva has quit [Ping timeout: 252 seconds]
luva has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 265 seconds]
psykose has quit [Remote host closed the connection]
System_Error has quit [Remote host closed the connection]
kupi has joined #ffmpeg
<kupi> hi, how can I convert a video into 1 bit color depth?
Magissia has quit [Ping timeout: 252 seconds]
<kupi> I found -pix_fmt monob but could not find a video format supporting that
System_Error has joined #ffmpeg
stolen has quit [Quit: Connection closed for inactivity]
<kepstin> what do you intend to do with the video after converting it to mono?
MisterMinister has joined #ffmpeg
billchenchina has quit [Remote host closed the connection]
jemius has quit [Quit: Leaving]
<kupi> kepstin: converting it a format which is small as possible and can be played smoothly
<kupi> I suceeded with this: ffmpeg -i input.mp4 -pix_fmt monow -an -c:v rawvideo output.avi
<kepstin> "as small as possible" usually means a lossy encoder, and no lossy encoders work with true mono data
<kupi> but ironically converting it back to h265 it became bigger
<kepstin> that's not really surprising, modern video codes are designed to get good lossy compression on stuff that looks like natural video
<kepstin> just compress with a modern lossy encoder, and set the bitrate or quality level down until the file size is in the range you want. that's pretty much all there is to it.
<kepstin> denoising the video before encoding, and downscaling it to lower res might help in some circumstances.
<furq> i don't think any video encoders support monob/monow
<kepstin> could do... a series of png frames i guess? :/
<kepstin> but it sounds like kupi doesn't want mono video, just small video.
luva has quit [Read error: Connection reset by peer]
<johnjaye> i've also been programming ffmpeg for a week and feel like i'm 50% of the way to cracking the abstract code of how to use the command line options and filter_complex syntax.
luva has joined #ffmpeg
<johnjaye> the extremely unintuitive name=x=2:y=3 syntax took awhile to get used to
<furq> i guess apng might work
<kupi> I want a small video of a monochrome video
<furq> you could also just -vf format=monow,format=gray8 and then use an actual video codec
<kupi> my friend made a custom format for which he claims it fits into 3MB lossless
<kupi> so I am researching if there is already one which does htat
<furq> the rle codecs would probably do well with that
XdaddyZX_ has quit [Quit: Connection closed for inactivity]
<furq> try -vf format=monow,format=gray8 -c:v qtrle
<kepstin> i'd wonder if this was trying to find the best way to compress bad apple, but bad apple isn't actually monochrome; some scenes have greyscale effects.
<furq> maybe -vf format=monow,format=pal8 -c:v msrle
<furq> or just gray8 and ffv1 because it'll probably turn out that's way better
<kupi> current record is ffmpeg -i input.mp4 -an -vf format=gray8 -c:v libx265 -preset slow -crf 30 outputgray8.mp4
<kupi> but still twice as big as my friends format
luva has quit [Quit: Byebye]
<kupi> kepstin: exactly
luva has joined #ffmpeg
<kupi> doesn't monochrome mean shades of black and white?
<kepstin> in computer stuff, "monochrome" generally refers to 1-bit video, where every pixel is either "on" or "off"
Blacker47 has quit [Quit: Life is short. Get a V.90 modem fast!]
<kupi> his custom format is monochrome, the goal was to do not lose quality besides converting to monochrome
<kepstin> if you have shades, it's generally referred to as "grayscale" instead (and many lossy codecs including h.265 do support grayscale)
<kepstin> also note that the original video for bad apple was a lossy encode, which makes things harder, since it already has some encoding artifacts in it.
ttys000 has quit [Ping timeout: 246 seconds]
<kupi> yeah, that is why I thought converting it to a lossless monochrome video might help
ttys000 has joined #ffmpeg
<kepstin> honestly, for this particular case, converting the video to 1-bit, then back to gray/pal8 then with an animation format that supports RLE probably wouldn't be terrible.
<kepstin> furq mentioned msrle and qtrle, but even gif might work. And yeah, might as well try ffv1 too.
crossby1004 has joined #ffmpeg
crossby1004 has quit [Max SendQ exceeded]
crossby1004 has joined #ffmpeg
Marth64 has quit [Quit: Leaving]
<kupi> tried msrle and qtrle but the file size was big
<kupi> monow worked for gif but produced 18mb
<kupi> also idk why but monow produces white pixels in places where it does not supposed to be
<kupi> is there a way to disable dithering?
<furq> -sws_dither none
<furq> if this is from a lossy source then maybe also mess with contrast and deblocking
<kupi> I did this but there is still dithering ffmpeg -i input.mp4 -an -vf format=monow -sws_dither none output.avi
crossby1004 has quit [Remote host closed the connection]
EmleyMoor has joined #ffmpeg
crossby1004 has joined #ffmpeg
MRiddickW has joined #ffmpeg
llrcombs is now known as rcombs
JanC has joined #ffmpeg
JanC is now known as Guest6054
<kepstin> keep in mind that just because the original is lossy and has some shading / anti-aliasing in it, even a straight threshold without dithering will probably have some rough edges and stray pixels here and there.
Everything has joined #ffmpeg
vampiref- is now known as vampirefrog
JanC has joined #ffmpeg
JanC has quit [Killed (calcium.libera.chat (Nickname regained by services))]
<kupi> is there a way to convert it into monow in such a way it checks each pixel if it's closer to black or white without checking neighbours?
<kupi> those two are the same frame and I don't see those white pixels how got there https://usercontent.irccloud-cdn.com/file/JOTjW1cl/image.png
<kupi> nvm, chatgpt gave me this and worked ffmpeg -i input.mp4 -an -vf "format=gray,lut=y='if(gte(val/255,0.06),255,0)'" -sws_flags neighbor -sws_dither none output.avi
<intrac> bpmedley: yeah, that's what I've been considering doing :)
<intrac> I could build something a bit more precise than a basic system cap that way
<bpmedley> intrac: I was thinking the same thing.
JanC has quit [Ping timeout: 248 seconds]
Magissia has joined #ffmpeg
FlorianBad has quit [Remote host closed the connection]
ttys000 has quit [Read error: Connection reset by peer]
ttys000_ has joined #ffmpeg
JanC has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
MRiddickW has quit [Quit: MRiddickW]
JanC has joined #ffmpeg
JanC is now known as Guest8966
Guest8966 has quit [Killed (mercury.libera.chat (Nickname regained by services))]
rv1sr has quit []
rv1sr has joined #ffmpeg
iive has joined #ffmpeg
SuicideShow has quit [Ping timeout: 276 seconds]
SuicideShow has joined #ffmpeg