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
nitrix has quit [Ping timeout: 252 seconds]
LainIwakura has joined #ffmpeg
nitrix has joined #ffmpeg
bleb has quit [Ping timeout: 276 seconds]
Nintendo has quit [Read error: Connection reset by peer]
Nintendo has joined #ffmpeg
Dagger has quit [Ping timeout: 276 seconds]
fling has quit [Ping timeout: 264 seconds]
Dagger has joined #ffmpeg
cers has quit [Ping timeout: 245 seconds]
fling has joined #ffmpeg
__jmcantrell__ has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
xx has quit [Remote host closed the connection]
cers has joined #ffmpeg
cers has quit [Ping timeout: 265 seconds]
cers has joined #ffmpeg
Dagger has quit [Ping timeout: 248 seconds]
cers has quit [Ping timeout: 252 seconds]
haihao has quit [Ping timeout: 272 seconds]
Dagger has joined #ffmpeg
haihao has joined #ffmpeg
EmleyMoor has quit [Ping timeout: 265 seconds]
user23 has quit [Remote host closed the connection]
EmleyMoor has joined #ffmpeg
cers has joined #ffmpeg
cers has quit [Ping timeout: 276 seconds]
lolok has quit [Quit: lolok]
lolok has joined #ffmpeg
cers has joined #ffmpeg
cers has quit [Ping timeout: 272 seconds]
maxim_d33 has quit [Ping timeout: 276 seconds]
maxim_d33 has joined #ffmpeg
cers has joined #ffmpeg
cers has quit [Ping timeout: 244 seconds]
derpydoo has joined #ffmpeg
Nintendo has quit [Read error: Connection reset by peer]
Nintendo has joined #ffmpeg
cers has joined #ffmpeg
cers has quit [Ping timeout: 260 seconds]
cers has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
<intrac>
although it's complaining about "Format ea_cdata detected only with low score of 12, misdetection possible!"
<intrac>
"Consider increasing the value for the 'analyzeduration' (800000) and 'probesize' (800000) options"
JanC has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
<intrac>
I just realised MPV can display the stats and it updates as the stream changes
cers has quit [Ping timeout: 260 seconds]
<intrac>
should a compliant .mp4 file switch resolution/colourspace part way through a stream?
<intrac>
other formats like TS (transport streams) can change at least some parameters, I believe
<intrac>
but I'm not sure about .mp4 containers/files. I thought they might be fixed
lavaball has quit [Remote host closed the connection]
cers has joined #ffmpeg
<another|>
not sure
emmanuelux has quit [Read error: Connection reset by peer]
cers has quit [Remote host closed the connection]
cers has joined #ffmpeg
Traneptora has joined #ffmpeg
m5zs7k has quit [Ping timeout: 244 seconds]
m5zs7k has joined #ffmpeg
Arokh has quit [Ping timeout: 265 seconds]
Arokh has joined #ffmpeg
Nintendo has quit [Read error: Connection reset by peer]
Nintendo has joined #ffmpeg
psykose has quit [Remote host closed the connection]
psykose has joined #ffmpeg
cers has quit [Ping timeout: 245 seconds]
grahamn has joined #ffmpeg
__jmcantrell__ has joined #ffmpeg
cers has joined #ffmpeg
lavaball has joined #ffmpeg
cers has quit [Ping timeout: 252 seconds]
EmleyMoor has quit [Ping timeout: 272 seconds]
EmleyMoor has joined #ffmpeg
user_oreloznog has joined #ffmpeg
swamp_ has joined #ffmpeg
zmt01 has quit [Ping timeout: 252 seconds]
CeiLciuZ has joined #ffmpeg
CeiLciuZ has left #ffmpeg [Leaving]
EmleyMoor has quit [Ping timeout: 260 seconds]
EmleyMoor has joined #ffmpeg
__jmcantrell__ has quit [Ping timeout: 244 seconds]
coldfeet has quit [Quit: Lost terminal]
cers has joined #ffmpeg
flotwig has quit [Excess Flood]
flotwig has joined #ffmpeg
flotwig has quit [Changing host]
flotwig has joined #ffmpeg
cers has quit [Ping timeout: 248 seconds]
fling has quit [Ping timeout: 264 seconds]
grahamn has quit [Remote host closed the connection]
grahamn has joined #ffmpeg
___nick___ has joined #ffmpeg
___nick___ has quit [Client Quit]
___nick___ has joined #ffmpeg
<johnjaye>
intrac: are you asking a simple question or a deep complex one. i can't tell
<johnjaye>
i thought video files in general had headers so you can't just analyze from a random offset
nurupo has quit [Quit: nurupo.ga]
nurupo has joined #ffmpeg
<furq>
yeah that won't work for mp4
<furq>
and if the video track properties change mid-stream then that wouldn't necessarily be something the container knows about
<intrac>
johnjaye: I guess it's a fairly deep question :)
<furq>
if it's h264 you can demux the stream and use something like h264_analyze to see if there are multiple sps nalus
<intrac>
johnjaye: it depends on the format. some formats like TS (transport streams) repeat the header/stream info data at regular intervals
<intrac>
so some things aren't fixed
<intrac>
furq: MPV at least reports a resolution change part way through the stream
<furq>
well there you go
<intrac>
I also suspect some aspect of the sound similarly (but that isn't quite so easy to analyse, so far)
Shine_ has quit [Read error: Connection reset by peer]
<intrac>
the pitch is incorrect for the latter part of the file
<furq>
that would make sense because i don't think that's supposed to work
<intrac>
I suspect the audio at the start might be one format, then it changes (sample rate, or similar) and this throws off the latter part of the playback
<furq>
yeah
<furq>
that's what i would expect if someone has concatenated two files with mismatched resolutions and sample rates
<furq>
the video should work fine but the audio will probably break
<intrac>
sometimes, the player will just show black from the transition point onwards
LRN_ is now known as LRN
<intrac>
you have to coax it over the join point
<intrac>
then it shows video and audio (although the audio is the wrong pitch)
<furq>
yeah if you seek past the sps then everything beyond that won't work
<furq>
and/or pps
<furq>
this is assuming h264 but i think other modern codecs are similar
grahamn has quit [Ping timeout: 248 seconds]
__jmcantrell__ has joined #ffmpeg
cers has joined #ffmpeg
<johnjaye>
i finally found the -hide_banner option after all this time
<johnjaye>
furq: what's a good checklist to go down when concating streams? i just look at resolution, framerate for video. so sample rate for audio?
<furq>
and channel count
<johnjaye>
oh right
<johnjaye>
i've only had to concat video of different types usually
<johnjaye>
audio most of the time i'm just copying
<johnjaye>
i learned the hardware having different framerates is not a fun time
<johnjaye>
*hard way
___nick___ has quit [Ping timeout: 252 seconds]
___nick___ has joined #ffmpeg
<intrac>
furq: for context, I'm using yt-dlp to save Twitch livestreams
<intrac>
Twitch prepends a 'commercial break in progress' countdown to the beginning of streams viewed this way
<intrac>
it's not actually an advert, just a holding slide
<intrac>
I guess because they might not be able to serve adverts, they still want to make the user wait for the equivalent time
<intrac>
but this holding screen is 1080p, but the actual stream from the Twitch broadcaster might not be
<intrac>
and it looks like Twitch might just be stitching two stream types together
<furq>
well that shouldn't be an issue
<furq>
but if they're different sample rates then that's probably not good
<furq>
i'm guessing their player handles this in some out-of-band way
<intrac>
furq: ok, one interesting thing - if I open a live Twitch link in MPV (which uses yt-dlp in the background) I still see the commercial holding screen
<intrac>
but the audio pitch is correct after switching to the broadcaster stream
ttys000 has quit [Ping timeout: 244 seconds]
<intrac>
also, if I use yt-dlp and while it's capturing the stream (to a temporary .mp4.part file) again, the audio plays correctly (with MPV and ffplay)
Arokh has quit [Ping timeout: 248 seconds]
<intrac>
where it seems to go wrong is when halting yt-dlp (ctrl+c) and as it's finishing, it says:
<intrac>
"[FixupM3u8] Fixing MPEG-TS in MP4 container"
ttys000 has joined #ffmpeg
<intrac>
I wonder if I can just avoid it doing that last step
* intrac
will look into that
JanC is now known as Guest5841
Guest5841 has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
<intrac>
ok, forcing the output to .ts format fixes this issue
<intrac>
also playing with the .ts with MPV now shows the sample rate changing from 44100 to 48000 (with the .mp4 before, it didn't show this)
<intrac>
so that's sorted
<johnjaye>
intrac: what was the problem? i thought it was twitch giving different sample rates
<intrac>
johnjaye: yep, that's the issue. but then yt-dlp takes the .ts stream (which can handle changes in sample rates within a stream) to an .mp4 container, which seems like it doesn't
<intrac>
it looks like the players look at the .mp4 header info at the start and see '44100', then play it as that and ignore the change to 48000
<intrac>
possibly because there isn't any later metadata to show the change
<intrac>
hopefully that makes sense
<intrac>
.ts files are intended for streaming (digital TV) where a user might drop into a stream at any point
<intrac>
so the header information is repeated at regular intervals
Arokh has joined #ffmpeg
<intrac>
but a lot of non-streaming (file formats) like .mp4 have the header info at the start (or possibly technically at the end) - but in one place
<intrac>
so they can't communicate changes in the stream parameters to the player
<intrac>
that's my loose understanding
<johnjaye>
i see
<johnjaye>
now i have that understanding as well
<johnjaye>
#themoreyouknow
GNUGradyn has joined #ffmpeg
System_Error has quit [Ping timeout: 264 seconds]
<furq>
seems like opus does support switching sample rates
<furq>
but i guess that doesn't help with twitch
rvalue- has joined #ffmpeg
rvalue has quit [Ping timeout: 268 seconds]
GNUGradyn has quit [Quit: Leaving]
cers has quit [Ping timeout: 244 seconds]
bleb has joined #ffmpeg
JanC has quit [Killed (mercury.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
rvalue- is now known as rvalue
System_Error has joined #ffmpeg
JanC is now known as Guest7527
Guest7527 has quit [Killed (silver.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
<kepstin>
opus's sample rate support is ... complex :) its internal sample rate(s), external sample rate, and metadata storing sample rate of the input data prior to sample rate conversion can all be different, and although you can technically run it at 44100Hz that's non-standard and isn't required to be supported.
<kepstin>
for timing purposes and use with rtp, etc, you can basically assume opus is always 48000Hz.
<furq>
well yeah that also makes it redundant
<furq>
but switching from 48k to 24k midstream seems to work fine
<kepstin>
the encoder can decide to change the sample rate it encodes at midstream separately from the input sample rate.
<kepstin>
(and the decoder resamples back to 48KHz)
<kepstin>
i think in the weird hybrid silk+celt mode it can technically be operating in multiple sample rates simultaneously for the different encoding methods.
xx has quit [Remote host closed the connection]
cers has joined #ffmpeg
cers has quit [Ping timeout: 244 seconds]
___nick___ has quit [Ping timeout: 260 seconds]
Nintendo has quit [Read error: Connection reset by peer]
Nintendo has joined #ffmpeg
ocrete has joined #ffmpeg
cers has joined #ffmpeg
cers has quit [Ping timeout: 252 seconds]
Arokh has quit [Ping timeout: 276 seconds]
cers has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
__jmcantrell__ has quit [Ping timeout: 244 seconds]
<intrac>
fwiw, if an .mp4 has previously been downloaded and has this issue, the following seems to work as a fix: ffmpeg -ss 00:00:18 -i input.mp4 -c:v copy -c:a aac -af asetrate=48000,"asetpts=1/0.91875*PTS" output.mp4
<intrac>
the start offset (-ss) is needed to trim off the commercial/ad-break screen, otherwise it can still confuse the media player
<intrac>
the asetpts value is the difference between 44100 and 48000. without this adjustment, the pitch is corrected but the audio drifts from the video over the duration of the video
pebbs_ has joined #ffmpeg
cers has joined #ffmpeg
markizano has quit [Quit: Poweroff]
cers has quit [Ping timeout: 244 seconds]
<furq>
you could just do 48000/44100
pebbs_ has quit [Ping timeout: 260 seconds]
tofran0 has joined #ffmpeg
JanC has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
cers has joined #ffmpeg
SakuraChan has joined #ffmpeg
Sakura`Kinomoto has quit [Ping timeout: 260 seconds]
Sakura`Kinomoto has joined #ffmpeg
SakuraChan has quit [Ping timeout: 244 seconds]
<intrac>
furq: ah ok, yes. I didn't think of that :)
<intrac>
the files are playing ok on my computer, but not a hardware media player (stuttering video and audio)
<intrac>
I'll keep testing
Sakura`Kinomoto has quit [Ping timeout: 268 seconds]
__jmcantrell__ has joined #ffmpeg
__jmcantrell__ has quit [Ping timeout: 252 seconds]
cers has quit [Ping timeout: 252 seconds]
Arokh has quit [Ping timeout: 252 seconds]
Sakura`Kinomoto has joined #ffmpeg
JanC has quit [Killed (mercury.libera.chat (Nickname regained by services))]
JanC has joined #ffmpeg
chiselfuse has quit [Ping timeout: 264 seconds]
Arokh has joined #ffmpeg
ZLima12 has quit [Remote host closed the connection]
Icedream has joined #ffmpeg
ZLima12 has joined #ffmpeg
__jmcantrell__ has joined #ffmpeg
JanC is now known as Guest1562
Guest1562 has quit [Killed (lead.libera.chat (Nickname regained by services))]