<EveHQ>
i guess transconding but i dont know, sorry im not expert, im trying to stream that video
<durandal_1707>
so you get those messages when streaming from server or when receiving from client?
<EveHQ>
when I stream from the server
<durandal_1707>
because in first case, you probably cant do anything about it - input file is broken in some way
<durandal_1707>
also give full logs, by uploading them via pastebin.com or similar
ivanich_ has quit [Remote host closed the connection]
lavaball has quit [Remote host closed the connection]
<ShaedS>
how can I take this string: -af silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0 and mark all the silent portions to a variable/list/array?
<durandal_1707>
there is only silencedetect that outputs text with info when silence starts/stops...
EveHQ has quit [Quit: Connection closed]
blb has quit [Ping timeout: 258 seconds]
blb has joined #ffmpeg
Ogobaga has quit [Read error: Connection reset by peer]
Ogobaga has joined #ffmpeg
dgcampea has quit [Killed (NickServ (Forcing logout dgcampea -> dgcampea))]
dgcampea has joined #ffmpeg
<ShaedS>
durandal_1707> there is only silencedetect that outputs text with info when silence starts/stops. => yes I'm trying ot achiee the lossless verisno of this by identifying those start stops, and then passing that array/varibles into -ss -to
<durandal_1707>
that only works with uncompressed PCM
<durandal_1707>
you cant losslessy trim already compressed mp3/aac/whatever
<durandal_1707>
you can only do some approximations of trim/cut
<durandal_1707>
at the best
thilo has quit [Ping timeout: 246 seconds]
<durandal_1707>
and anything using filters and lossless makes no sense unless you use lossless codecs through all process chain
thilo has joined #ffmpeg
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ffmpeg
twoandtwo has joined #ffmpeg
Ogobaga has quit [Quit: Konversation terminated!]
Ogobaga has joined #ffmpeg
<znf>
Is it possible to do Super-Resolution (ie: upscaling) live?
Muimi has joined #ffmpeg
kus has joined #ffmpeg
waleee has quit [Ping timeout: 260 seconds]
Eoan has joined #ffmpeg
<Eoan>
Hi, quick question, if you are playing something with ffplay on Windows, with current time showing in the terminal window, does pressing Enter move the output to a new line with the old line frozen?
<Eoan>
This is how it works in gnome-shell. I use this to refine audio time measurements and would like to make sure it works the same in Windows
<Eoan>
*gnome-terminal running bash shell
<Eoan>
Clarification, focusing the terminal window and pressing Enter
Sciencentistguy7 has joined #ffmpeg
Sciencentistguy has quit [Ping timeout: 255 seconds]
Sciencentistguy7 is now known as Sciencentistguy
<aaabbb>
znf: you mean in real time, >1x speed?
<znf>
aaabbb, ye
<aaabbb>
that depends on the upscaling algorithm you use, how much spare cpu cycles you have, the source resolution, and the target resolution
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<aaabbb>
the biggest bottleneck will be reencoding the larger resolution video unless you're literally just upscaling and displaying directly to a monitor imediately
<znf>
Eoan, that's not something that is specific to ffmpeg itself (or, ffplay in this case), but the terminal type that you're _currently_ using
<znf>
neither cmd.exe nor Windows Terminal allow you to hit enter when using ffplay
<znf>
aaabbb, that's not the filter I'm talking about
<aaabbb>
that will run only the decoder and upscaling using the lanczos algorithm btw
<znf>
think sr=dnn_backend :)
<aaabbb>
oh i see, the neural network upscaling thing
<znf>
yup
lemourin has quit [Read error: Connection reset by peer]
<aaabbb>
do you have a fast cuda-enabled gpu?
lemourin has joined #ffmpeg
odrling has quit [Remote host closed the connection]
<znf>
I can't test now, as I'm currently on an Intel ARC on my desktop, my 3090 is in a box somewhere
<aaabbb>
are you using a pre trained model? i haven't used the sr filter before, but i've used ml for image procesing and i've found that the model can drstically influence performance
<znf>
I haven't used that either, hence why I was wondering
odrling has joined #ffmpeg
<Eoan>
Thanks, znf!
<znf>
Eoan, still, you _can_ actually use git's Bash to do that
odrling has quit [Remote host closed the connection]
odrling has joined #ffmpeg
maxim_d33 has quit [Ping timeout: 255 seconds]
Traneptora has joined #ffmpeg
Muimi has joined #ffmpeg
maxim_d33 has joined #ffmpeg
_yazooq has joined #ffmpeg
yazooq has quit [Ping timeout: 246 seconds]
<aaabbb>
are there any good intermediate (intra-only, generation loss resistant) video formats supported by ffmpeg that are not patented encumbered and are open?
<aaabbb>
supported either natively or via a well-maintained patch or fork
Muimi has quit [Quit: Going offline, see ya! (www.adiirc.com)]
durandal_1707 has quit [Ping timeout: 246 seconds]
durandal_1707 has joined #ffmpeg
jagannatharjun has joined #ffmpeg
twoandtwo has quit [Quit: Connection closed]
AbleBacon_ has joined #ffmpeg
AbleBacon has quit [Ping timeout: 252 seconds]
Vonter has quit [Quit: WeeChat 4.1.0]
_yazooq has quit [Ping timeout: 264 seconds]
Vonter has joined #ffmpeg
odrling has quit [Remote host closed the connection]
odrling has joined #ffmpeg
Shine_ has joined #ffmpeg
vlt has quit [Server closed connection]
vlt has joined #ffmpeg
<Eoan>
aaabbb, would ffmpeg's own ffv1 work? Wiki says some people use it. Just use '-g 1' for intra-only?
<aaabbb>
Eoan: isn't it lossless? i want a mezzanine codec, so lossy, but resistant to generation loss
<aaabbb>
like prores
<kepstin>
i haven't heard of anything that's explicitly resistant to generation loss. you're pretty much left with intra-only mpeg2 or vp9 or av1, none of which have that as a goal.
<kepstin>
(mpeg2 counts since all of the patents on it have expired)
<Eoan>
Hopefully someone else can give a better response. My understanding is that generation loss has not been a priority for most lossy codecs because they assume a short propagation length: things being created directly from the high-quality master file. But just having high bitrate prevents most generation loss, so why not just high-bitrate VP8, as a
<Eoan>
codec that's reasonably fast and nearly as good as H.264?
<Eoan>
I'm not really sure on patents status of it, though
<aaabbb>
kepstin: all mezzanine codecs are resistant to generation loss, even tho they are lossy
<aaabbb>
because they are intra-only so edits only affect individual frames and one edit doesn't require recompression of the whole gop
<kepstin>
sure, but most lossy codecs can be used in intra-only mode
<aaabbb>
kepstin: yeah but mezzanine codecs are optimized for that purpose, they are extremely fast to encode and decode, have accurate seeking etc
<kepstin>
accurate seeking is a property of the container, not the codec, and many codecs are tunable to have extremely fast encode and decode.
<kepstin>
I honestly normally use a fast preset on x264 for that sort of thing.
<aaabbb>
that's not very good for editing
<aaabbb>
prores is like 20x faster than i-frame x264 at the fastest preset and a low crf
<aaabbb>
and the iframes in prores can be compressed more times before generation loss occurs (at the expense of compression ratio)
<aaabbb>
but prores is proprietary apple...
<kepstin>
well, when you make a new non-patent-encumbered codec which does what you want, please send patches to support it in ffmpeg.
<aaabbb>
kepstin: my question was whether one already exists and is supported by ffmpeg either natively, or via a well-maintained 3rd party patch :)
<kepstin>
if there was, everybody would already be using it.
<aaabbb>
i doubt it, most people have no need for using an open intermediate codec since it's never used for distrubtion
<Eoan>
Did a test. On my 14-year-old laptop with the CPUs limited to 800 MHz, I decoded 1 sec of 1188p ffv1 in 7.9 user seconds, all intra frames at 144 Mb/s. 1 sec of '-crf 10' H264 decoded in 3.6 user seconds, also all intra frames at 56 Mb/s. So if speed is your reason for not using ffv1, I don't think you need to worry about that. Just test it to see
<Eoan>
if your system is fast enough
<aaabbb>
Eoan: i'll have to test 8k 10-bit yuv444p at 120 fps with ffv1 and see if it can do anything
<aaabbb>
intermediate codecs are often used at obscene resolutions, in order to later downscale them for releases
chovy has quit [Server closed connection]
chovy has joined #ffmpeg
dumbledoor has joined #ffmpeg
dumbledoor has quit [Client Quit]
<Eoan>
A quick search suggests downscaling footage during editing: "Finally, if you want a small file size and ease of editing, consider a lower-resolution ProRes or DNxHD file. You might try transcoding your 4K footage to 720p ProRes proxies. In a proxy workflow, you convert your original camera media to a more edit-friendly codec while you’re working
<Eoan>
in your NLE. Then, when you’re done, you relink the original full-resolution media for color grading and delivery."
Haxxa has joined #ffmpeg
sjs has quit [Server closed connection]
<aaabbb>
yeah i do that when making simple edits where i can determine the correctness on 720p
sjs has joined #ffmpeg
<Eoan>
I was going to test generation loss, but '-b:v' apparently does not work for ffmpeg's Prores encoders. So my results for the same input, using ffmpeg with default codec options: codecs 'prores' and 'prores_aw', output size 21004kB at 15 fps; decode time 1.06 sec. Codec 'prores_kw', 33822kB at 3.9 fps; decode time 1.5 sec. Codec 'ffv1', 17633kB at
<Eoan>
15 fps; decode time 2.5 sec.
<kepstin>
prores is _bigger_ than ffv1? that's kinda weird. But note that by default ffv1 is _not_ an intra-only codec; it maintains some state (in its entropy encoder? not sure) between frames.
<aaabbb>
maybe it's using yuv444 and ffv1 is using 420 or something?
<Eoan>
Except that the Prores was automatically converted to yuv422p10le (from yuv420). With that conversion, the ffv1 is 22070kB, encoded at 8.7 fps, decode time 5.3 sec. So it does decode a lot slower than Prores, but the file size is about the same.
<aaabbb>
ah
<aaabbb>
how big are ffv1's gops?
<kepstin>
i don't recall what the default is, but you're free to set it down to 1 if you prefer
<Eoan>
Thanks for reminding me, haha. I remembered '-g 1' on some tests but not this one. Add that, and it goes up to 22324kB, still 8.7 fps, still 5.3 sec to decode.
<aaabbb>
ah!
<furq>
do you need nle support for this intermediate codec
<furq>
i guess you do if you want -g 1
<kepstin>
ffv1 can also do sliced encoding which should improve multithread usage
<furq>
because hardly anything supports ffv1
<Eoan>
Yep, all my tests are on a 2-core processor
<aaabbb>
furq: i do 90% of my editing with ffmpeg :)
<aaabbb>
and things that use the various libav*
<furq>
if you're sticking with oss stuff then that should be broadly fine
<aaabbb>
i'll give ffv1 a try!
<Eoan>
But those are the outputs from ' time ffmpeg -i ffv1.mkv -f null -an -' etc.
<furq>
ffv1 is really impressive for an intra only codec
<furq>
just a bit slow and impractical if you want to use a popular nle
<aaabbb>
Eoan: oh i see, is the encoding speed similar to decoding?
<kepstin>
yeah, it's pretty rare that I'm actually encoding stuff to a temporary file for re-encoding later; most of the editing stuff i do is setting up pipelines which do all of the processing from original input files to final output file in one step (helps that i basically never need to use 2-pass encodes)
<aaabbb>
the files i work with are the kind that i have to do deep inspections. not uncommon for me to consider it finished, and a week later find a problem
<aaabbb>
in some instances i literally step frame by frame
paddymahoney has quit [Remote host closed the connection]
FH_thecat has quit [Quit: Leaving]
AnosVoldigoad has joined #ffmpeg
<Eoan>
Report: compared prores with standard options to x264 with ' -tune fastdecode -preset ultrafast -crf 4 -g 1'. Subtracting the decode time, Prores encoded in 2.97 sec, x264 in 2.39. Decode time is about the same, 1 sec. H264 is 121 Mb/s, prores is 172 Mb/s but Prores 30 dB from the ssim filter while H264 is just 28 dB. But I might be doing something
<Eoan>
wrong, because even with '-crf 0' I only get 32 dB for H264; the plane checksums differ. With 420p input and output, the frames are identical with -crf 0, so maybe something is going wrong with the 10-bit processing.
<kepstin>
note that crf 0 is not lossless in 10bit ; the reference way to enable lossless is "-qp 0" in both 8-bit and 10-bit
<Eoan>
Ah~
<kepstin>
that applies to x264 specifically (other encoders work differently)
<aaabbb>
interesting
AnosVoldigoad68 has joined #ffmpeg
AnosVoldigoad has quit [Ping timeout: 240 seconds]
AnosVoldigoad68 has quit [Client Quit]
Admin__ has joined #ffmpeg
kurosu has joined #ffmpeg
<Admin__>
hello
<aaabbb>
hello Admin__
<Admin__>
can some one help me fix this?
<Admin__>
ffmpeg version N-112688-gfd1712b6fb-20231104 Copyright (c) 2000-2023 the FFmpeg developers
<Admin__>
built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
<Eoan>
My results: '-tune fastdecode -preset veryfast -qp 0 -g 1' (the fastdecode actually does nothing measurable here) is lossless, encodes in 3.6 sec compared to the 2.97 for Prores, and is 305 MB/s compared to the 182 MB/s for ffv1, but decodes in 1.9 sec compared to 5.3 for ffv1 and 1.0 for Prores. The higher decode time is just because of the higher
<Eoan>
bitrate to make it lossless. So it's at least comparable to Prores's performance in both encoding and decoding. But if patents are still an issue here, VP8 is probably similar; even though x264 won the Moscow codec competition for a bunch of years for quality at a given speed and bitrate, the quality difference is mostly at lower bitrates.
<Admin__>
here
<aaabbb>
Eoan: ffv1 isn't patent encumbered is it?
<Eoan>
The only thing I see on https://en.wikipedia.org/wiki/FFV1 is "Early experimental versions of FFV1 used the CABAC Arithmetic coder from H.264, but due to the uncertain patent/royalty situation, as well as its slightly worse performance, CABAC was replaced by Range encoding."
<Admin__>
how can i fix this?
<aaabbb>
Admin__: can you replicate it with just an ffmpeg command?
<Admin__>
sure
<Eoan>
Admin__, this outputs it to standard output, right? Is that what you're trying to do?
<aaabbb>
it looks to me like a problem with wherever you're feeding the output
<furq>
well maybe not on windows but you can just copy the url from yt-dlp -g
<aaabbb>
furq: it looks like the broken pipe is on the output of ffmpeg not the input
<furq>
yeah that's why i said not a solution
<furq>
if i had to guess whatever the pipe is connected to isn't reading from it
<Eoan>
If you're trying to make your system play it, you might be able to do something like "-f pulse -", but ffplay may be better for this as it's interactive. And beyond that, 1) you can sometimes cache input 2) YouTube sometimes acts weird, or used to in the past, if you tried to seek using the URLs that yt-dl provides, like closing connections
<Eoan>
unexpectedly, so I've always found it better to download things, even if just to a temporary location
<furq>
well you wouldn't be able to seek that anyway
paddymahoney has quit [Remote host closed the connection]
<Admin__>
i think i put that command in my code so it return error
<furq>
i assume from the io.TextIOWrapper exception that this is a python script calling ffmpeg and reading in pcm
<furq>
so there's probably a bug in that
<aaabbb>
yeah, i think ffmpeg i working just fine
<Admin__>
i tried my command and it work
paddymahoney has joined #ffmpeg
<Admin__>
but where the error frm
<Admin__>
*from
<aaabbb>
in your script probably
FH_thecat has joined #ffmpeg
<Eoan>
If it's still not working, maybe use a local file as the input so you can eliminate one source of error. The 'utf-8' isn't causing an error, is it? From an invalid bit sequence?
jluthra has quit [Server closed connection]
jluthra has joined #ffmpeg
<Admin__>
let me try it again
<Admin__>
i found the problem
<aaabbb>
what was it?
<Admin__>
my code need 16 bit streo raw
<aaabbb>
and it closed the pipe on ffmpeg when it didn't getthat?
<aaabbb>
any "raw" codec like pcm, you have to specify the format but if it's in a container like ogg opus, or mp4 opus then it's detected unambiguously
<aaabbb>
not sure, try doing just a plain ffmpeg command
<Eoan>
Did you remove the '-f s16le'? "Unable to choose an output format"
<aaabbb>
you need to keep the -f, i just meant you don't need -acodec opus
<aaabbb>
without -f, it has to detect output type based on file extension such as .mp3, it knows what codec to use. if you output to stdout with - you need to be explicit about the output
<Admin__>
it still can't divisible by 4
qqq has quit [Remote host closed the connection]
<furq>
what's supposed to be divisible by 4
lusciouslover has quit [Ping timeout: 260 seconds]
elastic_dog has quit [Ping timeout: 255 seconds]
Shine_ has quit [Read error: Connection reset by peer]
<Admin__>
i think its legth of data
<Admin__>
*length
Nintendo has joined #ffmpeg
elastic_dog has joined #ffmpeg
<Nintendo>
I am looking at a decrypted DVD folder with 5 VOB files for the main video. If I use mpv to watch VTS_01_1.VOB, the video has subtitles available, but ffprobe says there are none. What might be happening?
<galad>
instead of opening the VOB files it would be better to use something that understands the VIDEO_TS structure, some info is only in the .ifo files
<furq>
probably increasing -analyzeduration and/or -probesize would find the subtitle streams
<furq>
but do what galad said
<galad>
there was someone working on adding some video_ts reading support to ffmpeg, but I don't think it's ready yet
<furq>
amazing that this still sucks all these years later
<furq>
not in ffmpeg just in general
<galad>
handbrake can read a video_ts folder, maybe it has all the things you need
<furq>
that works if you commit to doing everything with handbrake
<Nintendo>
Very true. But from what I can tell, the DVD format isn't a very fun one to work with. Thank you both for the suggestions. Since ffmpeg does not seem to be able to process IFO, I will give -probesize and whatnot a shot before resorting to other tools.
<galad>
furq: the issue is that almost no one cares about dvd-video anymore
<furq>
last i checked it wouldn't just remux it
<Admin__>
can someone help me?
<galad>
well, not really an issue, just a fact
<furq>
you should always remux with something that can actually process dvd titlesets before encoding
<furq>
makemkv or dvdbackup -t or pgcdemux or something
<furq>
unless you're 100% sure that the vobs exactly correspond to the titles
<aaabbb>
Admin__: try replicating it with a pure ffmpeg command
<aaabbb>
outside of your script
<Eoan>
Admin__, try outputting from ffmpeg to a file (same format as current), and then using that file as input to your script.
<furq>
i think he said the ffmpeg command by itself works
<furq>
in which case we can't guess what the issue is without seeing the script
<Admin__>
ok
<furq>
maybe more of a question for #python or however many #s they have
Admin__ has quit [Read error: Connection reset by peer]
admin_____ has joined #ffmpeg
Admin__ has joined #ffmpeg
Admin__ has quit [Client Quit]
admin_____ is now known as Admin__
Admin__ is now known as admin_____
<admin_____>
how can i read it to stdout?
<aaabbb>
admin_____: that's a general linux (or perhaps python) question. ffmpeg will write to stdout with setting - for the output file
<admin_____>
how can i read my out audio file?
<Eoan>
No idea how to do it from a script; can you use 'cat'? Is this a shell script where you can use an operator like "<"?
<Eoan>
I know nothing about python
<aaabbb>
admin_____: ffplay -f s16le -i yourfile
<admin_____>
it work
<admin_____>
but how can i put that into my code?
<aaabbb>
i don't know. if it works, that means ffmpeg is working fine
<admin_____>
no one know how to fix that?
admin_____ is now known as Admin__
Admin__ is now known as admin_____
<aaabbb>
this is the ffmpeg channel so we're not gonna be experts in python
<aaabbb>
try joining #python
<admin_____>
i thing that error from ffmpeg
<aaabbb>
the error is from ffmpeg because the pipe is being closed by your script
AbleBacon_ has quit [Read error: Connection reset by peer]
jemius has joined #ffmpeg
qqq has joined #ffmpeg
<Eoan>
Like I said, output to a file, and then use the file as input to the script. If you just do 'cat file -' it should provide the same input to the script: if it doesn't, then you can work from there. It eliminates ffmpeg as a potential source of the problem, simplifyig your troubleshooting
admin_____ has quit [Quit: Konversation terminated!]
<Eoan>
Or just "cat file", automatically goes to stdout
<aaabbb>
he's gone already
kurosu has quit [Quit: Connection closed for inactivity]
ivanich has joined #ffmpeg
chiselfuse has quit [Ping timeout: 264 seconds]
MRiddickW has joined #ffmpeg
chiselfuse has joined #ffmpeg
kurosu has joined #ffmpeg
flom84 has joined #ffmpeg
flom84 has quit [Quit: Leaving]
rsx has joined #ffmpeg
Shine_ has joined #ffmpeg
flom84 has joined #ffmpeg
chiselfu1e has joined #ffmpeg
flom84 has quit [Remote host closed the connection]
flom84 has joined #ffmpeg
chiselfuse has quit [Ping timeout: 264 seconds]
ocrete2 has quit [Server closed connection]
ocrete2 has joined #ffmpeg
robbi_blechdose has joined #ffmpeg
<robbi_blechdose>
Hey everyone, I have a question about MPEG2 (TS) encoding:
<robbi_blechdose>
I recorded video with a Sony HRV S270 and the MRC1 recorder. Said recorder splits the HDV/MPEG2 files once they hit 4GiB
<robbi_blechdose>
And apparently this means incomplete GOPs, which translates to dropped/frozen frames at the end of one file, in my case 9 full frames.
<robbi_blechdose>
Sony provided a tool to fix this, but it's old and windows-only so I have no way to know how this worked.
<robbi_blechdose>
Can ffmpeg repair these files somehow?
<Eoan>
If it's splitting them at the bit level, you may be able to just concat them
<Eoan>
I'm thinking the concat protocol, not the format
<robbi_blechdose>
I did try that (using "ffmpeg -f concat -i concatlist.txt -g 12 -c copy out.m2t"), but still get those dropped frames
<Eoan>
But assuming you have a modern filesystem that supports files above 4 GB, try copying the first file and concatting the next onto it
<robbi_blechdose>
With or without the "-g 12" makes no difference
<Eoan>
So that's the concat format. I'm looking at the manual about the concat protocol, which is different
<Eoan>
Search in the manual for 'Physical concatenation protocol.'
rv1sr has joined #ffmpeg
<Eoan>
Anyway, if it works, it's just like actual joining the files together, which depend son how your camera does it
<furq>
the protocol does the same thing as cat foo.ts bar.ts > baz.ts
<Eoan>
If it only splits at frame boundaries ... actually then your command should have worked, because I've split files at non-GOP points (using -copyinkf) and it worked fine
<furq>
it should always work with mpegts but maybe you'll end up with undecodable frames at the joins
<Eoan>
If there was that tool, it was probably just joining them (it's like multi-part zip archives) so the camera isn't throwing away data
<robbi_blechdose>
I'm amazed, I *think* this worked
<furq>
yeah it would make sense that it just splits exactly at 4GB
<furq>
in which case you can just cat
<robbi_blechdose>
I wasn't quite sure about that, since it almost looked like it started a new GOP in the new file
<furq>
well that should still be fine as long as the rest of the gop is in the new file
<furq>
i'm surprised the demuxer didn't deal with that though seeing as it doesn't decode the stream
<robbi_blechdose>
I just checked again in kdenlive to have a look at the individual frames
<robbi_blechdose>
and this has indeed worked! Thank you very much guys!
lavaball has joined #ffmpeg
<robbi_blechdose>
One more thing: Is ffmpeg capable of decoding MPEG2 multichannel audio?
<robbi_blechdose>
I had the camera set to 4-channel for this recording
<Eoan>
Fastest way to check is probably to use ffplay
foonix has quit [Server closed connection]
foonix has joined #ffmpeg
<robbi_blechdose>
I've found no documentation on it, so that's why I'm asking