ChanServ 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.1.1 is released
vincejv has joined #ffmpeg
halloy5771 has quit [Read error: Connection reset by peer]
cantelope has quit [Quit: Connection closed for inactivity]
System_Error has quit [Remote host closed the connection]
halloy5771 has quit [Remote host closed the connection]
halloy5771 has joined #ffmpeg
System_Error has joined #ffmpeg
ackyshake has quit [Ping timeout: 252 seconds]
Shine_ has joined #ffmpeg
Shine_ has quit [Read error: Connection reset by peer]
pikapika_lunar has quit [Read error: Connection reset by peer]
moviuro has quit [Ping timeout: 248 seconds]
pikapika_lunar has joined #ffmpeg
moviuro has joined #ffmpeg
emanuele6 has quit [Ping timeout: 248 seconds]
emanuele6 has joined #ffmpeg
bleb has quit [Ping timeout: 252 seconds]
emanuele6 has quit [Quit: WeeChat 4.5.2]
ackyshake has joined #ffmpeg
ackyshake has quit [Client Quit]
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
ahc has joined #ffmpeg
System_Error has quit [Ping timeout: 264 seconds]
coldfeet has joined #ffmpeg
YUiNA has joined #ffmpeg
tokyovigilante_ has joined #ffmpeg
tokyovigilante has quit [Ping timeout: 252 seconds]
tokyovigilante_ is now known as tokyovigilante
halloy5771 has quit [Ping timeout: 244 seconds]
halloy5771 has joined #ffmpeg
tokyovigilante_ has joined #ffmpeg
tokyovigilante has quit [Ping timeout: 276 seconds]
tokyovigilante_ is now known as tokyovigilante
lavaball has joined #ffmpeg
Temp123 has joined #ffmpeg
Temp123 has quit [Quit: Client closed]
halloy5771 has quit [Remote host closed the connection]
halloy5771 has joined #ffmpeg
Shine_ has joined #ffmpeg
Muimi has quit [Read error: Connection reset by peer]
bleb has joined #ffmpeg
user_oreloznog has joined #ffmpeg
slidercrank has joined #ffmpeg
System_Error has joined #ffmpeg
HarshK23 has joined #ffmpeg
halloy5771 has quit [Ping timeout: 268 seconds]
rsx has joined #ffmpeg
System_Error has quit [Ping timeout: 264 seconds]
slidercrank has quit [Ping timeout: 276 seconds]
YuGiOhJCJ has joined #ffmpeg
xx has joined #ffmpeg
coldfeet has quit [Ping timeout: 272 seconds]
SuicideShow has quit [Ping timeout: 252 seconds]
SuicideShow has joined #ffmpeg
System_Error has joined #ffmpeg
coldfeet has joined #ffmpeg
pikapika_lunar has quit [Read error: Connection reset by peer]
moviuro_ has joined #ffmpeg
moviuro has quit [Quit: Reboot? Or did my jail(8) just die?]
pikapika_lunar has joined #ffmpeg
YUiNA_ has joined #ffmpeg
YUiNA has quit [Ping timeout: 272 seconds]
Sketch has quit [Remote host closed the connection]
Sketch has joined #ffmpeg
YUiNA has joined #ffmpeg
YUiNA_ has quit [Ping timeout: 260 seconds]
Shine_ has quit [Read error: Connection reset by peer]
damian101 has quit [Remote host closed the connection]
j45_ has joined #ffmpeg
j45 has quit [Ping timeout: 276 seconds]
j45_ is now known as j45
j45 has quit [Changing host]
j45 has joined #ffmpeg
halloy5771 has joined #ffmpeg
halloy5771 has quit [Ping timeout: 245 seconds]
Shine_ has joined #ffmpeg
ircer has joined #ffmpeg
ircer is now known as JEEB
welder has quit [Quit: WeeChat 3.8]
welder has joined #ffmpeg
fling has quit [Remote host closed the connection]
fling has joined #ffmpeg
zsoltiv_ has quit [Ping timeout: 276 seconds]
aloo_shu has joined #ffmpeg
coldfeet has quit [Ping timeout: 272 seconds]
<aloo_shu>
I'm having an mp4 input stream with h264 and aac in it (on another day, this may be webm), I'm breaking that up into a video- and an audio stream, and serving each on a different port with the built in http server
<aloo_shu>
which output formats could I choose to 1) make transcoding fast and easy, 2) have streams that tolarate blocking, i.e. are 'seekable' to an extent, I guess
zsoltiv_ has joined #ffmpeg
<another|>
do you hace to reencode?
<another|>
*have
<another|>
wdym by blocking?
cantelope has joined #ffmpeg
<aloo_shu>
I mean that for instance using -c copy on the video stream and giving mp4 for the output (http erver needs an explicit -f <format> directive, the process will exit with an error as soon as a client (vlc) connects. so w/ blocking I mean the fact that the server needs to wait for a connection then stream from the correct position
<aloo_shu>
[mp4 @ 0x121b540] muxer does not support non seekable output
<aloo_shu>
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
<aloo_shu>
^ this happens after player connect with -c copy and -f mp4
<another|>
You cannot stream plain mp4
<aloo_shu>
my question was what can I stream
<another|>
matroska, mpegts, ...
<aloo_shu>
.. and be performant while serving audio and video in different outputs, each a http server
<aloo_shu>
mpeg alone works at 1.25x speed, opus alone works at 3.2x, but both simultaneously, goes to 0.67x, and renicing the process as root, doesn't change that either. I need to get over 1x speed, that's the challenge there
<aloo_shu>
matroska is looking good so far
<aloo_shu>
I hadn't been aware that you need to write it out, and misinerpreted the error when trying 'mkv'
<another|>
What ffmpeg version?
<aloo_shu>
4.4.5
minimal has joined #ffmpeg
<aloo_shu>
matroska for the video alone works great at 17x speed, but serving a matroska stream each for audio amd video, is bringing it down to 0.133x, even transcoding the audio to 48000Hz 64k opus while copying video into matroska is faster, at 0.25x
<aloo_shu>
oh, but now I'm getting there
<another|>
That's an ancient version. Note that 7.0 introduced multi threading which might help
<aloo_shu>
2024
<another|>
Still a very old branch
<aloo_shu>
or well, the copyright notice is, and it's what I'll work with, full stop
<another|>
Mkay
<aloo_shu>
but the trick was giving an explicit -c:v copy in the video output stream, the one I gave globally, before the -map options. didn;t carry over
<another|>
Oh, right. Output options only apply to the next output
jmcantrell has joined #ffmpeg
<aloo_shu>
I'm at 2.59 speed now, that's looking very good :), thanks
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<aloo_shu>
next challenge is buffering/delaying the video stream: the audio ends up getting played by a snapcast server with a large 4000ms buffer, the video stream needs corrected for that, and it would be ideal to do this not with a filtergraph, vut either output buffering or some timestamp offset fu for the video output only
<aloo_shu>
*but
rsx has quit [Quit: rsx]
ahc has quit [Ping timeout: 265 seconds]
<aloo_shu>
-itoffset seems to do exactly what I want, but I'd have to open the same input stream twice to be able to use it, that's loco
<aloo_shu>
so setts from bitstream filters may be a candidate, but I'm a little out of my depth there for chosing the ts to manipulate, and crafting the correct expression
<aloo_shu>
can you recommend an AI to ask :P
<minimal>
aloo_shu: did you think of asking an AI which AI to ask? lol
<aaabbb>
ai is really bad with anything ffmpeg that's not super trivial
<aaabbb>
and when it does work, it gives a bad or inefficient solution
<aloo_shu>
/given this terrible outlook/, who'd volunteer to help me vibe code my setts bitstream filter that adds a 4000ms delay? Luckily, VLC, which I use as the client for the video stream, has it's own audio/video offset controls even in the mobile version, so I could already test that my snapcast served audio and the video sync up good enough with that 4000ms delay, but it would be nice to not depend on
<aloo_shu>
the video stream client to correct this
<minimal>
vibe code? AI? Oh dear you've fallen for all the modern day BS lol
* aloo_shu
waves an irony flag
ttkap has joined #ffmpeg
<aloo_shu>
but even correcting my offset in the video client, I'm already running into a different problem: audio and video, served as different outputs, will drift out of sync, supposedly because of all that magic that adjusts playback timing under the hood, so I need to know how to hard-sync to output streams (and with a fixed offset between two streams, ideally)
k777 has joined #ffmpeg
Fiji_ has joined #ffmpeg
<aloo_shu>
any pointers welcome
<llyyr>
aloo_shu: why not ask an AI?
<aloo_shu>
right?
JanC is now known as Guest3590
Guest3590 has quit [Killed (calcium.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
<aloo_shu>
so, where I stand: -c copy, in 2 outputs that happen to be ffmpeg's internal experimental http server, is not enough to prevent drift between the two streams over time
<aloo_shu>
which, correct me if I'm wrong, I'm attributing to the fact that ffmpeg will subtly adjust timebase in its own effort to ensure smooth output with audio and video, normally in the same container, synced. And if that's true, then I need piuters for how to replace that with a fixed latency, i.e. output happens $time-constant after input, referenced by the hw clock, and with $time-constant needing to
<aloo_shu>
be enough for all the demuxing, mapping, [transcoding,] muxing to happen, but that's my responsibility, no timebase based correction is to happen if there would be buffer xruns - can ffmpeg do that?
<aloo_shu>
s/piuters/pointers/
<aloo_shu>
maybe that won't work at all with http stream output? but then I'd need to know /that/ in order to end the guessing
lavaball has quit [Remote host closed the connection]
<aloo_shu>
I guess it's that, the 2 http outputs are, possibly need to be, too independent
<aloo_shu>
I'll give up for now, but in case someone wants to leave me useful clues: I do have a working setup where mpd plays audio into a snapcast server and diverse snapclients on my lan, play synced audio, I want to play back video re-using that audio setup, and letting a video player pick up the video side of the original input stream, so that decoding can happen on the target device, but while I need
<aloo_shu>
audio and video separate for routing purposes, I need them somewhat (but not as critically as the snapcast audio clients between themselves) synced regarding transport & timing; it's ok if that means duplicate or dropped video streams, and it's ok and probably helpful if one output, preferrably audio, acts as the sync master. the outputs do not have to be http, but the video component should work
<aloo_shu>
over the network, with browsers and video apps, and the audio component needs to be something that can be added to mpd
<aloo_shu>
*duplicate or dropped video frames (not streams)
damian101 has joined #ffmpeg
k777 has quit [Remote host closed the connection]
microlappy has joined #ffmpeg
microlappy has quit [Client Quit]
microlappy has joined #ffmpeg
microlappy has quit [Client Quit]
vincejv has quit [Remote host closed the connection]
jmcantrell has quit [Ping timeout: 248 seconds]
tranzistor has joined #ffmpeg
<johnjaye>
to aloo_shu point made earlier, the reencoding default behavior of ffmpeg is kinda uninuitive and took awhile for me to figure out.
<johnjaye>
i think the problem is it's not always apparent when -c copy or -c:v copy is applicable and it's what you want by default in a lot of cases like joining or cutting
<johnjaye>
so one gets used to a workflow of not using it but then trying it when speed is an issue
elvis_a_presley has quit [Quit: smoke-bomb ; grapple-hook]
gebra has quit [Quit: mostly reboot, or .. lost]
elvis_a_presley has joined #ffmpeg
gebra has joined #ffmpeg
gebra has quit [Remote host closed the connection]
gebra has joined #ffmpeg
Fiji_ has quit [Ping timeout: 248 seconds]
ja_02 has quit [Remote host closed the connection]
ja_02 has joined #ffmpeg
<aloo_shu>
I'm generally using -c[:streamtype] copy whenever I can, but I'm not often working with multiple outputs, so I didn't have much of an opportunity before to make this mistake
lavaball has joined #ffmpeg
ralfalfa has joined #ffmpeg
<ralfalfa>
I went down the rabbit hole of hwupload=derive_device and found out my video cards don't talk to each other.
<ralfalfa>
I want to comment on my observations regarding the difference I have found in utilizing ffmpeg on windows (as a binary) and utilizing it on linux. Although, it really shouldn't matter if it's a binary or compiled. Anyway, the main thing is I like to convert h264 into h265, on windows I would use hevc_amf. There was no specification of my card, it just knew. But the quality constraints were not
<ralfalfa>
respected, I had to specify bitrate every time, and sometimes it would go so low that the resulting vid was a jumbled mess, the fan would go off like a jet engine and clearly got a bit heated. Switch to linux and what and it's night and day. Fan turns on and off in intervals, q values are respected, I don't have to specify bitrate. Just my 2 cents, I'll keep using it on linux.
<johnjaye>
aloo_shu: i think i figured out the "next argument" thing because i wanted to do something with shifted video or audio and i realized if i do ffmpeg -ss 10 -i input.mp4 ... then it starts the input stream at 10 seconds in.
<johnjaye>
and i reread the docs and i realized all the options apply to the next input or output source.
GuestGuest has quit [Quit: GuestGuest]
GuestGuest has joined #ffmpeg
xx has quit [Ping timeout: 264 seconds]
xx has joined #ffmpeg
dcomp has quit [Ping timeout: 260 seconds]
user_oreloznog has joined #ffmpeg
Fiji_ has joined #ffmpeg
gebra has quit [Quit: mostly reboot, or .. lost]
dcomp has joined #ffmpeg
ralfalfa has quit [Quit: gottago]
bleb has quit [Ping timeout: 245 seconds]
<aloo_shu>
what I want to find out now, is how to use ffmpeg for streaming with transport control, transport, not as in a transport layer encapsulating an application layer, but as in having tape machines & film projectors start, stop, seek and play back or record coordinatedly, in a classic studio with smpte sync, but the terminology has carried over to e.g. the jack audio connection kit
<aloo_shu>
if ffmpeg is supporting anything like it
bleb has joined #ffmpeg
javabean has quit [Quit: well, shoot]
javabean has joined #ffmpeg
<aloo_shu>
it adapts streaming/output to the situation, be it disk io, or a network client stopping, starting, seeking, what I need to achieve, is that stream B adapts to what's happening with stream A, and it would ofc be cool if I could stay in a single tool like ffmpeg in order to get there
gebra has joined #ffmpeg
gebra has quit [Changing host]
gebra has joined #ffmpeg
zmt01 has joined #ffmpeg
halloy5771 has joined #ffmpeg
zmt00 has quit [Ping timeout: 276 seconds]
<aloo_shu>
but all mention I see of 'sync' in man ffmpeg, is concerned with syncing between input files, syncing audio to video timestamps, and deriving the output timestamps from the input ones, but not syncing output delivery between outputs, so maybe I'm looking for the impossible (or looking innthe wrong place in the main man page)
halloy5771 has quit [Quit: halloy5771]
marcj has joined #ffmpeg
damian101 has quit [Ping timeout: 245 seconds]
damian101_ has joined #ffmpeg
damian101 has joined #ffmpeg
Vonter has quit [Ping timeout: 252 seconds]
damian101_ has quit [Ping timeout: 276 seconds]
Vonter has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 272 seconds]
EmleyMoor has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 260 seconds]
EmleyMoor has joined #ffmpeg
Fiji_ has quit [Ping timeout: 244 seconds]
lavaball has quit [Remote host closed the connection]
ahc has joined #ffmpeg
Shine_ has quit [Read error: Connection reset by peer]
de-facto has quit [Remote host closed the connection]
de-facto has joined #ffmpeg
jmcantrell has joined #ffmpeg
Fiji_ has joined #ffmpeg
Traneptora has quit [Quit: Quit]
Keshl_ has quit [Read error: Connection reset by peer]
Keshl has joined #ffmpeg
user_oreloznog has quit [Ping timeout: 244 seconds]