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
MyTDT has quit [Remote host closed the connection]
<ninjin>
I have a mixture of H.264 files. Some "live encodes" that were encoded just-in-time ("CBR") and others that are "offline encodes" (VBR). Is there a way to tell these apart programmatically? Bonus points if the techniques goes beyond H.264 to say VP9 and AV1.
<compnn>
sure yes
<compnn>
there are a few tools to mass identify video files
<compnn>
at least they report codecs
<compnn>
there is mediainfo , or theres a dumb mplayer script somewhere midentify.
<compnn>
most people use mediainfo
<compnn>
because it will detail more about the vbr/cbr
<ninjin>
Thanks, let me have a look at what mediainfo produces. What I see from ffprobe is not enough for me to tell the difference at least.
<compnn>
ninjin, if you are looking to deduplicate (delete duplicated files) there are also other projects to do that for video files
<ninjin>
Well, what I am looking to do is to transcode "CBR" files that come straight from live streams so that they do not eat up such a massive amount of disk space.
<compnn>
ah
<compnn>
then just sort by size and drop them all into your converter script
<ninjin>
But I would prefer not to have to keep around some database or file naming scheme to tell them apart.
<compnn>
and by them all, i mean the all them larger files
<compnn>
takes too long to check files for cbr/vbr just set them to reencode and ez done
<ninjin>
I guess I could do that and then stop looping once I get roughly (the same) size outputs. But dear lord is that hacky.
<compnn>
yea but saves time. time is money
<ninjin>
But am I correct that telling the darn things apart is something that is not easily done programmatically? My understanding is that very few of the magic variables we feed into the encoder make it into the final file. Correct?
Faely has joined #ffmpeg
<ninjin>
So we end up with nasty heuristics and no clear definition of what is what.
* ninjin
considers going to read the source for how mediainfo determines the "Bit rate mode" value.
FlorianBad has quit [Quit: Konversation terminated!]
FlorianBad has joined #ffmpeg
<ninjin>
Reading MediaInfoLib, it is indeed heuristics central (sometimes not even with any at all). Although H.264 seems to have a flag, but too tired to dig into the spec (is it even public?) to figure out how it works.
MyTDT_ has quit []
MyTDT_ has joined #ffmpeg
<grib>
ninjin: Good question (is it just a matter of heuristics rather than metadata), and good solution (read the source of something that distinguishes).
<grib>
I suspect that you could get a long way with just counting how many different packet sizes there are (eg: `ffprobe -show_entries -print_format=compact packet=size "$input_file" | sort | uniq | wc -l `)
abdu71 has joined #ffmpeg
abdu69 has quit [Ping timeout: 240 seconds]
jmcantrell has joined #ffmpeg
bertieb_ has quit [Read error: Connection reset by peer]
bertieb has joined #ffmpeg
abdu71 has quit [Ping timeout: 240 seconds]
thelounge2645 has joined #ffmpeg
thelounge264 has quit [Ping timeout: 252 seconds]
thelounge2645 is now known as thelounge264
MyTDT_ has quit [Remote host closed the connection]
maxim_d33 has quit [Ping timeout: 268 seconds]
maxim_d33 has joined #ffmpeg
MyTDT_ has joined #ffmpeg
MyTDT_ has quit [Remote host closed the connection]
MyTDT_ has joined #ffmpeg
MyTDT__ has joined #ffmpeg
Faely has quit [Read error: Connection reset by peer]
MyTDT_ has quit [Ping timeout: 252 seconds]
<ninjin>
grib: Cheers! I may be able to do something with awk to say calculate variance based on it and use that with a heuristic threshold if the raw count is not enough.
Faely has joined #ffmpeg
jmcantrell has quit [Quit: WeeChat 4.5.2]
Vonter has quit [Ping timeout: 252 seconds]
emanuele6 has quit [Read error: Connection reset by peer]
zerostack has quit [Ping timeout: 244 seconds]
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg
CHR0N0S has quit [Quit: CHR0N0S]
CHR0N0S has joined #ffmpeg
CHR0N0S has quit [Client Quit]
stonerl has quit [Ping timeout: 245 seconds]
stonerl_ has quit [Ping timeout: 245 seconds]
Ayush15 has joined #ffmpeg
Ayush15 has quit [Client Quit]
stonerl has joined #ffmpeg
stonerl_ has joined #ffmpeg
coldfeet has joined #ffmpeg
xx has joined #ffmpeg
twelve has joined #ffmpeg
<compnn>
ninjin, like i said, just reencode everything and move onto next job :D
MyTDT__ has quit [Remote host closed the connection]
MyTDT has joined #ffmpeg
MyTDT has quit [Remote host closed the connection]
MyTDT has joined #ffmpeg
YUiNA has joined #ffmpeg
YUiNA_ has quit [Ping timeout: 252 seconds]
fling has quit [Remote host closed the connection]
stolen has quit [Quit: Connection closed for inactivity]
lavaball has quit [Remote host closed the connection]
MyTDT has quit [Remote host closed the connection]
MyTDT has joined #ffmpeg
drew` has joined #ffmpeg
<drew`>
I am trying to select just some streams from an .mkv. I did ffprobe -i myfile.mkv and I see the streams are named like: Input #0, matroska,webm, from 'myfile.mkv' ... Stream #0:2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s ... Stream #0:4(eng): Subtitle: subrip
<drew`>
I tried ffmpeg -i myfile.mkv -map 0:v -map 0:a:2 -map 0:s:4 -c copy outfile.mkv but I am getting Stream map '0:a:2' matches no streams.
<drew`>
am I doing this wrong?
MyTDT has quit [Remote host closed the connection]
<drew`>
ah I just did the streams as they showed up in ffprobe, like -map 0:2 -map 0:4 etc.
MyTDT has joined #ffmpeg
<another|>
`-map 0:a:2` matches the third AUDIO stream
abdu has joined #ffmpeg
damian101 has joined #ffmpeg
damian101 has quit [Ping timeout: 252 seconds]
minimal has quit [Quit: Leaving]
foonix has quit [Quit: leaving]
lemourin has quit [Read error: Connection reset by peer]
lemourin has joined #ffmpeg
foonix has joined #ffmpeg
MisterMinister has quit [Ping timeout: 260 seconds]
MisterMinister has joined #ffmpeg
lavaball has joined #ffmpeg
lemourin7 has joined #ffmpeg
lemourin has quit [Killed (mercury.libera.chat (Nickname regained by services))]
lemourin7 is now known as lemourin
Shine_ has quit [Read error: Connection reset by peer]
MisterMinister has quit [Ping timeout: 252 seconds]
MisterMinister has joined #ffmpeg
LainExperiments has quit [Quit: Client closed]
YuGiOhJCJ has joined #ffmpeg
abdu65 has joined #ffmpeg
abdu32 has joined #ffmpeg
abdu has quit [Ping timeout: 240 seconds]
abdu65 has quit [Ping timeout: 240 seconds]
abdu32 has quit [Ping timeout: 240 seconds]
yuckey2d0 has quit [Ping timeout: 244 seconds]
jprjr has quit [Read error: Connection reset by peer]
jprjr has joined #ffmpeg
YUiNA_ has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
YUiNA has quit [Ping timeout: 260 seconds]
abdu32 has joined #ffmpeg
abdu32 has quit [Ping timeout: 240 seconds]
lemourin8 has joined #ffmpeg
lemourin8 is now known as lemourin
lemourin is now known as Guest2422
YUiNA has joined #ffmpeg
Guest2422 has quit [Ping timeout: 252 seconds]
YUiNA_ has quit [Ping timeout: 252 seconds]
dionisis has quit [Quit: WeeChat 3.8]
abdu has joined #ffmpeg
<drew`>
I gotcha. thanks another|
drew` has quit [Quit: WeeChat 4.4.3]
chiselfuse has quit [Remote host closed the connection]