[Ffmpeg-devel-irc] ffmpeg.log.20200104

burek burek at teamnet.rs
Sun Jan 5 03:05:02 EET 2020


[04:03:48 CET] <void09> anyone still around here?
[04:04:44 CET] <void09> I discovered ffmpeg duplicates a frame when i cut two pieces, first: -ss start -to a_time, second: -ss a_time -to end
[04:05:08 CET] <void09> last frame of first pieces is the first frame of second piece
[04:06:48 CET] <void09> this happens in 2 cases. I checked the input and there's only one frame there, so it should not be in both pieces ?
[04:07:04 CET] <void09> by cutting i mean encoding to lossless, not with -copy
[04:35:43 CET] <while> void09: sometimes I find the ffmpeg has bugs that are easier to workaround then to open a ticket and wait for a patch
[04:36:05 CET] <void09> I cannot work around this
[04:36:16 CET] <while> what is your end objective?
[04:36:21 CET] <void09> as I need it to work at scale, not just for this one example
[04:36:48 CET] <void09> end objective is to encode pieces of a video, source being http, and begin/end timestamps given
[04:37:18 CET] <void09> and I cannot have duplicated frames when I rejoin the encoded pieces, for obvious reasons
[04:37:35 CET] <while> can you remove the extra frame from your encoded video?
[04:37:41 CET] <void09> of course not
[04:38:07 CET] <void09> you can only remove any frames at will from non-keyframe based video stream
[04:38:12 CET] <while> could you encode into a bunch of .bmp files, and remove and offset them as to remove the offending frame?
[04:38:44 CET] <void09> while: i could workaround it a few times I guess, but as I said, I need this method to work at scale
[04:38:46 CET] <kepstin> void09: can you use the segment muxer instead for your use case?
[04:38:53 CET] <void09> I cannot spend all day scanning for duplicae frames
[04:39:28 CET] <while> void09: you can automate that, I think ffmpeg has something for it, I haven't looked recently though
[04:39:47 CET] <while> like a way to 'rate' how similar 2 frames/pictures are
[04:39:54 CET] <void09> kepstin: I'd rather have it working with the -ss -to instead. not sure how the segment muxer works
[04:40:11 CET] <void09> I was more interested in why this problem occurs
[04:40:19 CET] <kepstin> void09: also, are you using -to as an input option or output option?
[04:40:32 CET] <void09> kepstin: I tried both ways, both of them produce the same result
[04:40:44 CET] <void09> input is an mkv file made from a bluray
[04:40:53 CET] <void09> bluray remux
[04:41:23 CET] <kepstin> so, is the purpose to do a distributed video encode?
[04:41:33 CET] <void09> so I am not sure if this is a ffmpeg bug or some weird edge case, the input having some particular properties that confuses ffmpeg
[04:41:41 CET] <void09> kepstin: yes
[04:42:04 CET] <kepstin> i'd suggest using the segment muxer then. it'll require more disk space since you'll have to store the segments, but it should work much cleaner
[04:42:23 CET] <void09> uh oh
[04:42:41 CET] <void09> why doesn't it work cleanly as it is ?
[04:43:02 CET] <kepstin> not sure, would have to look into timestamp debugging output from ffmpeg running on your input file
[04:43:13 CET] <void09> I'd rather not use the segment muxer as that would mean i have to change the logic of the system I set up, and it will take a long time
[04:43:15 CET] <kepstin> but segment muxer is guaranteed to do a clean split between segments
[04:43:26 CET] <void09> well that's the thing
[04:43:31 CET] <void09> I cannot have segments
[04:43:42 CET] <void09> because the keyframes are random in the input
[04:43:53 CET] <void09> i mean, they have no corelation with the scenes
[04:44:06 CET] <kepstin> oh, right, now i remember you talking about that before
[04:44:07 CET] <void09> so i'd have to calculate offsets for the segments anyway
[04:44:14 CET] <void09> oh yes, I have too much free time :D
[04:44:16 CET] <void09> still at it
[04:44:27 CET] <kepstin> and my response remains "don't worry, it doesn't make a big enough difference"
[04:44:35 CET] <void09> I wrote some software to split segments and organize workers..
[04:44:46 CET] <void09> what doesn't make a difference?
[04:45:11 CET] <kepstin> assuming the segments are big enough, missing scene boundaries makes barely any difference
[04:45:24 CET] <void09> well you don't understand
[04:45:37 CET] <void09> every 100kb matters :)
[04:45:56 CET] <void09> and it's not about missing scene boudnaries
[04:46:06 CET] <void09> well, I guess it is
[04:46:19 CET] <kepstin> (besides, unless you're doing gop splitting using the same method as the encoder you're using, it'll be mismatched anyways)
[04:46:36 CET] <void09> nope, I cannot have that. I am doing the distributed encoding in the first place jut because I want to be able to encode at maximum settings
[04:46:55 CET] <void09> kepstin: I am using pyscenedetect, and it works pretty much flawlessly
[04:47:47 CET] <void09> I use a threshold such that I make sure it does not split a scene in two segments. even though it might merge a few scenes as one
[04:48:10 CET] <kepstin> anyways, if you're doing all this work, why not use ffmpeg apis directly? then you can look at the unmodified input timestamps and pick exactly when to stop :/
[04:48:22 CET] <void09> kepstin: I'm not a real programmer :\
[04:48:50 CET] <void09> and there's no ffmpeg library for my language.. well there is one but kind of oudated. headers
[04:49:21 CET] <void09> so yeah, I'd rather invest time bugging ffmpeg devs to fix this
[04:49:56 CET] <kepstin> well, you're gonna need to provide debug output from the ffmpeg command with timestamp information, as i said.
[04:50:11 CET] <void09> not sure how to do that
[04:51:15 CET] <void09> are you a dev kepstin, i forgot ?
[04:51:21 CET] <kepstin> you could also try using the trim filter to set the end point, it might work differently. try the -t option, see if it behaves more like you want. play around with the different -copyts options, etc.
[04:51:52 CET] <kepstin> last time you asked that, i said "define dev", and it became a whole long thing. i don't feel like doing that again.
[04:52:02 CET] <void09> I completely forgot
[04:52:36 CET] <void09> would a ffmpeg command with the remote file be of any use to you, to take a look ?
[04:53:13 CET] <kepstin> i have written patches that have gotten merged into ffmpeg, and I volunteer to help people out here when i have time, but this isn't the main thing i do.
[04:53:59 CET] <void09> it would be cool if you had a few minutes to take a look at it. it's only ~20 seconds or so of video
[04:56:14 CET] <void09> or at least tell me how do i get that debug info to file a bug report
[04:57:01 CET] <kepstin> please make commands that demonstrates the issue with two short clips that have a shared frame (preferably only a few seconds if possible), and run the ffmpeg commands with the options "-v debug -debug_ts 1" - it'll generate a lot of output, you'll want to save it to a file, or consider using the -report option.
[04:57:49 CET] <kepstin> and then, on your own, try a few of the other things i mentioned.
[05:00:03 CET] <void09> maybe the problem will not occur if i cut it in segments
[19:37:31 CET] <cpplearner> Guys, I want to get an error report by feeding my HDTV record to ffprobe. IMO, just by making ffprobe reading all the bytes would do the trick, but I'm not sure the exact options to use.
[19:38:50 CET] <cpplearner> How can I make ffprobe persists until the end?
[19:40:27 CET] <cehoyos> (Complete, uncut console output missing.) If with "HDTV" record you mean a transport stream, then errors are unavoidable.
[19:40:46 CET] <cpplearner> Yeah, I mean a transport stream.
[19:41:29 CET] <cpplearner> So, what I want to do is just to see if my recording contains some errors. For that purpose, Windows has a great application called mpeg2repair, but linux has no counterpart.
[19:42:17 CET] <cpplearner> So, I'll just try to use ffprobe for that, and I know that when reading a transport stream ff-family by default reports errors.
[19:42:23 CET] <cehoyos> FFmpeg is not a repair tool for transport streams
[19:42:33 CET] <cpplearner> No, I don't mean to repair.
[19:42:44 CET] <furq> just use ffmpeg with null output
[19:42:52 CET] <furq> unless you actually need the ffprobe output at the end
[19:43:50 CET] <cpplearner> mpeg2repair can do report & repair erros, but the formar is the one that I'm interested in.
[19:44:07 CET] <cpplearner> So, with null option ffmpeg reads to the end?
[19:44:15 CET] <furq> ffmpeg always reads to the end
[19:44:29 CET] <furq> ffprobe will do it with -count_frames but there's no advantage to using it over ffmpeg
[19:45:00 CET] <cpplearner> Just a quick quesiton: what's the core difference between ffprobe & ffmpeg?
[19:45:25 CET] <furq> different options
[19:46:31 CET] <cpplearner> Okay, Thanks for the solution. I'll try with null options.
[19:46:37 CET] <cpplearner> Have a nice day.
[19:46:51 CET] <furq> -i foo -f null -
[20:17:17 CET] <AiNA_TE> does -b:v get ignored when using crf ?
[20:17:26 CET] <Mavrik> pretty much
[20:18:17 CET] <furq> depends on the encoder
[20:18:31 CET] <furq> with libvpx -b:v is the bitrate cap
[20:18:50 CET] <furq> it's just ignored with x264/5 though
[20:18:58 CET] <AiNA_TE> im using x264 and want to limit max bitrate
[20:19:06 CET] <furq> you want bufsize and maxrate then
[20:19:12 CET] <AiNA_TE> ok, so i need to fall back to 2pasS?
[20:19:14 CET] <AiNA_TE> oh
[20:19:19 CET] <AiNA_TE> ok i will try that
[21:49:45 CET] <noudle> following https://trac.ffmpeg.org/wiki/ExtractSubtitles how do i know what to pass to -txt_format ?
[21:51:33 CET] <noudle> and how can i specify which subtitles i want to extract?
[22:07:33 CET] <noudle> nvm
[00:00:00 CET] --- Sun Jan  5 2020


More information about the Ffmpeg-devel-irc mailing list