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
DarkSkyes has quit [Read error: Connection reset by peer]
DarkSkyes has joined #ffmpeg
DarkSkyes has quit [Client Quit]
Dagger has quit [Ping timeout: 252 seconds]
Dagger has joined #ffmpeg
noobaroo has joined #ffmpeg
<noobaroo> I'm trying to test out theora and see how it fares, just to see. I've never used it before. At https://github.com/xiph/theora/blob/master/examples/encoder_example.c I can see it says ` -z --speed <n>` is an option and I'm able to talk to the libtheora encoder via ffmpleg by passing `-flags ___` but I don't know the syntax beyond this.
<noobaroo> I tried `-flags speed=1` and `-flags z1` and even tried quoting it in case it's passed directly raw without parsing `-flags "--speed 1"` It keeps saying Stuff like [libtheora @ 0x55c6714ec500] Unable to parse option value "z=0"
rizino has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
x_x has quit [Ping timeout: 260 seconds]
another| has quit [Remote host closed the connection]
another has joined #ffmpeg
rizino has joined #ffmpeg
minimal has quit [Quit: Leaving]
chandash has joined #ffmpeg
Traneptora has quit [Quit: Quit]
cmc has joined #ffmpeg
sgm has quit [Remote host closed the connection]
sgm has joined #ffmpeg
chandash has quit [Quit: WeeChat 4.4.2]
ahc has quit [Ping timeout: 265 seconds]
EmberCrest has joined #ffmpeg
<EmberCrest> Howdy, ladies and gents
<EmberCrest> I've got two episodes of Star Trek ;) TNG, and DS9. DS9 has AC3 audio encoding, 48khz sample rate. TNG has AAC, also 48khz.
<EmberCrest> TNG encoding to RTSP using libopus is absolutely attrocious, choppy and hollow-sounding.. but same settings for DS9 are perfectly fine. I've got a pretty powerful CPU-- adjusting compression and cpu-used flags does virtually nothing to help the TNG output improve..
rv1sr has quit []
Dagger has quit [Ping timeout: 252 seconds]
Dagger has joined #ffmpeg
<ePirat> EmberCrest, how many channels do each have respectively?
<ePirat> also did you try if the issue is the decoding or encoding, by playing it with ffplay for example instead of encoding it to opus?
cmc has quit [Remote host closed the connection]
cmc has joined #ffmpeg
Suchiman has quit [Quit: Connection closed for inactivity]
<EmberCrest> ePirat: I'm not much of an FFwhiz:) I'll see what I can find using FFPlay
<EmberCrest> ePirat: TNG is stereo, DS9 is 5.1 (I believe.. need to check again to be sure)
<EmberCrest> ffplay renders the audio just fine-- in my previous infrastructure, I was using RTMP which supports AAC. That worked fine.
<EmberCrest> but now I have to use MediaMTX for WebRTC, which doesn't support AAC.
<EmberCrest> Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
nitrix has quit [Quit: ZNC 1.8.2 - https://znc.in]
nitrix has joined #ffmpeg
intrac has quit [Ping timeout: 272 seconds]
intrac has joined #ffmpeg
Icedream has quit [Quit: A lol made me boom.]
Icedream has joined #ffmpeg
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg
StephenLynx has quit [Remote host closed the connection]
lavaball has joined #ffmpeg
realies has quit [Quit: ~]
realies has joined #ffmpeg
rossome has joined #ffmpeg
<FH_thecat> I have recorded video with my phone, where I held the phone in "landscape" position while recording. So the resulting video is rotated 90 degrees, ie in portrait mode
<FH_thecat> now I just need to flip it back
<FH_thecat> I tried:
<FH_thecat> ffmpeg -i 20241012_080216.mp4 -vf rotate=-90 output.mp4
<FH_thecat> but it rotates the video some weird degree
<FH_thecat> not 90
YuGiOhJCJ has joined #ffmpeg
zayd has quit [Quit: ZNC 1.8.2+deb2+deb11u1 - https://znc.in]
<furq> -vf rotate is in radians, not degrees
<furq> but you can probably do this by either stripping or adding rotate metadata
<furq> without reencoding
<furq> -c copy -metadata:s:v:0 rotate=0 (or 90, or 270)
<furq> ffprobe will show if there's already rotate metadata present
Haxxa has quit [Ping timeout: 252 seconds]
Haxxa has joined #ffmpeg
zayd has joined #ffmpeg
Haxxa has quit [Excess Flood]
Haxxa has joined #ffmpeg
Haxxa has quit [Excess Flood]
Haxxa has joined #ffmpeg
coldfeet has joined #ffmpeg
<FH_thecat> furq: thank you! stripping rotate metadata worked
coldfeet has quit [Quit: leaving]
GNU_world has quit [Ping timeout: 252 seconds]
archivist99 has joined #ffmpeg
rv1sr has joined #ffmpeg
makidoll has quit [Quit: https://maki.cafe]
makidoll has joined #ffmpeg
archivist99 has quit [Ping timeout: 248 seconds]
lavaball has quit [Remote host closed the connection]
Forza has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jemius has joined #ffmpeg
Forza has joined #ffmpeg
sm1999 has joined #ffmpeg
coldfeet has joined #ffmpeg
EmberCrest has joined #ffmpeg
EmberCrest has quit [Changing host]
another is now known as another|
Some_Person has quit [Quit: ZNC 1.8.2 - https://znc.in]
FH_thecat has quit [Quit: Leaving]
Some_Person has joined #ffmpeg
j45 has quit [Ping timeout: 260 seconds]
j45 has joined #ffmpeg
FH_thecat has joined #ffmpeg
s55 has quit [Quit: ZNC 1.9.0 - https://znc.in]
s55 has joined #ffmpeg
Suchiman has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
ShadowJK has quit [Remote host closed the connection]
x_x has joined #ffmpeg
Unit640 has joined #ffmpeg
jemius has quit [Quit: Leaving]
lavaball has joined #ffmpeg
minimal has joined #ffmpeg
sgm has quit [Ping timeout: 260 seconds]
sgm has joined #ffmpeg
Kei_N has quit [Read error: Connection reset by peer]
Kei_N has joined #ffmpeg
coldfeet has joined #ffmpeg
<EmberCrest> I uploaded a sample of what's occurring in my above issue: choppy audio when re-encoding AAC to Opus over RTSP. http://www.sndup.net/bg556
<EmberCrest> tried with vbr on/off and with/without specified bitrate 96k.
<EmberCrest> might go try another AAC track when I have time today...
lavaball has quit [Remote host closed the connection]
Hobbyboy has quit [Quit: The BNC has broken!]
StephenLynx has joined #ffmpeg
Icedream has quit [Ping timeout: 244 seconds]
Icedream has joined #ffmpeg
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Suchiman has quit [Quit: Connection closed for inactivity]
Nixkernal has joined #ffmpeg
Wulf has joined #ffmpeg
beastd has quit [Ping timeout: 244 seconds]
<Wulf> Hello... So, I've got two versions of the same video. One is 4:3 format in low res, the other got letterboxed (bottom cut off) and high res. There may also be some differences in timestamps. How can I combine the videos to get the high-res with the low-res bottom added?
<Unit640> Wulf: I can't help, but I know the feeling of wanting to combine two crappy sources' best parts to make one decent version. I've done it manually by using a video editor, but I can't imagine that ffmpeg would be able to tell what you really want to do with them.
<Unit640> (Or, if it can, the amount of work to tell it the details would take longer to figure out than doing it manually.)
ewomer has quit [Read error: Connection reset by peer]
jemius has joined #ffmpeg
ewomer has joined #ffmpeg
beastd has joined #ffmpeg
<Wulf> okay... the videos run at slightly different speed too. Guess to put them together it would require a tool that was specially made for this :)
Nact has joined #ffmpeg
elvis_a_presley has quit [Quit: smoke-bomb ; grapple-hook]
elvis_a_presley has joined #ffmpeg
<StephenLynx> Wulf, so you want the high res video. why you want the bottom of the low rest btw?
<StephenLynx> you want to do that effect that people use where they have a blurred version of the video filling up space to fit the format?
<Wulf> StephenLynx: the high-res is missing the bottom. So I could take the bottom from the low-res to get the complete picture (pun intended.).
<Wulf> StephenLynx: it's not a blur with useless information, it would contain actual video, although in blurry quality.
<StephenLynx> ah, I see.
<StephenLynx> those guys must have REALLY loved letterboxes then.
<StephenLynx> to cut off the bottom just to put them in.
StephenLynx has quit [Quit: Leaving]
StephenLynx has joined #ffmpeg
rvalue- has joined #ffmpeg
rvalue has quit [Ping timeout: 248 seconds]
lavaball has joined #ffmpeg
rvalue- is now known as rvalue
Narrat has joined #ffmpeg
<EmberCrest> My AAC -> Opus issue is *solved*! -async 50 has completely fixed the audio problems.
ewomer has quit [Quit: WeeChat 4.4.2]
rsx has joined #ffmpeg
ewomer has joined #ffmpeg
<Unit640> Wulf: In a good video editor (meaning costs money), one would just start by adding the hi-res one as the base, then put the bad (but with more aspect ratio) underneath it and then "drag it out" to match the same duration.
<Unit640> Sadly, all video editors I've tried for Linux have been horrific, or won't even run at all.
coldfeet has quit [Remote host closed the connection]
rsx has quit [Quit: rsx]
Juesto has joined #ffmpeg
Narrat has quit [Ping timeout: 264 seconds]
Juest has quit [Ping timeout: 264 seconds]
Juesto is now known as Juest
Suchiman has joined #ffmpeg
iive has joined #ffmpeg
jemius has quit [Quit: Leaving]
Tano has quit [Quit: WeeChat 4.3.4]
minimal has quit [Quit: Leaving]
Kei_N has quit [Ping timeout: 252 seconds]
ewomer has quit [Read error: Connection reset by peer]
Kei_N has joined #ffmpeg
ewomer has joined #ffmpeg
ShadowJK has joined #ffmpeg
dontdieych2 has joined #ffmpeg
jtgd has quit [Quit: WeeChat 4.4.2]
<dontdieych2> How could I copy album art in this case? flac -> mka(opus) https://gist.github.com/dontdieych/b6da35797283c0af8aad6d87bc57e293
jtgd has joined #ffmpeg
<Marth64> You will need to map it so ffmpeg knows to carry it
<Marth64> Try -map 0 before your -c:a
<StephenLynx> in my experience
<StephenLynx> you don't need anything special but setting frames to 1 dontdieych2
<StephenLynx> wait, i might have misunderstood what you want.
<Marth64> might need a -c:v copy as well
<StephenLynx> nope.
Juest has quit [Ping timeout: 248 seconds]
<StephenLynx> input is audio, output is jpg
<StephenLynx> frames to 1.
Juesto has joined #ffmpeg
<StephenLynx> you can do it just like you would thumbnail a video for the first frame.
Juesto is now known as Juest
<StephenLynx> ffmpeg -i {$path} -y -vframes 1 -vf scale= is the command I use. then scale can either be -1:-1 or you could completely omit it i think. or you could set values if you want to resize it.
<Marth64> that unnecessarily encodes the art, user can copy directly by mapping the attached_pic stream
<StephenLynx> well, I might have misunderstood what they wanted after all.
<dontdieych2> I got it
<dontdieych2> ffmpeg -hide_banner -i 01.flac -map 0:0 -map 0:1 -c:a libopus -b:a 128k -c:v copy 01.mka
<StephenLynx> oh, they wanted to convert the audio format and preserve the image. ok, nvm then.
<Marth64> yea
<StephenLynx> i thought they wanted the image.
<StephenLynx> something to keep in mind in ffmpeg, the image in audio files is just a video stream.
<Marth64> correct, usually with the disposition attached_pic
lemourin has quit [Quit: The Lounge - https://thelounge.chat]
<Marth64> for artwork
<dontdieych2> ffmpeg -hide_banner -i 01.flac -map 0 -c:a libopus -c:v copy 01.mka
<dontdieych2> this is the one
<dontdieych2> lol
lemourin has joined #ffmpeg
<dontdieych2> need `-map 0` part
<dontdieych2> without `-map 0` ffmpeg ignores album art video stream
<StephenLynx> probably it is telling to map that stream.
<StephenLynx> im not too savy on the command line to be able to tell.
alexherbo2 has joined #ffmpeg
<dontdieych2> looks like that
<dontdieych2> btw, ffmpeg and manul is quite rabbit hole.
<dontdieych2> enjoying it lol
<dontdieych2> manul/manual
<StephenLynx> yeah, it is a very complex software. using the libraries is even harder.
<dontdieych2> looks like whole world's media things are depending on ffmpeg
<StephenLynx> btw Marth64 did you had the time to look up the weird issue I had?
<StephenLynx> dontdieych2, yeah, no one would reinvent a wheel that takes so much labour to produce.
<StephenLynx> is like linux.
<StephenLynx> being written in C probably helps fitting it in every case.
<StephenLynx> despite making the libraries harder to use.
<Marth64> StephenLynx: the gif encoder?
<Marth64> sorry I don't recall. I've been tied up at dayjob
<StephenLynx> sec, let me paste it
<StephenLynx> when I moved from av_image_alloc to av_frame_get_buffer, my gif stopped being animated. even the filesize is shorter. https://pastebin.com/R7hDiMc4 the whole code. I prepare the frame at line 165.
<BtbN> I somehow doubt just changing between those functions has any impact on that.
<StephenLynx> literally the only difference.
<BtbN> You'll need something more minimal to reproduce it then
<StephenLynx> i dont think I can make it more minimal. gif comes in, gif comes out.
<BtbN> Working through those 300 lines is gonna take significant time, and the inconsistent indentation doesn't help either.
<StephenLynx> i can reindent it.
<BtbN> It's very unlikely for there to be a bug in ffmpeg in that regard, so best advice still is to refer to the documentation, headers and the ffmpeg code itself
<StephenLynx> btw, I'm using 4.2.
<BtbN> Well, then we can't really help you here anyway, that's as dead as it gets
<BtbN> test with latest master first
<Marth64> ++1 BtbN advice. also I see a lot of return paths with no logging. it might be helpful to add some logs until you get to the root of why it is stopping
<StephenLynx> it didnt stop.
<StephenLynx> actually.
<StephenLynx> let me test something.
<StephenLynx> im assuming it didn't stop, but I didn't test that.
<Marth64> you are in a while(true) so surprises can occur
<StephenLynx> yup, it finishes.
Juest has quit [Ping timeout: 255 seconds]
<StephenLynx> it doesn't crash, segfault or errors out.
<StephenLynx> https://pastebin.com/B9XCKifp idented BtbN
<StephenLynx> in fact, it does writes every frame.
<BtbN> Something I notice at first glance is total lack of handling of EAGAIN cases that all send/recv frame/packet functions can return
Juesto has joined #ffmpeg
<BtbN> But I don't have time to work through 300 lines of code right now
<StephenLynx> i do tho. line 225, 238
<BtbN> not the second time around though
<StephenLynx> as a result of which function?
<BtbN> Same functions
<StephenLynx> what you mean second time around then?
<StephenLynx> those checks happen on every loop.
<BtbN> No, the second time around you just return 1 on any non-zero return
<StephenLynx> avcodec_send_frame and avcodec_receive_packet ?
<BtbN> Yes, as I said
<Marth64> When you encode
<Marth64> ^
<BtbN> It's probably working out okay, given the gif encoder does no reordering or delaying whatsoever
<BtbN> But it's technically not correct
<StephenLynx> I see. I thought those were only a thing when getting data from the source.
<StephenLynx> not when sending data to the destination.
<BtbN> you're not "sending data to the destionation"
<BtbN> you're encoding video
<StephenLynx> i get what you mean.
<Marth64> Encoder or might not be ready for you yet to receive packet
<StephenLynx> i thought it only mattered on decoding.
<BtbN> I don't think it matters at all for gif
<StephenLynx> probably.
<StephenLynx> but just curious, in that case one would have to keep trying to send the packet to the encoder on a smaller loop?
Juesto has quit [Ping timeout: 248 seconds]
<BtbN> You send it frames until it can't no more, then you receive until it won't give you anymore
Juest has joined #ffmpeg
<dontdieych2> > <StephenLynx> is like linux. - ye right.
dontdieych2 has quit [Quit: Konversation terminated!]
<Marth64> I recommend to try and factor things out of the loop and keep the loop block itself small
<Marth64> In this way you can more easily narrow the issue
<BtbN> The alternative, often more easily implemented, approach is to send one frame, then try to receive packets until EAGAIN
<BtbN> same for the decoding part
<StephenLynx> so the encoder can receive more than once even if you decoded only one frame?
<StephenLynx> i assumed that part was 1:1
<BtbN> that's very rare, but possible
<BtbN> Usually it's just that it simply won't return anything for the first X frames of input
<BtbN> and then multiple at once
<StephenLynx> ok, but for this case, is not returning any error.
<StephenLynx> but
<StephenLynx> hm.
<BtbN> Yeah, like I said, gif will be very hard no delay 1:1 anyway, so it doesn't matter
<StephenLynx> now, you said "kleep the block itself small" but I dont see what else I could remove here.
<StephenLynx> this is already the trimmed down code I managed to achieve.
<StephenLynx> and yeah, I am factoring things outside the loop. because the only change is outside the loop.
<StephenLynx> i already discarded the loop not running for every frame.
Juesto has joined #ffmpeg
x_x has quit [Remote host closed the connection]
x_x has joined #ffmpeg
Juest has quit [Ping timeout: 252 seconds]
Juesto is now known as Juest
Wulf has quit [Ping timeout: 265 seconds]
Wulf has joined #ffmpeg
SuicideShow has quit [Ping timeout: 245 seconds]
SuicideShow has joined #ffmpeg
sgm has quit [Remote host closed the connection]
sgm has joined #ffmpeg
x_x has quit [Remote host closed the connection]
x_x has joined #ffmpeg
Juest has quit [Ping timeout: 252 seconds]
Juest has joined #ffmpeg
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ffmpeg
lavaball has quit [Quit: lavaball]
Tano has joined #ffmpeg
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ffmpeg
alexherbo2 has quit [Remote host closed the connection]
kasper93 has quit [Remote host closed the connection]
kasper93 has joined #ffmpeg
kasper93 has quit [Remote host closed the connection]
kasper93 has joined #ffmpeg
beastd has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
iive has quit [Quit: They came for me...]