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

burek burek at teamnet.rs
Mon Sep 23 03:05:03 EEST 2019


[00:04:00 CEST] <auser0> i also noticed there is something called :: ErrorDetectionType
[00:04:09 CEST] <auser0> how do i avoid having this added to mediainfo?
[00:50:40 CEST] <auser0> okay guess i got that
[00:50:55 CEST] <auser0> is there a way to fix the placement of subtitles using ffmpeg?
[00:51:11 CEST] <auser0> the ones i have ended to the top left, and i want it as the default in the bottom of the screen
[01:03:14 CEST] <AiNA_TE> is you sent convert your subtitile format to .srt then it has no syles
[01:03:30 CEST] <AiNA_TE> and will placed at the bottom of your screen by your media player by default
[01:03:42 CEST] <AiNA_TE> styles*
[01:13:37 CEST] <auser0> is there a way to do it that the default placement for it is at the bottom AiNA_TE ?
[01:33:29 CEST] <furq> auser0: it's just text, there is no position information
[01:33:38 CEST] <furq> you'd have to configure your player
[02:07:37 CEST] <auser0> thanks furq but from my previous playbacks, i always had the subtitles by default showing at the bottom
[02:07:49 CEST] <auser0> i guess thats how the CC subtitles were in that stream maybe
[03:52:33 CEST] <auser0> anyone know how to avoid having this  :: ErrorDetectionType in mediainfo?
[07:21:11 CEST] <auser0> anyone able to tell me what does that mean
[07:21:16 CEST] <auser0> Fixing malformed AAC bitstream in "xx.mp4"
[07:21:16 CEST] <auser0> ffmpeg -y -loglevel 'repeat+info' -i vv.mp4 -c copy -f mp4 '-bsf:a' aac_adtstoasc xx.mp4
[07:21:39 CEST] <auser0> how does it fix it ?
[10:16:07 CEST] <exs> I need help
[10:16:22 CEST] <exs> I have a fast machine but when I record my screen I just get frame= 1507 fps= 21 q=24.0 size=   16896kB time=00:00:48.86 bitrate=2832.4kbits/s speed=0.69x
[10:16:32 CEST] <exs> what could be the reason, the cpu also gets not more than 30%
[10:18:12 CEST] <durandal_1707> slow disk?
[10:18:22 CEST] <exs> I have a m2 ssd
[10:18:38 CEST] <durandal_1707> which OS?
[10:40:47 CEST] <exs> durandal_1707: arch linux
[10:41:21 CEST] <exs> ffmpeg version n4.2.1
[10:41:45 CEST] <exs> NVIDIA Corporation GP104 [GeForce GTX 1080]
[10:41:58 CEST] <exs> AMD Ryzen 7 1700X (16) @ 3.400GHz
[10:42:01 CEST] <exs> 64315MiB RAM
[10:42:09 CEST] <exs> Resolution: 3440x1440
[10:42:20 CEST] <exs> OS: Arch Linux x86_64 with Kernel: 5.3.0-arch1-1-ARCH
[10:47:27 CEST] <exs> durandal_1707: any thoughts?
[10:50:04 CEST] <durandal_1707> exs: run ffmpeg command under: "perf record", and post "perf report" results
[10:50:18 CEST] <durandal_1707> only few seconds of recording
[10:53:54 CEST] <exs> durandal_1707: I am not fimiliar with perf record, can you tell me what I should execute?
[10:58:39 CEST] <exs> frame=  464 fps= 22 q=8.0 size=    5888kB time=00:00:14.60 bitrate=3303.7kbits/s speed=0.701x is what I have during recording
[10:58:55 CEST] <exs> perf record: Captured and wrote 25.172 MB perf.data (478765 samples)
[10:59:06 CEST] <exs> do you want me to upload the perf.data? never used it before
[11:00:44 CEST] <exs> ah ok sry I see now
[11:00:47 CEST] <exs> I send you a screenshot
[11:01:15 CEST] <exs> durandal_1707: https://pasteboard.co/IyyY1if.png
[11:03:15 CEST] <exs> even I move no windows I get only speed=0.926x
[11:03:34 CEST] <exs> I mean I am fine when the video loose quality
[11:03:46 CEST] <exs> it just need to be synced with audio for any price
[11:04:08 CEST] <exs> in my current situation it unsynced after a while
[11:05:02 CEST] <exs> is the script https://termbin.com/vx83
[11:18:27 CEST] <durandal_1707> exs: dunno, have you tried without audio first?
[11:23:42 CEST] <exs> durandal_1707: let me try now
[11:24:45 CEST] <exs> durandal_1707: its slightly better
[11:24:56 CEST] <exs> I use compton can this be a reason?
[11:25:52 CEST] <durandal_1707> slightly?
[11:29:48 CEST] <exs> from speed=0.926x to speed=0.976x
[11:30:19 CEST] <exs> its funny, when I get start to record, the first seconds are 0.5x then it start to increase slowly to 0.90x
[11:30:44 CEST] <exs> now its even speed=0.99x but it took 15 seconds to get there
[11:31:12 CEST] <exs> I dont understand that my cpu is at 16%, does ffmpeg use concurrency for recording?
[11:31:38 CEST] <durandal_1707> it should use threads for video encoding
[11:32:04 CEST] <durandal_1707> try to specify -threads 8 as input and as output option
[11:35:01 CEST] <exs> durandal_1707: can you please tell me where exactly in https://termbin.com/vx83
[11:35:08 CEST] <exs> since I know the order matters
[11:36:14 CEST] <exs> I mean after a while it starts to work at 0.99x but I worry that the first seconds are enough to make video and audio unsycn again
[11:37:01 CEST] <exs> https://termbin.com/0gez is what I have now, is that correct?
[11:38:17 CEST] <durandal_1707> add also one after -vcodec libx264
[11:38:56 CEST] <durandal_1707> perhaps you should use something else for capture, like obs
[11:38:57 CEST] <exs> durandal_1707: I have 16 threads, should I add 16?
[11:39:06 CEST] <exs> durandal_1707: what is obs?
[11:39:19 CEST] <durandal_1707> exs: dunno, too much threads may slow more
[11:39:32 CEST] <exs> ok I keep 8 then, other changes?
[11:39:59 CEST] <exs> sry obs I do not know can you help me to craft a good script to record my screen with full audio, income (mic) and outcome?
[11:40:06 CEST] <durandal_1707> https://obsproject.com/
[11:40:19 CEST] <exs> no I have amazing speed=0.997x
[11:40:46 CEST] <durandal_1707> the ffmpeg capturing is single threaded...
[11:41:04 CEST] <durandal_1707> and even capture of audio and video may be in single same thread...
[11:41:20 CEST] <durandal_1707> so only video encoding use multiple threads
[11:41:46 CEST] <exs> low it grow to speed=0.999x
[11:41:53 CEST] <exs> low=lol
[11:42:06 CEST] <durandal_1707> but how fast it grows?
[11:42:16 CEST] <durandal_1707> and with audio?
[11:42:21 CEST] <exs> no without
[11:42:24 CEST] <exs> I test with audio now
[11:42:49 CEST] <exs> btw obs is multithred? if its just a gui for ffmpeg I would stick with ffmpeg because its command line, I am not a fan of guis
[11:43:08 CEST] <durandal_1707> obs is used by professionals
[11:43:22 CEST] <exs> https://termbin.com/bheg this is how it looks now
[11:43:23 CEST] <durandal_1707> ffmpeg is used by "amateurs"
[11:43:39 CEST] <exs> durandal_1707: lol I thought its a kind of core app that most guis built on
[11:43:55 CEST] <exs> durandal_1707: the benefit of command line is that I can save my files automatically
[11:44:01 CEST] <exs> i just press a command and the file is saved
[11:44:13 CEST] <exs> with guis you have to click around a lot. but I give it a try, thanks for recommandation
[11:44:23 CEST] <exs> is the script alright like that?
[11:44:39 CEST] <durandal_1707> exs: ffmpeg capturing stack is very simple and not much maintained
[11:44:49 CEST] <exs> oh ok
[11:45:04 CEST] <exs> durandal_1707: can you reocmmand another command line tool for screencasting?
[11:45:05 CEST] <durandal_1707> exp. you might use hardware video encoders
[11:45:27 CEST] <durandal_1707> exs: use something else that slow x11grab
[11:46:12 CEST] <durandal_1707> there is now kmsgrab
[11:46:49 CEST] <durandal_1707> and xcbgrab???
[11:47:09 CEST] <durandal_1707> well than one is same as x11grab
[11:52:13 CEST] <exs> should I use kmsgrab?
[11:53:43 CEST] <durandal_1707> dunno, try it, it may need special hw and setup
[12:00:32 CEST] <exs> durandal_1707: wow damn it, obs studio is amazing
[12:00:36 CEST] <exs> its even open source right?
[12:00:45 CEST] <exs> the way it saved data is also perfect
[12:00:49 CEST] <exs> with dates encoded
[12:00:57 CEST] <exs> durandal_1707: can you tell me which output format I should prefere
[12:01:17 CEST] <exs> mp4 was my favorit for unknown reasons, maybe because mp3 is a really common and mp4 sounds similar
[12:01:29 CEST] <exs> but the app tells me that the format can become corrupted fast
[12:01:35 CEST] <exs> flv I am not sure its the default
[12:01:43 CEST] <exs> what would you recommend as an ffmpeg dev?
[12:04:13 CEST] <JEEB> mp4 without fragments has the index at the end
[12:04:22 CEST] <JEEB> so if you cut the power or the app crashes
[12:04:26 CEST] <durandal_1707> mkv
[12:04:30 CEST] <JEEB> you've got a bunch of data that is crap
[12:15:06 CEST] <exs> JEEB: thatis what I mean, so you guys would recommend mkv?
[12:15:19 CEST] <exs> why mkv over flv? or other formats?
[12:15:26 CEST] <JEEB> flv is very limited
[12:15:41 CEST] <exs> lol than why its the default at obs studio
[12:15:42 CEST] <JEEB> you usually only use flv when pushing video through the RTMP protocol, which only supports FLV
[12:15:52 CEST] <JEEB> yes, a lot of services take in live video as FLV
[12:15:58 CEST] <JEEB> through RTMP
[12:16:00 CEST] <exs> RTMP is a protocol for online streaming I guess?
[12:16:02 CEST] <JEEB> yes
[12:16:04 CEST] <JEEB> adobe based
[12:16:08 CEST] <JEEB> but even adobe has given up on it
[12:16:22 CEST] <JEEB> which is why we so far say no to adding random additional support for newer things in FLV
[12:16:30 CEST] <exs> I prefere some kind of raw format that I can use to convert into any format I want
[12:16:33 CEST] <JEEB> people should switch to fragmented MP4 or MPEG-TS or something else
[12:16:41 CEST] <JEEB> (for live stream ingest)
[12:16:51 CEST] <JEEB> exs: I'd say go with durandal_1707's recommendation for now
[12:16:53 CEST] <JEEB> matroska/mkv
[12:17:01 CEST] <JEEB> you can remux to mp4 if you need to
[12:17:05 CEST] <JEEB> or re-encode
[12:17:43 CEST] <exs> JEEB: ok I do and why mkv and not mov ts or m3u8?
[12:18:09 CEST] <exs> just curiosity
[12:19:39 CEST] <JEEB> mov without fragments has the same issues as mp4
[12:19:46 CEST] <JEEB> after all, mp4 is based upon mov originally
[12:20:16 CEST] <JEEB> ts is SureFine; it's the original broadcast container. but it's made for A->B playback, not for seeking etc
[12:20:40 CEST] <JEEB> m3u8 is HLS which you might want if you are feeding this to a web server to be served as a live stream
[12:20:49 CEST] <JEEB> bunch of segments and playlists
[12:21:19 CEST] <exs> JEEB: ok thanks for that feedback
[13:25:45 CEST] <exs> durandal_1707: obs is awesome, works perfect
[13:26:04 CEST] <exs> just neeed to test more if I get unsync probs but seems good now
[16:18:00 CEST] <auser0> ffmpeg -y -loglevel 'repeat+info' -i vv.mp4 -c copy -f mp4 '-bsf:a' aac_adtstoasc xx.mp4  , anyone can explain to me what that does?
[16:21:07 CEST] <JEEB> -y = don't ask me for confirmation
[16:21:20 CEST] <JEEB> -loglevel = same as -v, sets the verbosity level for logging
[16:21:39 CEST] <JEEB> then you have input and setting the encoder to "copy" for all streams
[16:21:45 CEST] <JEEB> then -f sets the output format (container)
[16:21:53 CEST] <JEEB> (usually guessed by the output file name)
[16:22:19 CEST] <JEEB> then the bit stream filter converts AAC from the way it's in MPEG-TS to how it's stored in MP4 (which sounds weird when your input is in MP4)
[16:22:28 CEST] <JEEB> also that bit stream filter addition should now be automagic
[16:22:37 CEST] <JEEB> then you have the output file name
[16:23:48 CEST] <auser0> ty JEEB
[16:24:10 CEST] <JEEB> also please learn to look up ffmpeg-all.html
[16:24:18 CEST] <JEEB> that probably can answer a lot of your questions
[16:24:34 CEST] <auser0> just wondering, if i specify the container in the output, will i need -f mpf part?
[16:24:47 CEST] <auser0> sure, will do that too
[16:25:12 CEST] <JEEB> the -f forces it, mp4 would already get auto-picked if the file name ends with ".mp4"
[16:25:36 CEST] <JEEB> usually you use -f XXX when your file name doesn't have an extension, or the extension is custom
[16:25:50 CEST] <auser0> and shouldnt it be like : -c:e aac_adtstoasc -bsf:a
[16:25:59 CEST] <auser0> -c:a*
[16:26:28 CEST] <auser0> or its not needed to specify -c:a ?
[16:28:11 CEST] <JEEB> -c:a is already set within -c
[16:28:13 CEST] <JEEB> to "copy"
[16:28:22 CEST] <JEEB> without a specifier the rule applies to all output streams
[16:28:43 CEST] <JEEB> and the bit stream filter is called like that, so no - it's not an encoder
[16:28:54 CEST] <JEEB> and as I said, that gets automagically inserted now if your input and output are like that
[16:29:00 CEST] <JEEB> mp4 in and mp4 out does *not* need it
[16:29:01 CEST] <JEEB> as I said
[16:29:09 CEST] <JEEB> so in that sense that option is non-sensical
[16:29:57 CEST] <auser0> ah i got it now, and does that part is needed to be ran by the exact order : -bsf:a' aac_adtstoasc ?
[16:30:52 CEST] <JEEB> the option is bsf (limited to audio since this bit stream filter is for audio only), and the parameter is the name or names of bit stream filters
[16:31:42 CEST] <JEEB> option/parameter order matters, yes. but within the command line it only matters a) if you are before/after inputs b) if you have multiple inputs or outputs, at which point you set options between those
[16:32:24 CEST] <JEEB> ffmpeg OPTIONS_FOR_INPUT_0 -i INPUT_0 OPTIONS_FOR_INPUT_1 -i INPUT_1 OPTIONS_FOR_OUTPUT_0 OUTPUT_0 OPTIONS_FOR_OUTPUT_1 OUTPUT_1
[16:32:48 CEST] <JEEB> there are of course some options for ffmpeg.c itself which are global
[16:32:59 CEST] <JEEB> like the verbosity option etc
[16:35:46 CEST] <auser0> okay i guess i understood it now, ty
[16:36:09 CEST] <auser0> last night the command i asked for : -c copy -c:s srt -bsf:v 'filter_units=pass_types=1-5'
[16:37:08 CEST] <auser0> once i specified -c:s srt, doed that tells ffmpeg to start encoding subtitles to be in srt format?
[16:37:14 CEST] <auser0> does*
[16:37:29 CEST] <JEEB> yes, it sets the subtitle encoder to srt
[16:38:10 CEST] <auser0> if i ran it without the following -bsf:v, would it still work ?
[16:39:05 CEST] <auser0> or i need to specify the bsf:v part everytime i want to encode to srt
[16:39:37 CEST] <JEEB> the bit stream filter only touches video streams
[16:39:51 CEST] <JEEB> and it just filters the video stream to remove certain units from it
[16:41:50 CEST] <auser0> ok got it
[16:42:45 CEST] <auser0> is there a way to control the way those subtitles are shown in my player?
[16:42:53 CEST] <auser0> using ffmpeg i mean
[16:43:18 CEST] <auser0> the one i tested last night had the subtitled shown on the top left
[16:43:43 CEST] <auser0> Im used to it in the middle at the bottom
[16:43:45 CEST] <JEEB> output the srt into a .srt file and check the lines.
[16:44:03 CEST] <another> afaik it depends on the settings in your video player
[16:44:55 CEST] <JEEB> SRT can have random HTML tags because people implemented that, so it could just be converting the positioning from the input like that
[16:45:02 CEST] <JEEB> just like it would put ASS tags for ASS
[16:45:09 CEST] <JEEB> but simplest is to dump the SRT and see how it looks
[16:46:23 CEST] <auser0> ah, that would do too, i havent checked it in an editor to see if there are weird tags, but will do
[16:47:15 CEST] <auser0> another, ya i thought so too but mine was set to always show them in the middle but somehow that one showed in wrong place
[16:47:37 CEST] <auser0> i never edited the position of them or anything
[16:49:30 CEST] <another> well, it depends on the subtitle codec
[16:50:10 CEST] <another> image based subtitles e.g. can specify the location
[16:50:42 CEST] <auser0> oh, so probably that conversion caused that then
[16:50:46 CEST] <another> no idea about cc608/708
[16:50:56 CEST] <JEEB> closed captions have a *lot* of stuff
[16:51:09 CEST] <JEEB> there's a test sample on videolan's sample server
[16:51:12 CEST] <another> i didn't even know cc embeded in the video stream was a thing
[16:51:17 CEST] <another> *until recently
[16:51:31 CEST] <auser0> the stream itself was playing them also on the top left iirc
[16:51:58 CEST] <auser0> so youre probably right
[16:52:17 CEST] <JEEB> https://streams.videolan.org/samples/sub/CC/
[16:52:21 CEST] <JEEB> see the CEA sample :P
[16:52:31 CEST] <auser0> ya, i guess i will need to demux them and check them soon
[16:55:07 CEST] <auser0> sure , downloading :)
[16:58:58 CEST] <DHE> yeah I want to make a demuxer for CCs because filters can mangle them if the framerate changes
[18:18:29 CEST] <auser0> i seen it JEEB :)
[18:18:41 CEST] <auser0> that would be nice DHE
[18:19:05 CEST] <auser0> anyone knows if this is something that should gets me worried in here :
[18:19:06 CEST] <auser0> https://zerobin.net/?f3291ac9fa42c307#EdyHEYmeS3cd4/SLxrXRVLSu2t64W53ngvbx2DD5VWU=
[18:19:32 CEST] <auser0> seems like the input shows 8 mins only while after fixing the audio stream, it shows 44mins
[18:29:09 CEST] <DHE> auser0: my plan doesn't really require decoding. I just need to be able to dismantle them and rebuild them to the same net effect in the output. I assume there's some padding since it appears each video frame has a fixed size CC payload which I can abuse to deal with increased or decreased framerates.
[18:33:47 CEST] <auser0> sounds good, so i guess if i understood correctly
[18:34:10 CEST] <auser0> you want to demux those CC subs and use some other tool as subtitle editor or whatever to nicely convert them to .srt
[18:34:30 CEST] <auser0> subtitle editor is gui as in windows so it wont do much of help i guess
[18:35:01 CEST] <auser0> i don't know about the padding part, but i feel like you can do it :)
[18:35:07 CEST] <DHE> no. I want to extract the CCs from video frames, submit them to my filter queue cleaned, then as they come out I put them back into the videos. possibly combining data from multiple frames into a single frame or otherwise slightly getting them out of order but 1 or 2 frames should be okay
[18:35:33 CEST] <DHE> well not out of order, just delayed
[18:36:55 CEST] <auser0> i see, well if there is something i can do to help, let me know since such a thing would helps a lot many people
[18:37:25 CEST] <auser0> even cehoyos was looking for something that does that smoothly
[18:38:30 CEST] <DHE> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/ccaption_dec.c  Well there is code to decode captions. I think I'll have to do a partial re-implementation, but implement more of as a demuxer than a decoder
[18:40:12 CEST] <cehoyos> auser0: It is in general very difficult to calculate the duration of an mpeg stream, so the fact that the duration is wrong is by itself not even an indication for a bug.
[18:40:25 CEST] <cehoyos> I don't know if in your specific case the wrong duration is a bug or not
[18:40:36 CEST] <cehoyos> Why did you highlight me? I don't understand the sentence
[18:41:13 CEST] <cehoyos> DHE: Are you planning to program something for yourself or something that you should be added to FFmpeg? (I know that these are not exclusive)
[18:41:35 CEST] <DHE> cehoyos: I have an existing applications using libav* that I planned to add it to
[18:42:08 CEST] <cehoyos> I just ask because moving a decoder into libavformat could be problematic - but for your own uses there is of course no issue.
[18:42:09 CEST] <auser0> oh, i never knew that the duration of an MPEG stream isn't that well detectable, thanks mate
[18:42:43 CEST] <cehoyos> It can have a timestamp wrap that can be at a random point in time
[18:42:50 CEST] <cehoyos> (I am not saying it has one)
[18:42:59 CEST] <auser0> I thought you could be also interested in what DHE is talking about, to convert CC to SRT precisely :)
[18:43:05 CEST] <DHE> yeah mpegts has that
[18:43:30 CEST] <cehoyos> DHE: What exactly does not work with current FFmpeg? (I know what does not work, I am just curious if that really hits you)
[18:43:33 CEST] <DHE> auser0: that ffmpeg file I linked earlier appears to do exactly that, though not SRT specifically. the catch is that the data is stored as frame sidedata and hence must be extracted differently
[18:44:10 CEST] <DHE> cehoyos: if the video framerate changes - perhaps due to inverse telecine in your filter pipeline - then some of the sidedata for closed captions is lost out the other end of the filterchain
[18:44:30 CEST] <auser0> i see
[18:44:48 CEST] <cehoyos> Didn't we fix that?
[18:44:58 CEST] <DHE> not that I'm aware of, but I could be wrong
[18:45:14 CEST] <cehoyos> No: What we fixed was that inserted frames do not duplicate Closed Captions
[18:45:30 CEST] <cehoyos> If frames get dropped, there is no way we can keep there SEI (or whatever it is called)
[18:45:43 CEST] <cehoyos> But I would still like to see your command line including ...
[18:46:06 CEST] <DHE> right. so my app will have to pull the side data, filter, then put it back. but I'll also have to understand the format enough to reassemble it appropriately
[18:46:16 CEST] <cehoyos> I would expect the split filter should allow you to work around the issue
[18:46:34 CEST] <DHE> I'm not using the ffmpeg cli
[18:46:43 CEST] <cehoyos> Why don't you try with ffmpeg (the command line interface) first and then try to port to your application?
[18:47:15 CEST] <DHE> becuase if I blindly copy sidedata at 30fps into video running at 24fps I'll have a pretty serious sync problem
[18:48:14 CEST] <cehoyos> auser0: One more thing: Why don't you keep the mpegts? Because it has reception errors (which is normal for mpegts), the mp4 may be invalid (which is not ok for an mp4 file). Afair, all Media Players accept the mpegts stream
[18:48:38 CEST] <cehoyos> DHE: Why don't you try with ffmpeg (the command line interface) first and then try to avoid blindly copying sidedata?
[18:49:39 CEST] <DHE> sorry what?
[18:50:18 CEST] <cehoyos> Does your input contain embedded Closed Captions (not separate streams) and you want the same embedded Closed Captions in the output but with a different framerate?
[18:50:24 CEST] <cehoyos> This may indeed not work yet.
[18:50:30 CEST] <DHE> yes that is the goal
[18:50:52 CEST] <DHE> right now they get a little bit mangled on-screen
[18:50:59 CEST] <cehoyos> This may indeed not work yet with the cli, should probably work using the libraries only.
[18:52:01 CEST] <DHE> it kinda works, but looks like they're being typed by someone drunk
[19:17:56 CEST] <auser0> this is how i got the srt files : https://zerobin.net/?0af5a850b521786e#U4SrO22UvXyT8L+BT3qqB9hX6MOVrOxTKg5dPH6VKuQ=
[19:18:26 CEST] <auser0> and they show on the top left, maybe those tags needs some cleanups : https://i.imgur.com/pwXDyTi.png
[19:20:32 CEST] <furq> oh i forgot srt actually does have alignment tags
[19:20:36 CEST] <furq> i've never seen anyone use them before
[19:24:56 CEST] <auser0> ya removing those an7 seems to place them right
[19:25:21 CEST] <auser0> is there a way in one command line to remove them from CC or from .srt before muxing them to the mkv ?
[19:25:29 CEST] <furq> apparently -c:s text will give you srt with all tags stripped
[19:26:12 CEST] <auser0> oh interesting, thaks furq, will try that
[19:26:22 CEST] <auser0> whats the major difference between text and srt?
[19:26:27 CEST] <furq> they're the same
[19:26:33 CEST] <furq> just text doesn't write any tags
[19:27:28 CEST] <auser0> nice, testing it atm
[19:27:30 CEST] <furq> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/srtenc.c#L211-L227
[19:28:45 CEST] <furq> that's the only difference in the code path
[19:29:47 CEST] <auser0> i see thanks, so basically the command i ran in one line is: ffmpeg -i zz.ts -f lavfi -i "movie=zz.ts[out0+subcc]" -map 0:v -map 0:a -map 1:s -c copy -c:s text -bsf:v 'filter_units=pass_types=1-5' -metadata:s:s:0 language=eng xx.mkv
[19:29:59 CEST] <furq> sure
[19:30:04 CEST] <furq> or you could just -i foo.srt -c:s text bar.srt
[19:30:28 CEST] <auser0> sorry, where exactly and what does it mean :) ?
[19:30:33 CEST] <furq> that's the entire command
[19:30:42 CEST] <furq> if you already made an srt with the tags then you can just strip them
[19:31:10 CEST] <furq> otherwise your command looks right
[19:31:33 CEST] <auser0> oh, so that to be run on the demuxed srt to remove the alignment tags from it, then i would remux it back, right?
[19:31:40 CEST] <furq> yeah
[19:32:34 CEST] <auser0> nice :)
[19:33:07 CEST] <auser0> i wish there was an alternative to that decoding part, on my slow machine, it slows things up
[19:49:44 CEST] <auser0> furq, how do i get rid of ErrorDetectionType                       : Per level 1
[19:49:44 CEST] <auser0>  that happens when i output to an .mkv, i see it in mediainfo for example
[20:02:44 CEST] <another> why do you want to get rid of error detection?
[20:07:32 CEST] <auser0> i never seen it before, so i thought it would be cleaner to get rid of it
[20:08:17 CEST] <JEEB> you might want to go ask mediainfo people what that actually means
[20:08:39 CEST] <auser0> okay, will do that too
[20:09:49 CEST] <auser0> i noticed something, if i use the ffmpeg method with -f lavfi and -bsf:v command line, the final mkv seems to have different
[20:10:07 CEST] <auser0> i know you guys explained decoding not equal to encoding but : https://i.imgur.com/tF43XXE.png
[20:10:10 CEST] <furq> auser0: -write_crc32 0
[20:10:17 CEST] <furq> there's no reason to turn that off though
[20:10:21 CEST] <auser0> ty furq
[20:10:55 CEST] <auser0> the one on the right is the .mkv without the subtitles, while the right one is with the srt subs from the lavfi hack
[20:11:05 CEST] <auser0> why does the video stream looks different ?
[20:11:56 CEST] <furq> that's probably just mediainfo probing them differently
[20:12:45 CEST] <auser0> oh, that probably it too
[20:24:31 CEST] <cehoyos> auser0: Why do you think the video streams are different?
[20:25:15 CEST] <auser0> only because i no longer see the encoder settings with the x264 core as shown on the right mediainfo in that png ^
[20:26:04 CEST] <auser0> i think mediainfo isn't parsing them similarly, since also the bitrate is not there in the mkv from the ffmpeg command
[20:28:18 CEST] <auser0> is there a way to remove the global tags and tags for tracks ?
[20:28:30 CEST] <auser0> i tried -map_metadata -1
[20:28:37 CEST] <auser0> but it seems to still have them
[20:30:18 CEST] <cehoyos> Didn't you remove the encoder settings with the filter_units bitstream filter?
[20:30:53 CEST] <auser0> oh, i didn't know that does that
[20:30:58 CEST] <auser0> i want to keep them :)
[20:31:10 CEST] <cehoyos> And (significantly more important): Doesn't "ffmpeg -i file" also show the difference?
[20:31:24 CEST] <auser0> nope ffmpeg -i doesn't show any difference
[20:32:36 CEST] <cehoyos> Indeed
[20:33:23 CEST] <auser0> is it possible to run the -bsf:v without that other part?
[20:33:32 CEST] <auser0>  -bsf:v
[20:33:47 CEST] <auser0> i don't want the bitrates/encoder settings to be removed if that is possible
[20:38:24 CEST] <cehoyos> You could experiment and report back
[20:39:05 CEST] <auser0> okay, i shall do that
[20:39:42 CEST] <auser0> how about removing all tags (global and track tags) is that also possible ?
[20:43:04 CEST] <auser0> cehoyos, if i wanted to output only subtitles from the .ts not an .mkv
[20:43:11 CEST] <auser0> will this work : ffmpeg -i xx.ts -f lavfi -i "movie=xx.ts[out0+subcc]" -map_metadata -1 -map 1:s -c copy -c:s text xx.srt
[20:43:11 CEST] <auser0>  ?
[20:45:37 CEST] <another> should work
[20:45:53 CEST] <another> won't however solve you issue
[20:46:59 CEST] <auser0> why not another?
[20:47:14 CEST] <auser0> is the -bsf:v part necessary to make sure the srt subs are okay ?
[20:51:01 CEST] <cehoyos> Why don't you try other values for filter_units?
[20:57:21 CEST] <auser0> don't mind me, but i really not sure how it works at all hehe
[20:57:33 CEST] <auser0> not sure what i need to pass it to work or even to try messing with it :p
[20:58:06 CEST] <another> because your issue was with SEI information being stripped away
[20:58:20 CEST] <auser0> what is SEI?
[20:58:26 CEST] <auser0> is this the encoder settings?
[20:58:29 CEST] <another> Supplemental enhancement information (SEI)
[20:58:40 CEST] <another> yes
[20:58:45 CEST] <auser0> ah
[20:58:45 CEST] <another> among others
[21:01:45 CEST] <auser0> i was told earlier :: if you want to strip the closed captions then there's a filter_units or so bit stream filter by JEEB
[21:02:27 CEST] <auser0> i did try right now to do -c:s text without the -bsf:v part and compared the subtitles, they looked identical
[21:02:58 CEST] <auser0> does the -bsf:v has any rule in the extracting of the CC subtitles and encoding it to srt using that lavfi hack?
[21:10:52 CEST] <auser0> also, is there a way to get rid efficiently using ffmpeg from all the global and tracks tags :: https://i.imgur.com/pwZRGTi.png ?
[00:00:01 CEST] --- Mon Sep 23 2019


More information about the Ffmpeg-devel-irc mailing list