<henry22>
Using libav, how do i check if audio stream is variable frame rate?
<durandal_1707>
audio streams do not have variable frame rate
<BtbN>
I guess in theory they could, to skip over prolonged silence. But that's not implemented
<henry22>
Sorry, variable bitrate
EmleyMoor has joined #ffmpeg
lusciouslover has joined #ffmpeg
whupdup has quit [Quit: Going offline, see ya! (www.adiirc.com)]
jtgd has quit [Quit: WeeChat 4.1.0]
lusciouslover has quit [Ping timeout: 255 seconds]
jtgd has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
cmtaur^ has joined #ffmpeg
JanC_ has joined #ffmpeg
JanC is now known as Guest1775
Guest1775 has quit [Killed (lead.libera.chat (Nickname regained by services))]
JanC_ is now known as JanC
<chilinux>
does anyone know if the LGPL terms are being actively enforced by any of the contributors? is there anyone that should be notified if someone is violating it?
kurosu has quit [Quit: Connection closed for inactivity]
ecapi has joined #ffmpeg
Shine_ has joined #ffmpeg
ecapi has quit [Ping timeout: 248 seconds]
<furq>
chilinux: you can report violations to the bug tracker
noonien8 has quit [Quit: Ping timeout (120 seconds)]
noonien8 has joined #ffmpeg
DarkG has quit [Excess Flood]
DarkG has joined #ffmpeg
derpydoo has joined #ffmpeg
jtgd has quit [Quit: WeeChat 4.1.1]
thomasross has joined #ffmpeg
jtgd has joined #ffmpeg
kasper93_ has joined #ffmpeg
Shine__ has joined #ffmpeg
kasper93 has quit [Ping timeout: 255 seconds]
Kruppt has quit [Quit: Leaving]
Gunstick-- has quit [Read error: Connection reset by peer]
Gunstick-- has joined #ffmpeg
Shine_ has quit [Ping timeout: 255 seconds]
Shuriko has joined #ffmpeg
Gunstick-- has quit [Ping timeout: 252 seconds]
thilo has quit [Ping timeout: 255 seconds]
Gunstick-- has joined #ffmpeg
thilo has joined #ffmpeg
<aaabbb>
if a source video has absolutely no scene cuts is there any reason not to disable scenecut detection?
wangbin has joined #ffmpeg
<kepstin>
aaabbb: the reason to disable scenecut detection is if you absolutely need keyframes / gop boundaries to be placed at fixed intervals.
<kepstin>
otherwise you should basically always leave it on
<furq>
yeah that seems like you're too far into the weeds on something
<aaabbb>
kepstin: is there any benefit for leaving it on if there are no scenecuts, or is it merely harmless?
<furq>
if it agrees with you that there are no scenecuts then it won't do anything
<aaabbb>
furq: i'm just curious and learning more, when i do anything for production i only play with presets and crf
<furq>
but i don't think turning it off would save any measurable amount of time
<kepstin>
aaabbb: the encoder has to put keyframes occasionally through the video anyways, and even without "scene cuts" there might be some frames with enough change in them that the encoder decides it's a better place to put the keyframe.
<aaabbb>
kepstin: and it's indeed better usually even if it's not a true scene cut?
henry22 has quit [Quit: Connection closed]
<kepstin>
generally, yeah.
<thomasross>
I'm transcoding mp4 (h264/aac) into MPEGTS (h264/aac). The audio track of the source file has a packet starting at a negative timestamp with a "Skip Samples" side data that says (I interpret as) skip the packet (e.g. PTS is -2048, the side data says skip_samples=2048). I believe this is AAC padding (but I can't find any docs or info on that?). Now, I want to transcode only the first 5 seconds of this file, so I'm using `ffmpeg -t 5 -i a.mp4
<thomasross>
-codec:v libx264 -codec:a aac -f mpegts -copyts 0.ts`, however when I do this 1) the skip samples data appears to be lost, 2) the padding is turned from 2048 samples to 1024 samples (I think), and 3) the negative timestamp is transformed into a positive one, so my video actually starts at +1024. How can I completely discard the padding?
<thomasross>
Note that I am definitely a rookie at this so it is entirely possible I don't know what I'm talking about and something else is going on
<kepstin>
thomasross: why are you re-encoding the audio and video isntead of copying it?
<kepstin>
anyways, mpeg-ts doesn't support negative timestamps, and iirc it doesn't have any way to signal how much padding to discard
<thomasross>
kepstin: because I also want to seek
<kepstin>
mpegts is _terrible_ for seeking
<furq>
you can just copy into matroska or something if you want to seek
<thomasross>
well I'm seeking in the mp4
<thomasross>
so like I want to re-encode from 4s to 8s in the mp4 into the mpegts
<kepstin>
oh, i see, that's why you're re-encoding.
<thomasross>
yeah
<kepstin>
you should still use an output format other than mpeg-ts tho
<thomasross>
why's that?
<kepstin>
because, of the reasons I said 4 messages ago
<kepstin>
also it's terrible for seeking, has lots of extra overhead, etc. it's just a terrible format to use for files.
<thomasross>
good to know & not disagreeing, but the thing that consumes me requires it
<thomasross>
shouldn't ffmpeg be able to discard the padding while re-encoding?
cmtaur^ has quit [Ping timeout: 255 seconds]
<kepstin>
if signalled properly, ffmpeg should discard the padding when decoding, and then when it's encoding it has to add new padding.
minimal has quit [Quit: Leaving]
<thomasross>
is there somewhere i can read about the purpose of the padding?
<kepstin>
(since the ffmpeg decoder probably isn't what the original file was encoded with, the amount of padding in the new file will probably be different)
<thomasross>
yeah, seems like the padding is 1024 samples in the new file and 2048 in the old
<thomasross>
which appears to make the two streams misaligned
<kepstin>
it's just a general property of how MDCT based audio codecs work. basically all of them require some amount of initialization samples to be encoded prior to the start of the audio for things to work properly.
cmtaur^ has joined #ffmpeg
<kepstin>
the streams won't be misaligned, ffmpeg will keep the relative timestamps of the audio and video correct...
<thomasross>
where is that metadata stored in the output file?
<kepstin>
in mpeg-ts there's no place to store it.
<thomasross>
i see, so it doesn't work for mpegts?
<kepstin>
which is why ffmpeg has the video starting after the aduio
<kepstin>
the start of the video is aligned with the point where the "real" audio starts
<thomasross>
right
<kepstin>
(the extra padding samples are normally silence, so this probably won't be noticable on a standalone clip)
<kepstin>
also note that the _end_ of the audio is padded too, up to at least a frame size (multiple of 1024 samples in aac)
<thomasross>
hmm okay thank you
Vonter has quit [Ping timeout: 260 seconds]
Vonter has joined #ffmpeg
duderonomy has quit [Ping timeout: 260 seconds]
cmtaur^ has quit [Ping timeout: 255 seconds]
cmtaur^ has joined #ffmpeg
<aaabbb>
can someone try this and tell me if it segfaults on the latest ffmpeg?
<aaabbb>
it segfaults on 4.3.6-0+deb11u1 on debian but not 4.4.2 on gentoo, and i haven't tried 6.x
<aaabbb>
if it doesn't segfault on the latest then i assume it's a fixed bug, and i'm curious to find out what that bug was, because it only works with 11 or more lpc passes when using a compression level of 2 or less for flac encoding, and only for some types of inputs (velvet noise triggers it, but not white noise, pink noise, etc)
MisterMinister has joined #ffmpeg
<furq>
that segfaults on 4dbfb52
<aaabbb>
the commit?
<furq>
yeah
<furq>
from earlier today
<furq>
that definitely looks like a bug
<furq>
doesn't segfault without -sample_fmt s16 either
<aaabbb>
yeah i noticed that too (it does with u8)
<aaabbb>
ffmpeg[89866]: segfault at 7cc84f2bc000 ip 00007cc85dd710c9 sp 00007fff45ed34c8 error 4 in libavcodec.so.58.91.100[7cc85d51e000+9c1000] likely on CPU 1 (core 1, socket 0)
<aaabbb>
Code: 47 70 48 8d 3c 8f 48 8d 34 8e 4d 8d 04 88 29 ca 66 41 0f 6e d9 48 f7 d9 66 0f ef c0 66 0f ef e4 66 0f ef f6 49 89 c9 48 31 c0 <66> 43 0f 6e 14 88 66 0f 70 d2 00 f3 0f 6f 4c 86 fc f3 0f 6f 6c 86
<furq>
that's not really anything of use
<furq>
you'd want a proper backtrace from gdb
<aaabbb>
i know, and apologies for not getting something more useful, but that at least says that it's in libavcodec
<aaabbb>
which i guess is obvious since it's dependent on the flac settings...
<furq>
yeah
<furq>
no debug symbols in the static builds i'm using so you'd probably have to build it yourself
<aaabbb>
a bit too busy to dig for the bug right now, but if it segfaults on the latest builds, then at least it's reproducible
ecapi__ has quit [Ping timeout: 260 seconds]
<furq>
well maybe this is why cholesky isn't the default
<aaabbb>
i think it's because levinson performs better unless you up the passes a lot, which slows it down massively
<furq>
lpc_type can be changed by compression_level though
<furq>
but then it's flac so you're talking maybe half a percent saving if you're lucky
<aaabbb>
it's never changed to cholensky though, it's just so slow to use that many passes (a 100x slowdown)
<furq>
yeah i mean it could be
lemourin has quit [Read error: Connection reset by peer]
<furq>
been too long since i benchmarked it to remember how slow it was
lemourin has joined #ffmpeg
<aaabbb>
furq: i was saving a couple kilobytes on 500 megabytes, i was just having fun to see how a different number of cholesky factorization passes change compression ratio on different waveforms, that's how i noticed the bug
<furq>
i remember it saved a few tenths of a percent with just -compression_level 10 -lpc_type cholesky
<aaabbb>
even less when going from 9 passes to 10 (default is 1)
<aaabbb>
if i have time later i'll try to get some useful information from the segfault, otherwise i'll leave it up to someone else now that they have a reproducer
textmode has joined #ffmpeg
Shine__ has quit [Read error: Connection reset by peer]
<aaabbb>
much more useful than what i have, thanks :)
textmode has left #ffmpeg [#ffmpeg]
<thomasross>
actually i can probably make it more useful one min
Shuriko has quit [Read error: Connection reset by peer]
Shuriko has joined #ffmpeg
<thomasross>
ok maybe not idk
<aaabbb>
maybe with register dump and backtrace
Suchiman has quit [Quit: Connection closed for inactivity]
<aaabbb>
in addition to that is
<aaabbb>
and stack trace, idk i haven't used gdb in years
<furq>
i wouldn't know where to start with simd stuff anyway
<aaabbb>
simd is just like regular asm except access to vector instructions and special wide registers
derpydoo has quit [Ping timeout: 255 seconds]
Tano has quit [Quit: WeeChat 4.0.4]
maxim_d33 has quit [Ping timeout: 264 seconds]
thomasross has quit [Ping timeout: 255 seconds]
maxim_d33 has joined #ffmpeg
foul_owl has quit [Ping timeout: 252 seconds]
Ogabaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
Shine_ has joined #ffmpeg
flotwig_ has quit [Ping timeout: 240 seconds]
FH_thecat has joined #ffmpeg
flotwig has joined #ffmpeg
flotwig has quit [Changing host]
flotwig has joined #ffmpeg
thomasross has joined #ffmpeg
JanC has quit [Ping timeout: 264 seconds]
<aaabbb>
if a video was encoded with x264 and i'm transcoding it using x265, is there a benefit to using the same motion estimation algorithm in the original?
thomasross has quit [Ping timeout: 252 seconds]
flotwig has quit [Ping timeout: 264 seconds]
flotwig has joined #ffmpeg
flotwig has quit [Changing host]
flotwig has joined #ffmpeg
JanC has joined #ffmpeg
lusciouslover has joined #ffmpeg
lusciouslover has quit [Remote host closed the connection]
Xaldafax has quit [Quit: Bye...]
Shine__ has joined #ffmpeg
Shine_ has quit [Ping timeout: 258 seconds]
durandal_1707 has quit [Ping timeout: 272 seconds]
durandal_1707 has joined #ffmpeg
FH_thecat has quit [Remote host closed the connection]
anotheruser has quit [Read error: Connection reset by peer]
anotheruser has joined #ffmpeg
foul_owl has joined #ffmpeg
foul_owl has quit [Ping timeout: 245 seconds]
FH_thecat has joined #ffmpeg
Volgaar has quit [Remote host closed the connection]
Volgaar has joined #ffmpeg
foul_owl has joined #ffmpeg
Shine__ has quit [Read error: Connection reset by peer]
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
twb has joined #ffmpeg
<twb>
Can ffmpeg output to two things at once?
<twb>
My use case is "ffmpeg -i movie.ts rtp://X rtp://Y"
<twb>
Ah yeah "Complex filtergraphs" indicates it can
jtgd has quit [Quit: WeeChat 4.1.1]
jtgd has joined #ffmpeg
AbleBacon has quit [Read error: Connection reset by peer]
anotheruser has quit [Read error: Connection reset by peer]
anotheruser has joined #ffmpeg
Shine_ has joined #ffmpeg
anotheruser has quit [Read error: Connection reset by peer]
anotheruser has joined #ffmpeg
anotheruser has quit [Read error: Connection reset by peer]
twb has quit [Ping timeout: 255 seconds]
someuser has joined #ffmpeg
Vonter has quit [Ping timeout: 260 seconds]
Vonter has joined #ffmpeg
MisterMinister has quit [Ping timeout: 255 seconds]
someuser has quit [Read error: Connection reset by peer]
darkapex has quit [Quit: WeeChat 2.3]
darkapex has joined #ffmpeg
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
Muimi has joined #ffmpeg
darkapex has quit [Remote host closed the connection]
darkapex has joined #ffmpeg
Shine_ has quit [Read error: Connection reset by peer]
lavaball has joined #ffmpeg
<rdz>
A command line i used for doing screencasting with hw accelerated encoding in a previous version of my system suddenly doesn't run anymore. It says "Unrecognized option 'vaapi_device'"
<rdz>
I am pretty sure that -vaapi_device was once a valid option. What am I missing?
<rdz>
man ffmpeg does mention it.
<rdz>
this is with ffmpeg 4.4.4 on Ubuntu 22.04
rv1sr has joined #ffmpeg
Suchiman has joined #ffmpeg
Volgaar has quit [Ping timeout: 256 seconds]
Volgaar has joined #ffmpeg
<furq>
rdz: is the option in the right place
<rdz>
ah.. it apparently was before.. but maybe that has changed with ffmpeg version?
<rdz>
furq: thanks. I didn't know that putting it to the wrong place would trigger such an error
<rdz>
furq: but man ffmpeg doesn't list -vaapi_device either
<rdz>
maybe ubuntu kicked out VAAPI support in their ffmpeg build?
Shine_ has joined #ffmpeg
Capstan has joined #ffmpeg
Shine_ has quit [Ping timeout: 255 seconds]
theobjectivedad has quit [Read error: Connection reset by peer]
Anuj has joined #ffmpeg
theobjectivedad has joined #ffmpeg
Capstan has quit [Ping timeout: 248 seconds]
Anuj has quit [Client Quit]
kurosu has joined #ffmpeg
navi has joined #ffmpeg
<furq>
maybe
<furq>
man ffmpeg doesn't list it here either but ffmpeg -h full does
<furq>
that also says it's a global option so i guess it wouldn't matter where you put it
<furq>
or at least it wouldn't give that error if it was in the wrong place
MootPoot has quit [Quit: Connection closed for inactivity]
Vonter has quit [Ping timeout: 264 seconds]
Vonter has joined #ffmpeg
wangbin has quit [K-Lined]
<bencoh>
/38
<aaabbb>
bencoh: i've been using irssi for decades and i had no idea you could do /38 instead of /window goto 38, wow
<aaabbb>
i just tried /5 out of curiosity seeing you do that and it worked, i feel so dumb
<bencoh>
:)
<furq>
you can just do M+5 if it's window 1-10
Nact has quit [Quit: Konversation terminated!]
rv1sr has quit []
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
<rdz>
furq: i see. Is it possible that ffmpeg shows the error because the system doesn't support it?
<furq>
yeah
lusciouslover has joined #ffmpeg
lusciouslover has quit [Ping timeout: 255 seconds]
vlm has joined #ffmpeg
Tano has joined #ffmpeg
hightower2 has joined #ffmpeg
chovy has joined #ffmpeg
<chovy>
anyone know how to get ffmpeg to capture screen on wayland/kde?
rv1sr has joined #ffmpeg
<JEEB>
chovy: there is a drm/kms based capture module; requires access to the video device, but should enable capturing whatever is on the KMS output
<chovy>
sudo JEEB how do i install it? i'm on arch
ecapi__ has quit [Remote host closed the connection]
ecapi__ has joined #ffmpeg
<JEEB>
it should be already included
ZedHedTed has joined #ffmpeg
<CounterPillow>
kmsgrab
<JEEB>
`ffmpeg -devices |grep kms`
<CounterPillow>
also this isn't arch support
<JEEB>
if it returns, then you have it built in
<JEEB>
then you can look at its options with `ffmpeg -h demuxer=kmsgrab`
ecapi__ has quit [Remote host closed the connection]
ecapi__ has joined #ffmpeg
ecapi has joined #ffmpeg
<chovy>
i have it
<another|>
obs should have pipewire support for capture
<aaabbb>
why would transcoding 1920x1080 h264 to 1280:720 hevc inflate the file size? there's a lot of moving grass so i understand that it's going to require a higher bitrate for a given crf but why would it actually be less efficient than h264 despite a smaller size?
Jackarain has joined #ffmpeg
<furq>
if by given crf you mean the same one for x264 and x265 then it's because those aren't the same
<aaabbb>
no not the same for the two
<aaabbb>
for most videos from the same playlist (same encoding settings), it reduces it from 3000kbps to around 800kbps, except ones with moving grass
Kruppt has joined #ffmpeg
Muimi has joined #ffmpeg
<aaabbb>
ah the h264 has rc=2pass so perhaps that's why, for the video with lots of grass, it's using less bitrate than it would if it was using crf
twb has joined #ffmpeg
<another|>
chovy: take a look at the examples
<another|>
input file: -
<another|>
not :0.0
<rdz>
Hi. I'm trying the Screen Capture examples from https://trac.ffmpeg.org/wiki/Hardware/VAAPI and they all give the error: "Unrecognized option 'vaapi_device'." I know it used to work before, but I can't figure out what has changed. I tried the ffmpeg 4.4.4 from Ubuntu, but also a static build (6.0-static). Is the problem with ffmpeg or some other part of my system?
lexano has joined #ffmpeg
samhza has quit [Ping timeout: 246 seconds]
samhza has joined #ffmpeg
<another|>
command line?
<rdz>
another|: is it ok to post here?
<rdz>
is the last example from the screen capture section from the link I posted before
<rdz>
that static build supports vdpau.. thanks a lot for clearing this up
<rdz>
it seems I used non-repo version of ffmpeg once before...
<rdz>
will try to compile myself
MrZeus has quit [Ping timeout: 260 seconds]
Blacker47 has joined #ffmpeg
cmtaur^ has quit [Remote host closed the connection]
LionEagle has quit [Ping timeout: 272 seconds]
<rdz>
It was not ubuntu to blame.. just me.. it turns out I had a version installed from a PPA with bad support and I didn't recall having done that :-O
LionEagle has joined #ffmpeg
<rdz>
works as advertized now. Many thanks for the help!
LionEagle has quit [Remote host closed the connection]
LionEagle has joined #ffmpeg
JanC has quit [Ping timeout: 264 seconds]
LionEagle has quit [Ping timeout: 255 seconds]
LionEagle has joined #ffmpeg
LionEagle has quit [Read error: Connection reset by peer]
LionEagle has joined #ffmpeg
BetweenUs has joined #ffmpeg
iconoclasthero has joined #ffmpeg
<iconoclasthero>
hi, I am trying to convert a .txt file to .opus with piper piped into ffmpeg and it doesn't seem to be working.
<iconoclasthero>
it is chewing through a reduced section of the book right now and i think it is working. where would piper/ffmpeg be storing the file temporarily ?
<iconoclasthero>
also, the problem was that i had ffmpeg aliased to somewhere it wasn't.
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<CounterPillow>
it isn't storing any files temporarily, that is not how pipes work.
<iconoclasthero>
is it trying to do this all in ram then?
<CounterPillow>
it's streaming the output of the piper program to the input of the ffmpeg program in a limited size operating system provided buffer that blocks when reading if empty and blocks when writing if full
<iconoclasthero>
"a limited-size operating-system-provided buffer that blocks" I assume those dashes are correct? What is the definition of blocks in that phrase?
<CounterPillow>
if by dashes you mean |, then yes, that's called a "pipe". "blocks" in this context means blocking in the sense of a synchronous I/O operation; the task is put to sleep until the condition is reached to make it able to run again (e.g. data is available when reading, or space is available when writing)
kasper93_ is now known as kasper93
<iconoclasthero>
i meant dashes in the sense of concatenating multi-word modifiers to make the syntax used more clear.
<iconoclasthero>
I don't know if it's working so i was looking for a temp file to play and find out what's going on since it's taking a long time.
Shine_ has quit [Ping timeout: 246 seconds]
ecs has quit [Remote host closed the connection]
ecs has joined #ffmpeg
billchenchina has joined #ffmpeg
billchenchina has quit [Remote host closed the connection]
MootPoot has joined #ffmpeg
thomasross has joined #ffmpeg
JanC has joined #ffmpeg
thomasross has quit [Ping timeout: 255 seconds]
MrZeus__ has joined #ffmpeg
MrZeus_ has quit [Ping timeout: 260 seconds]
iderik has joined #ffmpeg
Vedaa58193 has quit [Ping timeout: 255 seconds]
Capstan has joined #ffmpeg
lusciouslover has joined #ffmpeg
icezolation has quit [Remote host closed the connection]
ZedHedTed has quit [Quit: leaving]
Vedaa58193 has joined #ffmpeg
lusciouslover has quit [Ping timeout: 272 seconds]
qqq has joined #ffmpeg
billchenchina has joined #ffmpeg
adendrag33209987 has quit [Ping timeout: 255 seconds]