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
<CounterPillow> bro your "code" is just some dotnet GUI building an ffmpeg command line, I think you can have a single conditional for hwaccel in there
<znf> let's say that ErsatzTV is a bit more complicated than that
<CounterPillow> yes I'm sure Best Free Multimedia Transcoder Pro No Virus 2024 Updated is the cream of the crop
<znf> how about you go fuck yourself?
System_Error has quit [Remote host closed the connection]
blb has joined #ffmpeg
System_Error has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
lucasta has joined #ffmpeg
KDDLB has quit [Quit: The Lounge - https://thelounge.chat]
KDDLB has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 268 seconds]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
lexano has quit [Ping timeout: 240 seconds]
nrg has quit [Remote host closed the connection]
nrg has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
Kei_N has quit [Read error: Connection reset by peer]
Kei_N has joined #ffmpeg
System_Error has joined #ffmpeg
minimal has quit [Quit: Leaving]
waleee has quit [Ping timeout: 264 seconds]
YuGiOhJCJ has joined #ffmpeg
emmanuelux has quit [Quit: au revoir]
nact has joined #ffmpeg
theobjectivedad has joined #ffmpeg
lucasta has quit [Remote host closed the connection]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
lemourin has quit [Quit: The Lounge - https://thelounge.chat]
lemourin has joined #ffmpeg
bitbinge has quit [Ping timeout: 260 seconds]
bitbinge has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 240 seconds]
theobjectivedad has joined #ffmpeg
Suchiman has quit [Quit: Connection closed for inactivity]
Vonter has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 260 seconds]
theobjectivedad has joined #ffmpeg
murb has quit [Server closed connection]
murb has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 260 seconds]
lusciouslover has quit [Ping timeout: 268 seconds]
lusciouslover has joined #ffmpeg
theobjectivedad has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 260 seconds]
Corroddity has joined #ffmpeg
LStation has quit [Quit: Leaving]
theobjectivedad has joined #ffmpeg
AbleBacon has quit [Read error: Connection reset by peer]
namazso has quit [Remote host closed the connection]
namazso has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 260 seconds]
theobjectivedad has joined #ffmpeg
coldfeet has joined #ffmpeg
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 260 seconds]
coldfeet has quit [Remote host closed the connection]
darkapex has quit [Ping timeout: 256 seconds]
darkapex has joined #ffmpeg
theobjectivedad has joined #ffmpeg
ManDay has joined #ffmpeg
<ManDay> I'm still looking for help trying to figure out why this does not do what one would naively expect:
<ManDay> drawpts() { echo "drawtext=text='%{pts}':y=$1"; }; ffmpeg -y -filter_complex "color=c=white:s=60x48:d=10,$(drawpts 0),segment='2|4' [a][b][c]; [a] $(drawpts 16),tpad=stop_mode=clone:stop_duration=1,$(drawpts 32) [ao]; [b] $(drawpts 16),tpad=stop_mode=clone:stop_duration=1,$(drawpts 32) [bo]; [ao][bo][c] concat=3 [out]" -map "[out]"
KDDLB has quit [Quit: The Lounge - https://thelounge.chat]
KDDLB has joined #ffmpeg
theobjectivedad has quit [Ping timeout: 240 seconds]
theobjectivedad has joined #ffmpeg
lavaball has joined #ffmpeg
<Traneptora> what are you trying to do
<ManDay> Introduce two 1second freezes at time 2 and 4.
<ManDay> I think I understood the issue just now
<ManDay> I need to setpts on the later elements, because segment has them with the pts of the original data, which, when concated, will introduce an additional delay
<Traneptora> ah yea, segment doesn't setpts=PTS-STARTPTS for you
<ManDay> This may even suggest a simpler (?) way of achieving the freezes by using only the setpts filter, and shifting the timestamps.
<Traneptora> you'll need to use the fps filter to dupe frames but yes that could work
<Traneptora> fps=fps=30:round=zero or something
<ManDay> I was wondering, whether correct data would result from just arbitrarily moving the PTS around. I guess it's valid for file formats with non-constant fps, though?
<Traneptora> strictly speaking it would be compliant but it would be up to players to fill that gap however they like
<Traneptora> many players will fill the missing frames with either frame-averages in the gap or just the closest presented frame, which isn't what you want
<Traneptora> if you want it to look a specific way you're better off putting the frames there
<Traneptora> the overhead of constant-frames is minimal because of good interprediction
<ManDay> Yes, I get it. Thank you very much for taking them time Traneptora !
marcj- has quit [Server closed connection]
marcj has joined #ffmpeg
<ManDay> May I suggest that the documentation of `segment` be adjusted accordingly, though, or -- even better -- that `segment` adjust the PTS. Because the documentation currently describes it as "doing the opposite of `concat`", which *does* adjust the PTS during concatenation.
iliv has joined #ffmpeg
Blacker47 has joined #ffmpeg
HerbY_NL has joined #ffmpeg
xx has joined #ffmpeg
delthas has quit [Ping timeout: 256 seconds]
delthas has joined #ffmpeg
archivist99 has quit [Quit: Konversation terminated!]
nitroxis has quit [Server closed connection]
nitroxis has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
lavaball has joined #ffmpeg
bitbinge has quit [Ping timeout: 260 seconds]
anticw has quit [Ping timeout: 264 seconds]
anticw has joined #ffmpeg
HerbY_NL_ has joined #ffmpeg
HerbY_NL has quit [Ping timeout: 256 seconds]
lavaball has quit [Quit: lavaball]
HerbY_NL has joined #ffmpeg
HerbY_NL_ has quit [Ping timeout: 256 seconds]
deaconvinegar has quit [Ping timeout: 250 seconds]
iliv has quit [Ping timeout: 252 seconds]
vlm has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
<ManDay> Why can x/y be animated on the `crop` filter, but w/h can't?
HerbY_NL_ has joined #ffmpeg
HerbY_NL has quit [Ping timeout: 268 seconds]
APic has quit [Server closed connection]
APic has joined #ffmpeg
Suchiman has joined #ffmpeg
kraftwerk28 has joined #ffmpeg
kraftwerk28 has quit [Remote host closed the connection]
luva84 has joined #ffmpeg
luva8 has quit [Ping timeout: 252 seconds]
luva84 is now known as luva8
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
finsternis has quit [Server closed connection]
finsternis has joined #ffmpeg
waleee has joined #ffmpeg
zmt01 has joined #ffmpeg
zmt00 has quit [Ping timeout: 260 seconds]
Sakura`Kinomoto has quit [Remote host closed the connection]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
krjst has quit [Server closed connection]
krjst has joined #ffmpeg
five61848033 has quit [Remote host closed the connection]
five61848033 has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
BUSY has quit [Ping timeout: 240 seconds]
kuba-orlik0397 has joined #ffmpeg
System_Error has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 268 seconds]
samhza has quit [Server closed connection]
samhza has joined #ffmpeg
HerbY_NL_ has quit [Ping timeout: 246 seconds]
HerbY_NL has joined #ffmpeg
SuRGeoNix has joined #ffmpeg
BUSY has joined #ffmpeg
<SuRGeoNix> Hi, I'm trying to create an overlay from ddagrab and an image with FFmpeg's API. I use ddagrab as the main buffer source for overlay one buffer source to pass the image as the the second input of the overlay. I use once the av_buffersrc_add_frame_flags for the image and then only the av_buffersink_get_frame_flags (in a while). After the 1st success
<SuRGeoNix> frame it will return AVERROR<EAGAIN> always. I tried repeatlast=1 on the overlay filter but not effect. I suspect that it does not work with any video source (eg ddagrab) but only with buffer sources?
<SuRGeoNix> (Btw, I actually use ddagrab -> hwdownload -> format -> overlay(0 pad) -> sink  and buffersrc -> overlay(1 pad) -> sink)
iliv has joined #ffmpeg
<ManDay> Does it actually follow from the documentation that occurrences of : in text expansions %{...} must be escaped? I see this from the examples can't understand why.
unSingeEnivre has joined #ffmpeg
<ManDay> The parser of filter arguments DOES seem to have an understanding of quotes; that's why filter=arg='func(v1,v2)' works and doesn't attempt to interpret the `,` as a new filter. And yet, the examples seem to suggest that filter=arg='%{e:x}' won't work without escaping the `:`, why?
lavaball has joined #ffmpeg
<unSingeEnivre> Development of an Automated Video Generation Tool with FFmpeg
<unSingeEnivre> Objectives: Create videos from static images, audio, and subtitles.
<unSingeEnivre> Current Issue: The video is functional, but we observe a doubling of subtitle blocks on certain frames, causing unwanted overlap.
<unSingeEnivre> General Principle: Using FFmpeg to combine an image, an audio file, and SRT subtitles transformed into ASS into a single video. The process involves creating a temporary ASS file via create_temp_ass(), then applying video filters for subtitle overlay.
<unSingeEnivre> Main FFmpeg Command:
<unSingeEnivre>         command = [
<unSingeEnivre>             "ffmpeg",
<unSingeEnivre>             "-y",
<unSingeEnivre>             "-loop", "1",
<unSingeEnivre>             "-i", image_path,
<unSingeEnivre>             "-i", temp_audio_file,
<unSingeEnivre>             "-vf", vf_filters,
<unSingeEnivre>             "-c:v", "h264_qsv",
<unSingeEnivre>             "-preset", "fast",
<unSingeEnivre>             "-tune", "stillimage",
<unSingeEnivre>             "-c:a", "aac",
<unSingeEnivre>             "-b:a", "192k",
<unSingeEnivre>             "-pix_fmt", "yuv420p",
<unSingeEnivre>             timestamps = lines[1].split(' --> ')
<unSingeEnivre>             block_start = parse_srt_time(timestamps[0]) - start_td
<unSingeEnivre>             block_end = parse_srt_time(timestamps[1]) - start_td
<unSingeEnivre>             if block_end < timedelta(0) or block_start > (end_td - start_td):
<unSingeEnivre>                 continue
<unSingeEnivre>             # Ajouter un délai vide de 15 ms entre les blocs
<unSingeEnivre>             if last_end_time > timedelta(0):
<unSingeEnivre>                 empty_start = format_ass_time(last_end_time)
<unSingeEnivre>                 empty_end = format_ass_time(last_end_time + timedelta(milliseconds=15))
<unSingeEnivre>                 ass_lines.append(f"Dialogue: 0,{empty_start},{empty_end},Default,,0,0,0,,")
<unSingeEnivre>             # Traiter chaque ligne de texte séparément
<unSingeEnivre>             for i, line in enumerate(lines[2:]):
<unSingeEnivre>                 text = line.strip().replace('"', '\\"') # Échapper les guillemets doubles
<unSingeEnivre>                 if text:
<unSingeEnivre>                     ass_lines.append(f"Dialogue: 0,{format_ass_time(block_start)},{format_ass_time(block_end)},Default,,0,0,0,,{text}")
<unSingeEnivre>                     # Ajouter une ligne "o_o" entre chaque ligne de texte, sauf après la dernière
<unSingeEnivre>                     if i < len(lines[2:]) - 1:
<unSingeEnivre>                         ass_lines.append(f"Dialogue: 0,{format_ass_time(block_start)},{format_ass_time(block_end)},Special,,0,0,0,,o_o")
<unSingeEnivre>         log_message(f"Number of subtitle lines processed: {len(ass_lines)}", log_file_path)
<unSingeEnivre>     except Exception as e:
<unSingeEnivre>         log_message(f"Error in create_temp_ass: {str(e)}", log_file_path)
<unSingeEnivre>         import traceback
<unSingeEnivre>         log_message(f"Traceback: {traceback.format_exc()}", log_file_path)
<unSingeEnivre>         raisedef adjust_block_times(blocks, start_td, end_td):
<unSingeEnivre>     last_end_time = timedelta(0)
<unSingeEnivre>     adjusted_blocks = []
<unSingeEnivre>     for block in blocks:
<unSingeEnivre>         times_line = block[1].strip()
<unSingeEnivre>         start_str, end_str = times_line.split(' --> ')
<unSingeEnivre>         start_td_line = parse_srt_time(start_str.strip())
<unSingeEnivre>         end_td_line = parse_srt_time(end_str.strip())
<unSingeEnivre>         if block[2].strip() == 'o_o':
SuRGeoNix has quit [Quit: Client closed]
<unSingeEnivre>             start_td_line = max(last_end_time + timedelta(milliseconds=5), start_td_line)
<unSingeEnivre>         else:
<unSingeEnivre>             start_td_line = max(last_end_time, start_td_line)
<unSingeEnivre>         last_end_time = end_td_line
<unSingeEnivre>             f"subtitles='{escaped_ass_path}',"
<unSingeEnivre>             f"fps=30,format=yuv420p"
<unSingeEnivre>         )
<unSingeEnivre> We are looking to resolve the subtitle overlapping issue, potentially related to FFmpeg's synchronization or caching. Recent modifications include using -vsync 0, -async 1, and increasing max_muxing_queue_size. The cache does not seem to be cleared after writing, but it was a lead.
<unSingeEnivre> Any suggestions to improve subtitle synchronization or avoid doubling of blocks would be greatly appreciated.
<unSingeEnivre> I am particularly interested in advice on optimizing FFmpeg parameters or alternatives for rendering ASS subtitles."
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
<ManDay> I'm going to file a bug about the escaping. That seems to be an utterly overcomplicated mess.
Sakura`Kinomoto has joined #ffmpeg
beaver has quit [Remote host closed the connection]
beaver has joined #ffmpeg
ManDay has quit [Ping timeout: 252 seconds]
lavaball has quit [Remote host closed the connection]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
ManDay has joined #ffmpeg
<ManDay> In the meantime, maybe someone smart can tell me how to turn the "7" and the "9" in the following into strings "Seven" and "Nine":
<ManDay> color=c=white:s=80x60:d=10,drawtext=text='%{e\\:if(lt(t,4),7,9)}'
theobjectivedad has quit [Remote host closed the connection]
<ManDay> color=c=white:s=80x60:d=10,drawtext=text='%{e\:if(lt(t,4),7,9)}'
<ManDay> (the double-\ was shell escaping, sorry)
<ManDay> Because I tried everything from \'Seven\' through \\\'Seven\\\' and nothing worked.
mven972 has joined #ffmpeg
theobjectivedad has joined #ffmpeg
mven97 has quit [Ping timeout: 272 seconds]
mven972 is now known as mven97
<BtbN> If drawtext=text='%{e:if(lt(t,5),\'early\',\'late\'}' is used like that in a shell, it very likely does not do what you think it does
<BtbN> there is no escaping in single-quote strings in a shell
<ManDay> BtbN: Forget about the shell, I can take care of the shell escaping.
<ManDay> Let's only consider what ffmpeg expects to receive
<BtbN> so this would result in this being passed to ffmpeg: drawtext=text=%{e:if(lt(t,5),\early','late'}
<BtbN> While leaving the ' string dangling open at the end
<ManDay> Yes I know. But the shell is not part of the problem.
<ManDay> I should probably point this out in the ticket, though I presumed it obvious, since it's only about ffmpeg
<ManDay> For simplicity, assume the shell has everything in "-quotes
<BtbN> well, then it gets even messier with escapes :D
<BtbN> single-quotes are "the easy way", and every time you want a literal ' in the string, you put '\''
<ManDay> So, what is the correct solution then to obtain "Seven" ?
<ManDay> (with or w/o shell escaping, whatever you prefer)
<ManDay> I added the note to https://trac.ffmpeg.org/ticket/11096
<BtbN> The main problem really is that the drawtext option parser uses : as option-separator. So it thinks the text-argument is just text=%{e\\
<BtbN> Not sure if/how you can escape that.
<BtbN> Normally it should just be \:
<ManDay> BtbN: I'm not sure what part you're referring to. Yes, the escaping of `:` is illogical, too. That's part of the bug. But as to my concrete (trivial) testcase, what do I have to replace the "7" and "9" with to get "Seven" and "Nine" instead? (with "7" and "9" it works)
<ManDay> color=c=white:s=80x60:d=10,drawtext=text='%{e\:if(lt(t,4),7,9)}'
<BtbN> It's not a bug. Just escape-hell
<ManDay> To be fair I filed it as an enhancement, not a bug, but that's a self-made hell. Not a necessity, which escaping normally is.
<BtbN> I _think_ the issue might just be that %{e} invokes the numerical expression parser. So it might simply not do strings.
<ManDay> That could be, it sounds plausible.
<ManDay> It would be a very unfortunate design for the drawTEXT filter, though :-/
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
five61848033 has quit [Remote host closed the connection]
five61848033 has joined #ffmpeg
<ManDay> The following example from the docs is also a riddle:
<ManDay> ffplay -f lavfi "color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 }"
<ManDay> %{eif\\: ...} , I don't even begin to understand what that is supposed to be...
<ManDay> Unless it's a typo.
brocellous has quit [Server closed connection]
brocellous has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
<ManDay> Also "[A color] can be the name of a color as defined below (case insensitive match) or a [0x|#]RRGGBB[AA] sequence, possibly followed by @ and a string representing the alpha component." ?
System_Error has joined #ffmpeg
BUSY has quit [Ping timeout: 272 seconds]
Peetz0r has quit [Server closed connection]
Peetz0r has joined #ffmpeg
lexano has joined #ffmpeg
<Traneptora> ManDay: it's an if statement that picks between 0 and 255, but then it formats it as %2x (that's what the x, and the 2 are). notice the FF0000 before it, so it ends up with a four-byte color in hex notation
<ManDay> Traneptora: What is %{eif\\: ?
<Traneptora> oh that's what you mean, probably a typo
<ManDay> And the double backslash (or quadrupel, in SH) before the colon?
<ManDay> colon(s)
<Traneptora> the double backslashes will become single backslashes when interpreted by the shell
<ManDay> which leaves 2 of them
<Traneptora> not sure
<Traneptora> if you try to run it as is, it doesn't parse
<ManDay> it's an absolute clusterfuck tbh. both the quoting and the color spec... I've got like 90% of my project done and all I wanted to add was a text which blinks transparent->green->black->transparent
<ManDay> I'm stuck with this stupid problem for hours now. I think I'm going to give up. it seemed so simple, and everything worked so well with ffmpeg up to this point
<ManDay> really frustrating
<Traneptora> may be easier to make it just green and use another filter
BUSY has joined #ffmpeg
<Traneptora> black can be done by multiplying by 00000ff, and transparent can be done by multiplying by 00000000
<ManDay> thank you, i will do that
<Traneptora> ManDay: check colorlevels. e.g. colorlevels=gomax=0
HerbY_NL has quit [Ping timeout: 268 seconds]
rvalue has quit [Ping timeout: 268 seconds]
rvalue- has joined #ffmpeg
HerbY_NL has joined #ffmpeg
rvalue- is now known as rvalue
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
hightower3 has quit [Quit: Leaving]
HerbY_NL_ has joined #ffmpeg
HerbY_NL has quit [Ping timeout: 264 seconds]
jmcantrell has quit [Server closed connection]
jmcantrell has joined #ffmpeg
farter has quit [Remote host closed the connection]
<BtbN> Just have two drawtext filters, and enable/disable them depending on the condition?
<BtbN> Or set some property like alpha based on that, to make one text invisible and vice versa
<ManDay> I'm experimenting with using the text as alpha channel for a changing color now, but that sounds easier
<ManDay> How do I know which filters support the "enable" flag? It doesn't seem to be documented anywhere
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
<ManDay> Ah I just found it at the end of the inline documentation
<ManDay> BtbN: Thanks, that really works much more easily!
mven97 has quit [Ping timeout: 260 seconds]
<ManDay> Upon noticing that font='DejaVu:bold' will somehow interpret the ':' as a filter-args separator but x='lerp(1.5,1.0,1.0)' will NOT interpret the ',' as filter seperators, I can only conclude the parser is just broken
mven97 has joined #ffmpeg
<BtbN> No, it's not. Just because you don't understand something fully does not mean it's broken.
<ManDay> Yes, it is. It's not broken in the code by a bug, but broken in design.
<ManDay> That's also a kind of broken.
<ManDay> (unless there truly is a reason for this, which I find hard to believe)
<BtbN> It's been like this for literally decades. Made to work for every possible corner case. We ain't gonna break years of compatiblity to satisfy your sense of how it should be. While potentially also making other uses impossible.
<ManDay> That's not unexpected. However (and again: admitting the possibility that after two days of working with the CLI I'm still missing those particular cases which justify that design), it's not "my sense of how it should be". It's some basic and well-established rules of how escaping works that this doesn't adhere to. And the result is as terrible as one would expect that, if such basic rules are
<ManDay> disregarded.
<BtbN> It's just that there is multiple layers of things that need escaped layered on top of each other, so it gets incredibly messy
bitbinge has joined #ffmpeg
<BtbN> One way to make it a little bit less painful is to put the complex filters into a file, so that shell escaping is out the window
<ManDay> BtbN: yes there are multiple layers, as it is usually the case. That's (obviously) not my complaint nor is it the reason for the problem. The problem is that whatever the logic is, it is not as simple as it should be. Or what do you see wrong with the "how it should be" example I gave in the Ticket?
<BtbN> I don't know all the parsers in fine detail, nor do I know all usecases. But it's working fine for everyone except you after wading through the escape-hell.
<ManDay> i wouldn't call it "working fine" just because people put up with it. that escape hell would not be needed, it is a consequence of the bad design; that's what I'm saying.
<ManDay> and I'm well aware this was not a one-off "lets implement this shitty design" descision, but a thing that grew historically. but that really doesn't excuse the end result, in my opinion
<furq> : and , being escaped differently is mentioned in the docs
<furq> which is not to say it's good but it is at least mentioned
<ManDay> yes, i'm aware it's (at least mostly) documented. and at this point I guess BtbN was right in that the ultimate problem with my example was that %{e} doesn't deal with strings.
<ManDay> at least no amount of escaping seems to get it to work
<furq> the drawtext expansion stuff involves a whole new set of escaping
<furq> which is where i normally check out
<ManDay> well, it shouldn't, though.
kuba-orlik0397 has quit [Remote host closed the connection]
<ManDay> the most obvious or easily debatable nonsensical escape is that of the colon. there is really no reason why that should be escaped.
kuba-orlik0397 has joined #ffmpeg
<BtbN> Cause it separates individual filter arguments.
<BtbN> How should the outer parser know it's supposed to be part of the argument or not?
<ManDay> because it's inside single quotes: drawtext=text='...:...' <- that colon is inside of the quotes, which render their content opaque to the filter complex parser
<BtbN> The '' are parsed at a different layer.
<ManDay> yeah, that's the problem. however, they seem to isolate *commas*, so x='lerp(1,2,3)' is fine and doesn't need to escape the comma, although that, too, would introduce a new filer.
<ManDay> so the top-most misdesign is that the filter-complex parser does not support quotes, despite the appearance of it (seen how they are used at that level)
System_Error has quit [Remote host closed the connection]
unSingeEnivre has quit [Quit: Client closed]
minimal has joined #ffmpeg
System_Error has joined #ffmpeg
Livio has joined #ffmpeg
HerbY_NL_ has quit [Quit: Textual IRC Client: www.textualapp.com]
HerbY_NL has joined #ffmpeg
unSingeEnivre has joined #ffmpeg
iliv has quit [Quit: "<paniq> you know when i walk out the door, there is plenty of stupid people. i open irc, there is plenty of intelligent people. so the choice comes easy."]
unSingeEnivre has quit [Remote host closed the connection]
rsx has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
emanuele6 has quit [Read error: Connection reset by peer]
halvut has joined #ffmpeg
kasper93_ has joined #ffmpeg
kasper93 has quit [Ping timeout: 240 seconds]
kasper93_ is now known as kasper93
HerbY_NL has quit [Quit: Textual IRC Client: www.textualapp.com]
lavaball has joined #ffmpeg
_Vi has joined #ffmpeg
<_Vi> Can FFmpeg parallelize encoding by splitting video by large (e.g. one minute) blocks and encoding them in parallel (without intra-encoder parallelism)?
luva86 has joined #ffmpeg
luva8 has quit [Ping timeout: 252 seconds]
luva86 is now known as luva8
<BtbN> no, you gotta do that manually
<BtbN> The RAM usage of doing that directly in FFmpeg would be quite intense
emanuele6 has joined #ffmpeg
<ManDay> I have N audio input files (and nothing else), adressing them with [0] ... [n-1] works fine, but [a:0] ... [a:n-1] doesn't work; [a:1] is not found, according to the error. I thought according to the section "Stream specifiers" in the documentation it should select the same streams, what did I get wrong?
<BtbN> a:0 is the first stream, a:1 the second stream, and so on
<BtbN> if your files only have on stream, a:1 matches nothing
<BtbN> it's 0:a, 1:a, ... to address different input audio files.
<ManDay> BtbN: Yeah the trouble is that I need to filter all files for the audio files, because I have some videos (sorry for the xy problem).
daily has joined #ffmpeg
<ManDay> So I thought I with "a:..." I can limit my choice to the audio files
<daily> hello everyone :) how do i extract a VobSub subtitle stream (codec name: dvd_subtitle) into a separate file that can be used with mplex?
kuba-orlik0397 has quit [Remote host closed the connection]
<ManDay> BtbN: I don't understand where all the other audio streams end up then? a:0 matches the first stream of the first file with audio, where are the remaining ones then?
kuba-orlik0397 has joined #ffmpeg
<ManDay> daily: what "mplex"?
<daily> if i understand it, vobsub is in files named like .idx or .sub, but if i try .idx ffmpeg has no idea what i'm talking about, and if i try .sub it thinks i want something called microdvd, whatever that is
<daily> ManDay: a program from mjpegtools
<daily> sadly ffmpeg-named DVD muxes do not work in my DVD player
<daily> *ffmpeg-made
<daily> it only works if i use mplex or better yet dvdauthor
<daily> dvdauthor also wants, like, some file that will have just the vobsub, i don't even know what format exactly
<daily> but for simplicity mplex can pre0bake that into the .vob
<daily> *pre-bake
<ManDay> daily: i could only help you with how to generally extract a sub (that's just that https://superuser.com/questions/583393/how-to-extract-subtitle-from-video-using-ffmpeg ) - but I don't know about compatibility with mplex
<daily> that seems to mention .srt, these are not text subtitles they're image-based
<ManDay> ffmpeg should use the right format, i suppose, if you change the filename extension
<daily> i get: [NULL @ some hexadecimal] Unable to find a suitable output format for 'test.idx'
<Marth64> what you trying to do with dvd?
<daily> i'm trying to make one
<Marth64> with subs?
<BtbN> ManDay: 0:a:0 is the first one, 1:a:0 the second one, and so on.
<daily> yes, why not
<Traneptora> if you're trying to author a dvd you'll need image subtitles
<Traneptora> dvds don't support textsubs, iirc
<daily> Traneptora: exactly, and i have them, but the only way to store them with ffmpeg seems to be in .mkv
<daily> that is not readable by dvdauthor nor mplex
<daily> i want just the vobsub in a file of its own
<Traneptora> try mpeg-ps, e.g. .mpg
<Traneptora> that might work
<Marth64> it may partially work
<Marth64> the problem is the palette
<Marth64> which is in the IFO/IDX structures
<ManDay> BtbN: Yes, I understood that. But I want to enumerate the audio streams irrespective of which file-indices they come with. The "a:..." syntax seems to enumerate them like that, but where does it enumerate the ones >0 ?
<Marth64> why not just use 0:0,0:1,0:2, etc.
<daily> **ERROR: [mplex] File test.mpg unrecogniseable!
<Marth64> 0: file index 0, then 1,2,..n. is the stream in that file
<Traneptora> ManDay: a:0 is the first audio stream, a:1 is the second, etc. regardless of where they come from.
<Marth64> ^
<ManDay> Marth64: No, it's N audio(-only) files (1 stream each, fwiw) and M video(-only) files (1 stream each); I want to enumerate the 1st, 2nd, ... audio stream
<ManDay> Traneptora: Yes, that's what I thought but it doesn't work?
<Traneptora> what do you mean "it doesn't work"
<Traneptora> what happens when you try
<ManDay> It says that [a:1] is not found and aborts
<ManDay> ([a:0] it doesn't complain about)
<Traneptora> full command?
<ManDay> one sec I'll make a testcase
<daily> maybe i need to find a real DVD and see what IDX it has and what that file even looks like
<daily> presuming it's not muxed into the VOB
<Marth64> idx is not a real dvd format
<Marth64> dvds do not have idx files, they have ifo files
<Marth64> the structure is miserable but is documented in libdvdread
<daily> perhaps i mean .SUB
<Marth64> is not a real dvd format either
<daily> i mean the kind of file that mplex accepts as a subtitle stream
<Marth64> i see
<daily> which i guess i have to read the mplex code to understand
<Marth64> look into SubtitleEdit
<Marth64> i recommend getting a workflow working without the subtitles first and then trying to add them
<Marth64> do not waste your precious time in the world looking into archaic dvd structures
<Marth64> they are horrible and misleading ;)
<ManDay> Traneptora: sorry I can't construct a testcase without input files, but here is the actual command: https://bpa.st/5G4A
<ManDay> (only audio files). When I remove the "a:"s it works
<ManDay> (sorry some quoting disappeared when I pasted)
<Traneptora> full uncut output?
<Marth64> i'm confused, if these are all m4a files why not just use 0:a:0, 1:a:0, 2:a:0, ..
<ManDay> Traneptora: https://bpa.st/AKOA
<Marth64> if a:M doesnt work
<Marth64> a:N*
<Traneptora> that is not full uncut output
<ManDay> Marth64: because there are (not in the paste example) video-only files in between, and I want to enumerate the audio files only
<Marth64> i see
<ManDay> Traneptora: https://bpa.st/T75Q
<daily> okay so apparently a vobsub file is supposed to begin with "SUBTITLE" and then some kind of information
<Marth64> it contains a palette
<Marth64> the idx file has a palette, the sub files are a mpeg-ps program stream of graphical subtitle packets
<daily> MPEG 1?
<daily> or MPEG 2?
<Marth64> mpeg-2 for dvd but mpeg-1 is supported in subpar CIF resolution
<daily> right so then ffmpeg should output with -f dvd?
<daily> like if i try -f dvd test.sub
<Marth64> there is no -f dvd muxer in ffmpeg
<furq> there is
<furq> it's the mpegps muxer
<daily> i found it in ffmpeg -formats
<Marth64> o right, to signal VOB compatible
<furq> there is no vobsub muxer
<Marth64> yes
<furq> you can copy vobsub into mks or something but i guess that doesn't work for you
<daily> is there a "raw bytes" muxer?
<daily> i could write this header manually
<Marth64> use SubtitleEdit
<Marth64> spare yourself the pain
beaver has quit [Remote host closed the connection]
<Marth64> it can export subs for you to idx/sub (vobsub)
<Traneptora> ManDay: I feel like that should work, dunno why it isn't. maybe it only works after -map. either way, you can use `[0:a]` to refer to the audio stream from input 0, `[1:a]` to do the audio from input 1, etc.
<daily> Marth64: but can it import them from a mkv?
<Marth64> yes
beaver has joined #ffmpeg
<furq> i'm pretty sure mkvextract will work
<Marth64> ffmpeg subtitle capability is basic at best
kuba-orlik0397 has quit [Remote host closed the connection]
<Marth64> that worx too
kuba-orlik0397 has joined #ffmpeg
<daily> yeah that sounds awesome, thanks furq!
<daily> i will try it
emanuele6 has quit [Ping timeout: 256 seconds]
<daily> unfortunately it creates an mpeg file
<daily> and not the thing that mplex wants
<furq> did you extract the right track
<daily> yes, VobSub
<daily> it created a .sub and an .idx
<daily> mplex can't read any of them
<daily> .idx seems to be a text file
<daily> but maybe dvdauthor can read this
<daily> in which case mplex is not needed
lucasta has joined #ffmpeg
<daily> oh i should have read the manual....
<daily> mplex wants "ps1" files
<daily> ps1 MPEG private stream (subtitles)
emanuele6 has joined #ffmpeg
Ox7C5 has joined #ffmpeg
<ManDay> Traneptora: ok, thanks for checking. I guess I'll just have to enumerate by file then. just a bit of an inconvenience but nothing serious
Exa has quit [Ping timeout: 256 seconds]
Exa has joined #ffmpeg
<JEEB> _Vi: I would recommend looking into vapoursynth and its indexed reading, then you should be able to script something that splits the clip according to some rules. I think https://github.com/master-of-zen/Av1an does something similar
<Marth64> ManDay: You can use python script to help this problem also if you have some python experience (or really any scripting language.
<Marth64> ManDay: For example, you can probe all the files at the start of the script then you can build a command dynamically. `probe = json.dumps(subprocess.check_output(['ffprobe', '-show_streams', 'MyFile.mp4'])`
<_Vi> JEEB, OK, thanks for the link.
<Marth64> will give you a map of streams inside the file
<Marth64> json.load*
<Marth64> json.loads*
<furq> you need -of json
<furq> and you can probably do it with jq
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
<Marth64> `json.dumps(subprocess.check_output(['ffprobe', '-of', 'json', '-show_streams', 'MyFile.mp4'])` or `ffprobe -of json -show_streams MyFile.mp4 | jq .streams`
<Marth64> starting point whichever way you g
<Marth64> +o
<Marth64> bleh. loads***** sorry, not much sleep
HerbY_NL has joined #ffmpeg
<Curid> at what point to people say screw the cli api and switch to the c api?
<Marth64> it takes a lot for me personally, but i'd say when the cli can't expose what you need or you have to resort to janky regexes on stderr/log messages
<Marth64> that's my redline, parsing log messages
HerbY_NL has quit [Client Quit]
<ManDay> Sorry to bother you with more pipeline questions, but I've hit a tough one here. The pipeline is long (I can paste it if you like), but the essense is: It works fine with `[...] pad [x]` but I get a runtime error "Padded dimensions cannot be smaller than input dimensions." as soon as I add color=s=3x3:d=0.1 [c] [x][c] overlay ... to it. How is that even possible? I did not change anything about
<ManDay> what goes into the `pad`!
<daily> no, hmm, apparently i can't specify a file, they all have to be muxed
<daily> and so mplex must be able to do it
<daily> which means i need to figure out how to create a .ps1 file
<daily> :<
<ManDay> This was supposed to be: color=s=3x3:d=0.1 [c]; [x][c] overlay ...
<ManDay> (so basically it's just overlaying a 3x3 rectangle on the [x] stream, and that breaks the pad which comes *before* it!)
tsujp has quit [Server closed connection]
tsujp has joined #ffmpeg
<daily> apparently mencoder can do this, is mencoder ffmpeg-based?
<Marth64> I am not sure honestly
<Marth64> it's possible, many things are ffmpeg-based
<JEEB> it has its own modules, but for decoding and for things that it doesn't include it utilizes FFmpeg
<daily> hmm, no i misunderstood what some website was saying, what they're doing is fine because they're ripping DVDs and i'm insted making one, so i will need that tcextract thing just to find out how to even create the kind of subtitle file that mplex will accept
<daily> *instead
<Marth64> maybe in year 2034 i will make dvd muxer for ffmpeg
<JEEB> also didn't avformat contain a thing that outputs the most common dvd subtitles separately format (which was IIRC bits of MPEG-PS or so?). or it could of course be that FFmpeg can only read that format, but not write.
<furq> there's microdvd but i don't know of anything that uses that
<JEEB> ok, there is just a vobsub demuxer apparently
<Marth64> yea no muxer for vobsub
<daily> so i'm trying to find this thing called "tcextract" it was a package called transcode in debian, removed in 2016
<Marth64> daily: backing up for a minute
<Marth64> what format/codec is your original source file(s)?
<Marth64> like what all are you trying to mux to dvd
mven979 has joined #ffmpeg
<daily> format? mkv
<Marth64> and you just need to keep the subs?
<daily> sort of, yes, but if i try to mux the vob with ffmpeg it's all wrong
<daily> dvdauthor won't work with it, anything else just leads to the DVD being unreadable in an old player
<daily> btw even VBR MPEG is unreadable in that player
<daily> it must be CBR
<Marth64> did you have a pastebin?
<daily> a pastebin?
<Marth64> Use a tool like https://paste.debian.net/ (an example of a "pastebin") to put your full ffmpeg input and output log
<Marth64> So we can see what you are muxing in and what is coming out
<JEEB> (also `-v verbose` recommended :) )
<JEEB> as it's the last log level that is not spammy
<daily> ffmpeg succeeds without errors, dvdauthor won't work with that file though
<daily> the error was easy to find all over the internet
mven97 has quit [Ping timeout: 252 seconds]
mven979 is now known as mven97
<Marth64> but what I want to see is characteristics about your video
<daily> i have long since given up on trying to get ffmpeg to make DVD VOBs i use mplex
<Marth64> +1 to JEEB on -v verbose
<daily> it's really not an ffmpeg issue at all at this point
<daily> so, thanks for all the help :)
daily has left #ffmpeg [Leaving]
<Marth64> np. good luck
<Marth64> but still send over that log if you want, it might be an easy issue to spot just by seeing the stream characteristics
<Marth64> dvd is uber picky
kuba-orlik0397 has quit [Remote host closed the connection]
<furq> they left
emanuele6 has quit [Read error: Connection reset by peer]
<Marth64> ah well
kuba-orlik0397 has joined #ffmpeg
<ManDay> I think I found an (actual) bug in the pad filter
coldfeet has joined #ffmpeg
<ManDay> When I set h=0:eval=frame, according to the docs, it should set the height on each frame to contain the full input, but that doesn't happen. Instead it uses the first frame only and then fails with an error if the input grows.
rsx has quit [Quit: rsx]
emanuele6 has joined #ffmpeg
lavaball has quit [Quit: lavaball]
<ManDay> Here is the testcase: https://bpa.st/LDLA
AbleBacon has joined #ffmpeg
lucasta has quit [Remote host closed the connection]
<znf> Does anyone know what --usecase (at minimum) to pass to amdgpu-install in order to use hardware encoding/decoding on an embedded amd gpu?
<znf> I'm working with very very limited disk space, so I don't wanttheir whole 6GB driver
<znf> use cases look like: https://pastie.dev/0lR40J.yaml
<znf> I've only done dkms now, but ffmpeg can't initialize libva due to missing /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
<JEEB> yea, that should be part of mesa I think?
<JEEB> unless that is not libva driver related
<JEEB> anyways no idea, I've always utilized the packaged version of the amdgpu drivers
<CounterPillow> He's installing the proprietary amdgpu driver for some god forsaken reason
<CounterPillow> It seems at least
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
Kruppt has joined #ffmpeg
<znf> JEEB, unfortunately that doesn't seem to work for this system :)
<znf> I did really mean "embedded" and not "integrated"
<znf> Model name: AMD GX-212JC SOC with Radeon(TM) R2E Graphics
bigfoot547 has quit [Server closed connection]
bigfoot547 has joined #ffmpeg
<CounterPillow> This is ancient, does amdgpu even support it?
<znf> it does, I had it running, but I had like ~500MB of disk space left, so I removed all the components that it installed by default
<znf> nwo I'm trying to install just the minimum to get it running
<znf> (again)
<znf> hm, there doesn't seem to be any difference between usecase=multimedia and usecase=graphics
<znf> apt-file is not being helpful, no results for radeonsi_drv_video.so
<znf> mesa-amdgpu-va-drivers is the answer
<znf> mkay, working again https://i.imgur.com/7XNh7vG.png
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
emanuele6 has quit [Ping timeout: 252 seconds]
emanuele6 has joined #ffmpeg
lavaball has joined #ffmpeg
daily has joined #ffmpeg
<daily> hello everyone, i realized that even though the problem i had is very frustrating for me to even remember, i should report it, as it might lead to a fix, and make ffmpeg better
<daily> *the
<daily> the same issue is talked about here: https://ubuntuforums.org/showthread.php?t=2170499
kuba-orlik0397 has quit [Remote host closed the connection]
<daily> for some reason DVD players don't like the output
<daily> at all
kuba-orlik0397 has joined #ffmpeg
<daily> for a VBR DVD made with mplex, it just skips constantly, and is unwatchable
<daily> but for a DVD made with ffmpeg, it just doesn't read it at all
<daily> and no error message
<daily> a CBR DVD made with mplex works perfectly
<daily> i tried ffmpeg from git
<daily> in addition to debian's version
<daily> and it all failed :(
<daily> it was so frustrating i gave up completely on trying to mux DVDs with ffmpeg
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
luva85 has joined #ffmpeg
Livio has quit [Ping timeout: 260 seconds]
luva8 has quit [Ping timeout: 252 seconds]
luva85 is now known as luva8
HerbY_NL has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
Livio has joined #ffmpeg
<ManDay> I have the impression the longer I use ffmpeg the more incomprehensible mistakes occur...
<ManDay> Suddenly my tpad=stop_mode=clone:stop_duration=3 have just stopped working. they act as if stop_duration=0 and just end
<ManDay> 98% of everything is done and the issues become exponentially more bizarre
c_14 has quit [Server closed connection]
<ManDay> here they just come out at [example_synced] without any delays from the tpads whatsoever
<ManDay> wtf ffmpeg
c_14 has joined #ffmpeg
HerbY_NL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
emmanuelux has joined #ffmpeg
five61848033 has quit [Remote host closed the connection]
five61848033 has joined #ffmpeg
Ox7C5 has quit [Quit: Lost terminal]
<ManDay> inserting fps elements at crucial points seems to be a heal-it-all recipe
kuba-orlik0397 has quit [Remote host closed the connection]
System_Error has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
daily has left #ffmpeg [Leaving]
System_Error has joined #ffmpeg
<Marth64> daily: Thanks for sharing. Which DVD player are you testing with? I can check it out when I get some downtime.
Kruppt has quit [Quit: Leaving]
intrac has quit [Quit: Konversation terminated!]
intrac has joined #ffmpeg
moviuro has quit [Server closed connection]
moviuro has joined #ffmpeg
Offspring has quit [Quit: ZNC - https://znc.in]
GenTooMan has quit [Remote host closed the connection]
GenTooMan has joined #ffmpeg
Offspring has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
makidoll has quit [Read error: Connection reset by peer]
makidoll has joined #ffmpeg
kuba-orlik0397 has joined #ffmpeg
Blacker47 has quit [Quit: Life is short. Get a V.90 modem fast!]
ManDay has quit [Quit: WeeChat 4.2.3]
beaver has quit [Remote host closed the connection]
Haxxa has quit [Quit: Haxxa flies away.]
thomas_D8 has quit [Quit: The Lounge - https://thelounge.chat]
Haxxa has joined #ffmpeg
thomas_D8 has joined #ffmpeg
Forza has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Forza has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
lucasta has joined #ffmpeg
thomas_D8 has quit [Quit: The Lounge - https://thelounge.chat]
System_Error has quit [Remote host closed the connection]
lucasta has quit [Remote host closed the connection]
Brocker has quit [Server closed connection]
Brocker has joined #ffmpeg
waleee has joined #ffmpeg
System_Error has joined #ffmpeg
coldfeet has quit [Remote host closed the connection]
iive has joined #ffmpeg
ninjin has quit [Server closed connection]
ninjin has joined #ffmpeg
xx has quit [Ping timeout: 260 seconds]
Livio has quit [Ping timeout: 264 seconds]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
bcheng has quit [Server closed connection]
bcheng has joined #ffmpeg
lavaball has quit [Remote host closed the connection]
hightower2 has joined #ffmpeg
halvut has quit [Ping timeout: 256 seconds]
sentriz has quit [Ping timeout: 256 seconds]
j45 has quit [Ping timeout: 240 seconds]
j45 has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
five61848033 has quit [Remote host closed the connection]
five61848033 has joined #ffmpeg
vlm has quit [Quit: Leaving]
Tinos has quit [Remote host closed the connection]
Tinos has joined #ffmpeg
sentriz has joined #ffmpeg
SuicideShow has quit [Ping timeout: 256 seconds]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
SuicideShow has joined #ffmpeg
HarshK23 has quit [Quit: Connection closed for inactivity]
earthwormjim has joined #ffmpeg
_Vi has quit [Remote host closed the connection]
_Vi has joined #ffmpeg
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
JanC_ has joined #ffmpeg
JanC has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
JanC_ is now known as JanC
sgm09 has joined #ffmpeg
puff has quit [Ping timeout: 268 seconds]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg
iive has quit [Quit: They came for me...]
kuba-orlik0397 has quit [Remote host closed the connection]
kuba-orlik0397 has joined #ffmpeg