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
Buliarous has joined #ffmpeg
Kei_N has joined #ffmpeg
chiselfuse has quit [Ping timeout: 260 seconds]
chiselfuse has joined #ffmpeg
buhman has quit [Ping timeout: 252 seconds]
sopparus has quit [Ping timeout: 248 seconds]
llinguini has quit [Ping timeout: 248 seconds]
Naleksuh has quit [Ping timeout: 252 seconds]
Son_Goku has quit [Ping timeout: 252 seconds]
jdek has quit [Ping timeout: 252 seconds]
yans has joined #ffmpeg
fristed has joined #ffmpeg
buhman has joined #ffmpeg
sopparus has joined #ffmpeg
Son_Goku has joined #ffmpeg
jdek has joined #ffmpeg
Naleksuh has joined #ffmpeg
llinguini has joined #ffmpeg
vincejv has quit [Remote host closed the connection]
FlorianBad has quit [Remote host closed the connection]
AlwynEvokedHippe has joined #ffmpeg
xx has quit [Ping timeout: 260 seconds]
<AlwynEvokedHippe> Hi folks, hope you're all well.
<AlwynEvokedHippe> I have a question regarding output formats.
<AlwynEvokedHippe> Given a certain "codec_name" for a stream (as provided by ffprobe), can I map that to a value for the "-f" flag in ffmpeg?
<AlwynEvokedHippe> ---
<AlwynEvokedHippe> The context being I have an old video file which ffprobe tells me has a "msmpeg4v3" codec_name, and codec_tag_string "DIV3", but toying with ffmpeg "-f" values like msmpeg4v3, msmpeg, h263, DIV3 all result in either an error telling me that muxer doesn't exist, or that it's not compatible for the input video stream.
<AlwynEvokedHippe> I've tried looking at the ffmpeg man page for the "-f" flag, and doing a (admittedly cursory) search on the Git for keywords, but I'm a bit stumped... :)
<AlwynEvokedHippe> I'd be very appeciative if anyone had advice.
<another|> `-f` sets the file format, not the codec
<aaabbb> what is it you are trying to do?
<AlwynEvokedHippe> Apologies for the multiple messages, didn't realise LimeChat would do that at line-downs.
<AlwynEvokedHippe> Ah that seems clear now. I was a bit confused as an example I saw online where "-f" had a value of h264, which I associate with the codec, but I guess that can be a container too in some instances.
<another|> that's raw h264
<another|> some codecs can be contained in a raw file without a container
<aaabbb> there are very few situations where you'd use raw h264. for -f you could do mp4, or matroska etc but the codec is still h264 (assuming that's what it is)
<AlwynEvokedHippe> aaabbb, it is probably a X-Y problem I have to admit. One part of an (embarrisingly hacky, just for home use), 264 to 265 conversion script I wrote had me read a single video stream size by piping out to stdout and reading bytes counted. This worked by making use of "-f h264".
<AlwynEvokedHippe> *embarrassingly
<aaabbb> is it a raw h264 stream you have and you want to convert it to h265?
<aaabbb> or is it in a container?
<aaabbb> the minimum you can do: ffmpeg -i $in -c:v libx265 out.mp4
<aaabbb> if ffmpeg recognizes the input, then it will transcode it to h265. assuming no audio (otherwise it will default to transcoding audio to aac)
<AlwynEvokedHippe> That part I have working, although it's probably all sorts of bad-practice on my part. I read H265 requires about half the bit rate, and to provide the 265 converter with a constant bit rate, you need to do 2-pass encoding, so part of my script ended up like this.
<AlwynEvokedHippe> video_stream_total_bytes=$(ffmpeg -nostdin -i "$file_path" -map 0:v:0 -c copy -f h264 - 2>/dev/null | wc --bytes)
<AlwynEvokedHippe> # ... a few commands utilizing bc to get a kbit/s value into a variable, then divide by that by 2, and go through a 2-pass H265 conversion with calculated bit rate
<AlwynEvokedHippe> It was mostly just out of curiosity that led me to throw this old "msmpeg4v3" file into it, and got me to wondering about the "-f" option.
<BtbN> Never heard "half the bitrate". It's far from that simple
minimal has quit [Quit: Leaving]
<BtbN> also, such comparisons always assume you are encoding the same lossless input
<aaabbb> AlwynEvokedHippe: be aware that transcoding *always* causes quality loss with lossy codec like this
<BtbN> re-encoding something already lossy throws a lot of it out of the window, and often isn't worth it, unless the original uses an excessive bitrate
<aaabbb> that's what i find too. if the original uses excessive bitrate like it is from a phone recording in real-time at 20mbps then it makes sense to transcode
<aaabbb> it's not like decompressing an old zip and recompressing with a newer xz. with lossy codecs for video or audio, you're stuck with whatever it was originally encoded as, unless you are willing to lose quality to transcode
Rue has quit [Quit: WeeChat 4.3.3]
Rue has joined #ffmpeg
<AlwynEvokedHippe> That does seem to be the case from what I've read online :)
<AlwynEvokedHippe> If it's the case quality loss will occur, unless there's an excessive bitrate, then maybe updating my old videos to H265 isn't worth it.
<AlwynEvokedHippe> In any case, thanks guys, the "-f" problem I had was answered up above when it was clarified that it's for file/container format specifically rather than codec, thanks! I RTFM, but I need to read it better, haha
<BtbN> there is _always_ quality loss
<BtbN> it's just that if the bitrate is so high that the content is virtually lossless, taking the quality hit is worth the huge savings in size
Suchiman has quit [Quit: Connection closed for inactivity]
<aaabbb> AlwynEvokedHippe: it's rarely useful to "update" videos if they are already in a distribution format (vs an intermediate format used for editing, like prores)
<aaabbb> because there will always be a newer and better codec. av1 is better than h265 for example but i wouldn't even transcode old videos to it unless i was keeping the originals
<aaabbb> transcoding is fine to cut the size at the expense of quality, as long as you keep the original. so it's what i do if i'm going to send someone a video that's too big otherwise
<AlwynEvokedHippe> Gotcha, cheers. Suppose it's a use-case-by-use-case scenario really.
<AlwynEvokedHippe> As a side note and pure technical curiosity at this point since I won't go down this path, instead of my hacky "ffmpeg ... -f h264 - | wc --bytes" method of finding the size of a single stream, is there a more sane way to do this?
<BtbN> multiply its bitrate by the length
<BtbN> ffprobe shows both
<BtbN> the bitrate is only an estimate though, and can be way off
<AlwynEvokedHippe> Ah fair fair. I can see "bit_rate" under the "format" section, so I guess that's just a cumulative sort of number for all v/a/s streams.
<AlwynEvokedHippe> Ah I'm a dummy, there is one in the stream itself, too. Sorry
<AlwynEvokedHippe> Anyway, I think I've wasted enough of you kind folks' time with my silly questions :) Thanks again for the help!
Vonter has joined #ffmpeg
AlwynEvokedHippe has quit [Quit: Leaving...]
yans has quit [Ping timeout: 244 seconds]
vincejv has joined #ffmpeg
lucasta has joined #ffmpeg
Tinos has joined #ffmpeg
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
Tinos has quit [Ping timeout: 256 seconds]
Tinos has joined #ffmpeg
evilscreww has joined #ffmpeg
FlorianBad has joined #ffmpeg
evilscreww has quit [Ping timeout: 240 seconds]
Tinos has quit [Ping timeout: 256 seconds]
Kei_N has quit [Read error: Connection reset by peer]
namazso has quit [Remote host closed the connection]
namazso has joined #ffmpeg
Tinos has joined #ffmpeg
Ekho has quit [Quit: CORE ERROR, SYSTEM HALTED.]
Ekho has joined #ffmpeg
SystemError has quit [Remote host closed the connection]
five6184803391 has quit [Remote host closed the connection]
SystemError has joined #ffmpeg
five6184803391 has joined #ffmpeg
YuGiOhJCJ has joined #ffmpeg
lucasta has quit [Quit: Leaving]
mikehu44 has joined #ffmpeg
nact has quit [Ping timeout: 244 seconds]
Renb has joined #ffmpeg
Rena has quit [Ping timeout: 252 seconds]
rv1sr has joined #ffmpeg
lavaball has joined #ffmpeg
Tinos has quit [Ping timeout: 256 seconds]
jagannatharjun has joined #ffmpeg
vincejv has quit [Ping timeout: 252 seconds]
vincejv has joined #ffmpeg
HerbY_NL has joined #ffmpeg
<johnjaye> is transcoding really that big of a problem?
<aaabbb> johnjaye: problem meaning quality loss?
<johnjaye> yes. is it quantifiable
<johnjaye> like 1% loss per capita?
<aaabbb> oh much much much more
<aaabbb> and how much depends on many factors
<johnjaye> oh i see. so if i sit here and reencode something from say x264 to 265 repeatedly it will degrade rapidly?
<JEEB> yes, esp. if you expect it to generally lead to smaller files
<aaabbb> or from x264 to x264, or from $anything to $anything
<JEEB> since of course you can keep similar quality by giving enough bits, but that can be as much if not more since you are not re-encoding compression artifacts from the initial encode :D
<JEEB> uhh... "you are now"
<aaabbb> the only exception is lossless codecs, but they have bitrates that are too big for typical vidos that you just want to watch
<johnjaye> it sounds like you will increase file size while decreasing quality if you do an infinite sequence of reencodes
<aaabbb> the file size is arbitrary, you can make it get bgger, or smaller, or stay the same
<aaabbb> whether the default settings result in a bigger or smaller file than the input doesn't matter
<aaabbb> the only time to reencode is if you either start with a mezzanine codec like prores (ultra high quality, bad compression ratio) and want to convert it into a form ready for distribution, or if you are temporarily converting a big file to something smaller eg to show someone, and you don't mind quality loss
<aaabbb> same thing is true with audio codecs btw
<aaabbb> lossy ones
vincejv has quit [Ping timeout: 255 seconds]
vincejv has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
xx has joined #ffmpeg
Tinos has joined #ffmpeg
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
evilscreww has joined #ffmpeg
kasper93_ has joined #ffmpeg
kasper93 has quit [Ping timeout: 272 seconds]
evilscreww has quit [Quit: Leaving]
Suchiman has joined #ffmpeg
Blacker47 has joined #ffmpeg
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
mikwee has joined #ffmpeg
<mikwee> Hello
<mikwee> The command `ffplay -f video4linux2 -list_formats all /dev/video1` results in the error `[video4linux2,v4l2 @ 0x7f79a8000c80] ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
<mikwee> /dev/video1: Inappropriate ioctl for device`
<mikwee> I'm trying to play output from a capture card
intrac has quit [Quit: Konversation terminated!]
intrac has joined #ffmpeg
mccobsta has quit [Quit: The Lounge - https://thelounge.chat]
mccobsta has joined #ffmpeg
squeaktoy has quit [Ping timeout: 260 seconds]
squeaktoy has joined #ffmpeg
j45 has quit [Quit: ZNC 1.8.2 - https://znc.in]
j45 has joined #ffmpeg
HerbY_NL has quit [Ping timeout: 252 seconds]
HerbY_NL has joined #ffmpeg
vincejv has quit [Ping timeout: 252 seconds]
vincejv has joined #ffmpeg
HerbY_NL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_rubik has quit [Quit: %Catch you later%]
FlorianBad has quit [Remote host closed the connection]
Starz0r has quit [Ping timeout: 260 seconds]
Starz0r has joined #ffmpeg
_rubik has joined #ffmpeg
coldfeet has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
kasper93 has joined #ffmpeg
kasper93_ has quit [Ping timeout: 252 seconds]
lemoniter has joined #ffmpeg
kasper93_ has joined #ffmpeg
kasper93 has quit [Ping timeout: 252 seconds]
kasper93_ has quit [Ping timeout: 248 seconds]
kasper93 has joined #ffmpeg
HerbY_NL has joined #ffmpeg
lavaball has joined #ffmpeg
Blacker47 has quit [Quit: Life is short. Get a V.90 modem fast!]
vlm has joined #ffmpeg
HerbY_NL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimal has joined #ffmpeg
lucasta has joined #ffmpeg
mikwee has quit [Ping timeout: 246 seconds]
Hikaru_ has joined #ffmpeg
<Hikaru_> hey all
<Hikaru_> i recently moved from an intel box to an amd box
<Hikaru_> when encoding now, i notice on the stats line, that the filesize no longer updates as frequently
<Hikaru_> is this normal?
<Hikaru_> like maybe once every five seconds it will update with the new values, while all the other values update in realtime like before
Tano has quit [Quit: WeeChat 4.3.2]
cmc has quit [Remote host closed the connection]
cmc has joined #ffmpeg
vincejv has quit [Ping timeout: 248 seconds]
vlm has quit [Quit: Leaving]
vincejv has joined #ffmpeg
<kepstin> Hikaru_: that behaviour depends on which encoder is being used, but it can be normal in some situations.
minimal has quit [Quit: Leaving]
lucasta has quit [Quit: Leaving]
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
vincejv has quit [Ping timeout: 248 seconds]
kasper93 has quit [Ping timeout: 252 seconds]
vincejv has joined #ffmpeg
beaver has joined #ffmpeg
beaver_ has joined #ffmpeg
beaver_ has quit [Remote host closed the connection]
kasper93 has joined #ffmpeg
vincejv has quit [Ping timeout: 272 seconds]
kasper93 has quit [Ping timeout: 272 seconds]
vincejv has joined #ffmpeg
stolen has joined #ffmpeg
lucasta has joined #ffmpeg
vincejv has quit [Ping timeout: 248 seconds]
vincejv has joined #ffmpeg
vincejv has quit [Ping timeout: 252 seconds]
vincejv has joined #ffmpeg
Blacker47 has joined #ffmpeg
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg
vincejv has quit [Ping timeout: 252 seconds]
HerbY_NL has joined #ffmpeg
jarthur has joined #ffmpeg
vincejv has joined #ffmpeg
HerbY_NL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kasper93 has joined #ffmpeg
vincejv has quit [Ping timeout: 260 seconds]
vincejv has joined #ffmpeg
vincejv has quit [Ping timeout: 255 seconds]
rhys1 has quit [Ping timeout: 260 seconds]
beaver has quit [Remote host closed the connection]
vincejv has joined #ffmpeg
SystemError has quit [Remote host closed the connection]
vincejv has quit [Ping timeout: 252 seconds]
beaver has joined #ffmpeg
vincejv has joined #ffmpeg
zsoltiv_ has quit [Ping timeout: 246 seconds]
vincejv has quit [Ping timeout: 272 seconds]
vincejv has joined #ffmpeg
realies has quit [Ping timeout: 248 seconds]
vincejv has quit [Ping timeout: 276 seconds]
vincejv_ has joined #ffmpeg
iurirs has quit [Ping timeout: 260 seconds]
beaver has quit [Remote host closed the connection]
vincejv_ has quit [Ping timeout: 248 seconds]
vincejv has joined #ffmpeg
coldfeet has joined #ffmpeg
lucasta has quit [Remote host closed the connection]
kron has quit [Quit: kron]
FlorianBad has joined #ffmpeg
HerbY_NL has joined #ffmpeg
mrelcee has quit [Quit: I want Waffles!]
mrelcee has joined #ffmpeg
Tinos has quit [Remote host closed the connection]
realies has joined #ffmpeg
HerbY_NL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tinos has joined #ffmpeg
stolen has quit [Quit: Connection closed for inactivity]
kron has joined #ffmpeg
Derlg_ is now known as Derlg
SystemError has joined #ffmpeg
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ffmpeg
Tano has joined #ffmpeg
jarthur has quit [Ping timeout: 260 seconds]
phantomics_ has joined #ffmpeg
kepstin has quit [Ping timeout: 260 seconds]
kepstin has joined #ffmpeg
bcheng has quit [Ping timeout: 260 seconds]
vincejv has quit [Remote host closed the connection]
rossome has quit [Ping timeout: 260 seconds]
phantomics has quit [Ping timeout: 260 seconds]
bcheng has joined #ffmpeg
minimal has joined #ffmpeg
jarthur has joined #ffmpeg
rex has quit [Read error: Connection reset by peer]
rex has joined #ffmpeg
rossome has joined #ffmpeg
HerbY_NL has joined #ffmpeg
darkapex_ has quit [Remote host closed the connection]
darkapex_ has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
HerbY_NL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coldfeet has joined #ffmpeg
kxrm has quit [Ping timeout: 246 seconds]
lavaball has quit [Remote host closed the connection]
coldfeet has quit [Quit: leaving]
beaver has quit [Quit: tada]
rex has quit [Quit: Bye]
jagannatharjun has quit [Quit: Connection closed for inactivity]
HarshK23 has quit [Quit: Connection closed for inactivity]
coldfeet has joined #ffmpeg
rex has joined #ffmpeg
rv1sr has quit [Ping timeout: 245 seconds]
rv1sr has joined #ffmpeg
coldfeet has quit [Quit: leaving]
yans has joined #ffmpeg
SystemError has quit [Remote host closed the connection]
Blacker47 has quit [Quit: Life is short. Get a V.90 modem fast!]
coldfeet has joined #ffmpeg
SystemError has joined #ffmpeg
Hikaru_ has quit [Remote host closed the connection]
Hikaru has joined #ffmpeg
Hikaru is now known as Guest3255
Guest3255 has quit [Remote host closed the connection]
aaabbb has quit [Ping timeout: 272 seconds]
s55 has quit [Quit: ZNC 1.9.0 - https://znc.in]
s55 has joined #ffmpeg
Hikaru_ has joined #ffmpeg
Traneptora has quit [Ping timeout: 255 seconds]
mven971 has joined #ffmpeg
SuicideShow has quit [Ping timeout: 246 seconds]
mven97 has quit [Ping timeout: 252 seconds]
mven971 is now known as mven97
coldfeet has quit [Read error: Connection reset by peer]
SuicideShow has joined #ffmpeg
h4x0riz3d is now known as antto
bitbinge has joined #ffmpeg
Vonter has quit [Ping timeout: 252 seconds]
TheSilentLink_ has joined #ffmpeg
TheSilentLink has quit [Ping timeout: 265 seconds]
TheSilentLink_ is now known as TheSilentLink
Hikaru_ has quit [Remote host closed the connection]
rv1sr has quit []
Tinos has quit [Remote host closed the connection]
aaabbb has joined #ffmpeg
emmanuelux has joined #ffmpeg