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

burek burek at teamnet.rs
Thu Nov 28 03:05:02 EET 2019


[04:09:15 CET] <hamdan> Hi there... How's everybody going? I'm trying to process long files recorded as raw through chrome/webm... THey just output 60minutes... is there something that I'm missing? I'm not using the -t flag at all
[04:40:05 CET] <hamdan> anyone?
[06:03:47 CET] <julesverne> .bet 10%
[06:04:26 CET] <julesverne> sorry. wrong chat
[06:10:58 CET] <hamdan> all my hopes and dreams... lololol
[12:00:06 CET] <BeerLover> I compiled ffmpeg and it is running 3 time slower than https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz. But that build doesn't have libfdk_aac
[12:00:14 CET] <BeerLover> am i doing somethin wrong?
[12:01:24 CET] <JEEB> did you build with SIMD? did you use the same encoders etc?
[12:01:53 CET] <JEEB> fdk-aac missing shouldn't cause any significant difference; the audio encoders are fast to begin with
[12:06:58 CET] <BeerLover> JEEB https://github.com/zimbatm/ffmpeg-static/blob/master/build.sh
[12:07:04 CET] <BeerLover> this is the script i used
[12:07:16 CET] <BeerLover> I updated the ffmpeg to version n4.2.1
[12:08:08 CET] <BeerLover> on ubuntu 18.04 bionic x64_86
[12:09:04 CET] <JEEB> unfortunately not having time to help you more, sorry :)
[12:09:24 CET] <pagios> any better alternative than the arut rtmp nginx ffmpeg? something more decent?
[12:09:51 CET] <cehoyos> Why did you use a script instead of just using "./configure --enable-gpl --enable-nonfree --enable-libfdk... && make ffmpeg"?
[12:19:38 CET] <th3_v0ice> How can I change framerate of a video using FilterContext and API? My current attempts to set framerate to 18/1, and timebase to 1/18, before opening a filter are not working properly. The muxer is complaining about the non monotonically increasing PTS and DTS. If I incorporate ticks_per_frame into the account (because input it MP4) then its not complaining but the output framerate is the same
[12:19:38 CET] <th3_v0ice> as input. For this particular sequence ticks_per_frame is 2, so I set framerate to 36/2 and timebase to 1/36. What am I doing wrong?
[12:24:57 CET] <BeerLover> @cehoyos errors. Dunno what i need to compile. PKG_BUILD?
[12:29:54 CET] <cehoyos> FFmpeg tries to have no dependencies (except zlib which isn't always needed)
[12:32:03 CET] <bencoh> well, and x264 in case you'd like to encode to h264, and ... :)
[12:40:59 CET] <DHE> yeah, ffmpeg borderline requires only a compiler. everything else is optional, though at your own risk of not including it....
[12:41:12 CET] <Reinhilde> borderline ;-)
[12:43:49 CET] <BeerLover> but it always gives error
[15:02:19 CET] <Alexa> Hello there! I'm looking for a good method to convert a video to the one that's suitable for PS3.
[15:04:01 CET] <Alexa> ffmpeg -i "$1" -s 960x540 -f mp4 -vcodec libx264 -profile:v main -level 31 -preset veryslow -tune film -crf 22 -threads 0 -b 1152k -metadata title="Film" -acodec libvo_aacenc -ab 160k -ac 2 -ar 44100 "$1".soni.mp4
[15:04:29 CET] <Alexa> but I get the error: Please use -b:a or -b:v, -b is ambiguous
[15:04:38 CET] <cehoyos> libvo_aacenc does not exist anymore in FFmpeg...
[15:04:44 CET] <cehoyos> This message is not an error
[15:04:45 CET] <Alexa> What should I use, b:a or b:v?
[15:04:55 CET] <Alexa> Unknown encoder 'libvo_aacenc'
[15:05:01 CET] <Alexa> true, that's the second error
[15:05:08 CET] <cehoyos> It's the only error
[15:05:58 CET] <Alexa> oh
[15:06:00 CET] <Alexa> okay
[15:06:07 CET] <Alexa> than I'll try another way.
[15:06:07 CET] <Alexa> ;)
[15:06:14 CET] <cehoyos> Another way?
[15:06:25 CET] <cehoyos> Just remove "-acodec libvo_aacenc" from your command line.
[15:08:12 CET] <Reinhilde> -codec:a aac or something
[15:08:16 CET] <cehoyos> Just remove "-acodec libvo_aacenc" from your command line.
[15:08:38 CET] <cehoyos> You can also remove "-threads 0" as this is the default
[15:08:42 CET] <Reinhilde> Repeating it doesn't make it any more true.
[15:08:57 CET] Last message repeated 1 time(s).
[15:08:57 CET] <cehoyos> Posting nonsense isn't helpful either.
[15:09:20 CET] <cehoyos> You can also remove "-f mp4" as mp4 is the default for file suffix ".mp4"
[15:10:02 CET] <Reinhilde> i don't know that AAC audio (which is what Alexa wants) is default for that container format though.
[15:10:08 CET] <cehoyos> I know
[15:10:32 CET] <Alexa> It works
[15:10:36 CET] <Alexa> it started converting
[15:10:45 CET] <cehoyos> And I know that FFmpeg will choose a better aac encoder than "aac" if one is available.
[15:10:47 CET] <Alexa> changed to -c:a aac
[15:10:56 CET] <Alexa> and removed -threads 0 (as it's default)
[15:11:29 CET] <cehoyos> It is better not to specify "aac" as you may have a better encoder (you didn't show us your configuration)
[15:11:36 CET] <Reinhilde> my configuration only has aac and aac_latm
[15:11:38 CET] <Alexa> I will report later the results back to you. :D
[15:11:48 CET] <cehoyos> "aac_latm" is not an aac encoder
[15:11:49 CET] <Alexa> Reinhilde, but I did
[15:12:18 CET] <Reinhilde> cehoyos: it's a different type of aac is it not
[15:12:29 CET] <Reinhilde>  DEA.L. aac                  AAC (Advanced Audio Coding) (decoders: aac aac_fixed )
[15:12:30 CET] <Reinhilde>  D.A.L. aac_latm             AAC LATM (Advanced Audio Coding LATM syntax)
[15:12:32 CET] <Reinhilde> also only decode
[15:12:34 CET] <cehoyos> There is no "aac_latm" encoder in FFmpeg (no matter the specification)
[15:12:37 CET] <Alexa> by configuration, what exactly do you mean? I use ffmpeg on linux, I haven't changed any configs.
[15:12:59 CET] <cehoyos> But it is possible that "aac" is not the best aac encoder available
[15:13:03 CET] <Reinhilde> cehoyos: you're less patient than me when I am having hypoglycemia
[15:13:06 CET] <cehoyos> Then remove "c:a aac"
[15:13:07 CET] <Reinhilde> Alexa: which linux?
[15:13:19 CET] <Alexa> Ubuntu 19.04
[15:13:23 CET] <Reinhilde> cehoyos: and I'm pretty impatient when I'm having hypoglycemia
[15:13:34 CET] <cehoyos> I try my best but I arguably overreact when being attacked as you did
[15:13:49 CET] <Reinhilde> there was no personal attack
[15:13:57 CET] <Reinhilde> you are probably a candidate to be 5150'd.
[15:14:08 CET] <cehoyos> You will have to concede that this lies on the receivers end
[15:14:33 CET] <cehoyos> Whatever that means...
[15:14:35 CET] <Reinhilde> bhosdi ke
[15:15:21 CET] <cehoyos> Ooops
[15:16:10 CET] <cehoyos> Just for the record: [15:15] <Reinhilde> fuck you and fuck your mother also
[15:16:12 CET] <cehoyos> ;-)
[15:21:32 CET] <Alexa> cehoyos, what was that? XD
[15:22:10 CET] <BtbN> A 12 year old.
[15:28:30 CET] <cehoyos> And Reinhilde
[15:34:41 CET] <Alexa> Guys, the Reinhilde dared to contact me to complain. What a child. I told him the chat is not meant for offending others but to help instead.
[15:34:56 CET] <Alexa> He told me to screw myself etc.
[15:34:58 CET] <Alexa> lol
[15:35:02 CET] <Alexa> XD
[15:35:09 CET] <cehoyos> Him?
[15:35:19 CET] <Alexa> He offended me as well.
[15:35:32 CET] <cehoyos> (Reinhilde is an old German name for women.)
[15:35:33 CET] <Alexa> First he contacted me to complain about the ban.
[15:35:52 CET] <cehoyos> I have to leave now, maybe that solves the kick, I don't know...
[15:35:55 CET] <Alexa> Something like, I should keep away from #ffmpeg if I'm to learn about ffmpeg.
[15:36:07 CET] <cehoyos> Good luck!
[15:36:19 CET] <Alexa> cehoyos, why would you leave?
[15:36:23 CET] <Alexa> hahahah
[15:36:44 CET] <Alexa> Kicking him was definitively a good choice ;)
[16:02:27 CET] <BtbN> Reinhilde is a well known troll in various other channels.
[17:11:13 CET] <maniaknl> Hi FFMPEG masters,
[17:11:47 CET] <maniaknl> I'm currently using ffmpeg to record some video, however sometimes when i try to record ffmpeg produces an empty mkv file.
[17:12:14 CET] <maniaknl> I'm using the following command to start ffmpeg:
[17:12:18 CET] <maniaknl> ffmpeg -rtsp_transport tcp -analyzeduration 10M -probesize 10M -i $rtspstream -acodec copy -vcodec copy $filepath </dev/null >/dev/null 2>>$logfile
[17:13:18 CET] <maniaknl> The log of the failed recording can be found here:
[17:13:19 CET] <maniaknl> https://pastebin.com/Lb5Puijx
[17:13:36 CET] <maniaknl> Is there any params i can add to improve stability?
[17:15:00 CET] <maniaknl> I think 1 out of 25 recordings fail
[17:17:19 CET] <cehoyos> Please at least provide an actual command line (no variables for file names) including the complete, uncut console output and please test current FFmpeg git head.
[17:17:32 CET] <cehoyos> I don't even see immediately why the remuxing failed.
[17:29:12 CET] <hamdan> ?
[18:14:08 CET] <capin> hello, yesterday i referenced an issue where i could not record my screen and mic audio at the same time, as a work around i like to launch two seperate ffmpeg processes at the same time and stop the processes at the same time as a work around for the time being. is this something anyone here has dealt with? i know this more shell specific, so please forgive if barking up the wrong tree.
[18:21:58 CET] <maniaknl> @cehoyos
[18:24:09 CET] <maniaknl> The full command is:
[18:24:09 CET] <maniaknl> ffmpeg -rtsp_transport tcp -analyzeduration 10M -probesize 10M -i rtsp://192.168.1.26:8554/unicast -acodec copy -vcodec copy /share/video/camera1/2019/11/27/12-57.mkv </dev/null >/dev/null 2>>/share/logs/camera1-2019-11-27.log
[18:24:24 CET] <maniaknl> For this specific instance
[18:25:09 CET] <maniaknl> I already gave you the full log that has been written to /share/logs/camera1-2019-11-27.log related to this instance. If you need additional information, please tell me on how i expand my logs to include the required information
[18:31:12 CET] <maniaknl> "FFmpeg git head" will not work as i am using the ffmpeg application supplied by Hassio (Home Assistant) it's running in a protected docker instance i can't access
[18:31:24 CET] <cehoyos> Then please ask Hassio for support.
[18:33:00 CET] <maniaknl> So there are no additional flags i can try to improve the stability?
[18:33:59 CET] <maniaknl> I got 2 camera's hooked up to a movement sensor, both start recording for the duration movement is detected
[18:34:43 CET] <maniaknl> The ffmpeg command for the other camera is equal to the one i shared with you, just the ip is different and it's using the camera2 folder instead of camera1
[18:35:11 CET] <maniaknl> For some reason the same video also failed for the 2nd camera at the same time.
[18:36:34 CET] <pink_mist> maybe your security system is being breached by hackers! :P
[18:36:44 CET] <saml> how many hackers?
[18:37:18 CET] <Angela--19> Hey guys. Code noob here. I want to add a small video cut into a bigger video. I need this to be automated, because I want to do it multiple times at the same time. Can any of you plese help me? Let me describe a bit better, I own a company and we do tons of marketing videos,  we have a 3 second video of our call-center and I want to insert that
[18:37:18 CET] <Angela--19> small video into every single video that I have. Same time as wel (ten second mark).
[18:38:27 CET] <Angela--19> it would be something like this
[18:38:28 CET] <Angela--19> https://stackoverflow.com/questions/29200105/insert-video-in-video-ffmpeg-at-time-exact
[18:38:36 CET] <Angela--19> but Im too much of a noob to understand.
[18:39:56 CET] <kepstin> Angela--19: if you don't need any transitions, the easiest way would probably be to concatenate the three things you want (first part of original video, inserted video, second part of original video)
[18:40:22 CET] <Angela--19> I dont need transitions
[18:40:29 CET] <Angela--19> kepstinthanks for the quick reply
[18:40:38 CET] <Angela--19> How do I go about into making that happen
[18:40:44 CET] <kepstin> something like ffmpeg -t 10 -i original.mp4 -i insert.mp4 -ss 10 -i original.mp4 -filter_complex concat=n=3:v=1:a=1 output.mp4
[18:41:05 CET] <kepstin> but you should also add encoder options (codec selection, quality) to that
[18:41:11 CET] <Angela--19> <3
[18:41:14 CET] <Angela--19> cool
[18:41:18 CET] <Angela--19> gonna try that out, thanks so much
[18:42:05 CET] <kepstin> the -t option means "read only 10 seconds", and the -ss option means "seek to 10 seconds", in this case since they're before inputs, they apply to the input file that's right after them.
[18:42:30 CET] <saml> isn't there a way to cut at keyframes only so that we don't need to re-encode?
[18:42:54 CET] <kepstin> yes, but there's no guarantee that there'll be a keyframe where you want to cut.
[18:43:19 CET] <kepstin> this will always work.
[18:43:38 CET] <saml> yeah
[18:43:57 CET] <Angela--19> I dont need to be super specific on the frame
[18:44:01 CET] <Angela--19> kepstin
[18:44:36 CET] <kepstin> also, it's tricky to deal with cutting audio and video at the right point when doing that, *and* you have to make sure that both videos being combined were encoded with special options to make them concatable
[18:44:59 CET] <saml> ah right audio
[18:45:12 CET] <Angela--19> yeah yeah
[18:45:17 CET] <Angela--19> audio is gonna be hard
[18:45:18 CET] <Angela--19> right?
[18:45:29 CET] <kepstin> the command i gave you will do audio correctly
[18:45:34 CET] <saml> you just need to re-encode
[18:45:37 CET] <saml> yeah
[18:47:11 CET] <Angela--19> cool cool
[18:47:15 CET] <Angela--19> gonna try and get back to you guys
[18:47:25 CET] <Angela--19> saml kepstin u both rock
[18:49:02 CET] <maniaknl> I doubt anyone would want to hack my camera's :P  But do you guys have any clue?
[18:49:30 CET] <maniaknl> Perhaps running 2 instances of ffmpeg at the same time might cause problems?
[18:50:38 CET] <maniaknl> I can if needed add a 100ms delay or something before starting the 2nd recording
[18:51:39 CET] <pink_mist> maniaknl: you bought a product from hassia, they have their own version of ffmpeg, you really need to ask them
[18:51:50 CET] <pink_mist> err hassio
[18:53:02 CET] <maniaknl> I think the entire thing is opensource and free, but would't they just use the binaries you guys supply on the ffmpeg website?
[18:54:15 CET] <pink_mist> you'd need to ask them
[18:54:32 CET] <saml_> hi
[18:54:40 CET] <saml_> what happened?
[18:54:49 CET] <maniaknl> Fair enough, so to be able to get support here i actually need to start using the binaries you guys supply on the ffmpeg website?
[18:55:22 CET] <pink_mist> you should compile it from git
[18:55:42 CET] <maniaknl> On the machine i want to run it on?
[18:57:10 CET] <furq> it'll be quicker to cross-compile it but more annoying to get any dependencies installed
[18:57:17 CET] <furq> assuming this is on a rpi
[18:57:23 CET] <maniaknl> rpi 3b+
[18:57:31 CET] <maniaknl> But that is the only Linux machine i have
[18:57:56 CET] <furq> yeah it's not worth the hassle if you're only going to do this once
[18:57:56 CET] <maniaknl> I assume i can't compile is on my windows desktop and just move the ffmpeg file
[18:58:05 CET] <furq> you could do it in a linux vm
[18:58:36 CET] <maniaknl> Because it needs to run on a arm processor right?
[18:58:44 CET] <furq> yeah
[18:59:09 CET] <furq> that command doesn't need any external dependencies so it shouldn't take too long to build on a pi 3
[18:59:50 CET] <pink_mist> maniaknl: even if you do this, it doesn't mean we'll be able to help you. hassio may have messed up other things on their end regardless if you're using an ffmpeg from latest git head or not ... you should really be asking them for support since you've presumably paid them money for their product
[19:00:20 CET] <furq> hassio isn't a commercial product
[19:00:51 CET] <furq> and as far as i can tell it's just using the system ffmpeg
[19:01:16 CET] <maniaknl> I have Hassio running on raspbian, so i have access to the system itself
[19:01:45 CET] <furq> https://www.johnvansickle.com/ffmpeg/
[19:01:53 CET] <furq> if this is raspbian then the armel build on here should work
[19:02:07 CET] <furq> or maybe armhf, i forget how their packaging works
[19:02:17 CET] <maniaknl> So i don't have to compile it myself?
[19:02:40 CET] <furq> you should try that first
[19:02:51 CET] <furq> idk whether six days ago is close enough to git head
[19:03:59 CET] <maniaknl> Let me check the docs
[19:04:24 CET] <maniaknl> I was checking the git how to page but this is more a guide on how to commit your own code on top of the ffmpeg stuff
[19:07:10 CET] <furq> fwiw i suspect your camera is at fault, but maybe a newer ffmpeg will handle it better
[19:13:53 CET] <maniaknl> both camera's having the same issue at the same time, but it could be the camera was not expensive
[19:14:41 CET] <maniaknl> Are there any retry options i can use in these cases?
[20:27:00 CET] <Soni> why does ffmpeg still artifact stills/pengs?
[20:27:33 CET] <Soni> I just wanted to turn a 16x16 peng into a 256x256 peng but ffmpeg went and artifacted everything
[20:27:52 CET] <kepstin> do you mean png?
[20:28:07 CET] <kepstin> and describe the artifacts and what you expected
[20:28:33 CET] <kepstin> by default it should be doing a bicubic upscale, which would make a somewhat blurry result
[20:28:34 CET] <Soni> artifacted: https://media.awoo.space/awoo.space/accounts/avatars/000/101/525/original/de5c1e1965eca201.png
[20:29:12 CET] <kepstin> oh, that's a paletted png image, huh
[20:29:32 CET] <Soni> cmd: ffmpeg -i ~/Desktop/Art/NewPic-16.png -filter 'scale=w=256:h=256:flags=neighbor' ~/Desktop/Art/NewPic-256.png
[20:29:58 CET] <kepstin> can you share the original image?
[20:30:03 CET] <saml_> what's original
[20:30:04 CET] <Soni> expected: https://media.awoo.space/awoo.space/accounts/avatars/000/101/525/original/d0bdb8e4b3a61ac6.png
[20:30:24 CET] <Soni> (from magick convert ~/Desktop/Art/NewPic-16.png -scale 256x256 ~/Desktop/Art/NewPic-256.png)
[20:31:47 CET] <saml_> Soni, remove flags=neighbor
[20:32:18 CET] <kepstin> for this sort of pixel scaling, neighbor makes sense, you definitely don't want bicubic scaling with a palette :)
[20:32:36 CET] <Soni> saml_: looks worse
[20:32:57 CET] <Soni> is it paletted?
[20:33:09 CET] <kepstin> Soni: please share the original image.
[20:33:54 CET] <Soni> iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAG1BMVEUAAAD///9AAID/AP8A//8AgP8AAP+AAICAAP9V0V/CAAAAQ0lEQVR4nGNggAMBIGaEsqE0E4JrAFfHyIAdsIS5QhjlQABmFCkpKQFZaelK5UBmGUNouHqRMRAwgIgOIGDogAI4AwAr5RQgCpxcWQAAAABJRU5ErkJggg==
[20:34:04 CET] <saml_> nice
[20:34:14 CET] <saml_> is that ssh key
[20:34:17 CET] <kepstin> but yeah, i'm wondering if there's some rounding errors in the paletted scaling code. assuming the input is paletted, converting to rgb before scaling could work around the issue
[20:34:23 CET] <kepstin> i assume that's a base64 encoded png
[20:34:34 CET] <Soni> data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAG1BMVEUAAAD///9AAID/AP8A//8AgP8AAP+AAICAAP9V0V/CAAAAQ0lEQVR4nGNggAMBIGaEsqE0E4JrAFfHyIAdsIS5QhjlQABmFCkpKQFZaelK5UBmGUNouHqRMRAwgIgOIGDogAI4AwAr5RQgCpxcWQAAAABJRU5ErkJggg==
[20:35:03 CET] <saml_> that is probably web browser url
[20:35:48 CET] <Soni> I love how I can send 16x16 pengs over IRC
[20:36:04 CET] <kepstin> huh, 4-bit palette, that's a pretty unusual png. but yeah, the workaround of "ffmpeg -i img.png -vf format=rgb0,scale=w=256:h=256:flags=neighbor output.png should work, at the expense of generating a 24bit rgb output.
[20:36:06 CET] <saml_> convert -verbose -debug original.png -scale 256x256 a.png
[20:36:06 CET] <saml_> convert: unrecognized event type `original.png' @ error/convert.c/ConvertImageCommand/1226.
[20:36:26 CET] <saml_> nevermind i'm using imagemagick wrong
[20:40:11 CET] <kepstin> i suspect that ffmpeg's scaler simply doesn't have an optimized palette based neighbor scaling mode. It's probably doing something ridiculous like converting the input png to an internal colourspace, scaling, then converting back to the palette with dithering (and there's some rounding errors in the process)
[20:41:22 CET] <Soni> it's nearest neighbor, there should be no need for that
[20:41:51 CET] <kepstin> feel free to provide a patch for an optimized palette based nearest neighbor scaling method :/
[20:42:48 CET] <kepstin> swscale is designed to be a generic "anything to anything" scaler, and then it also has optimized methods for a few specific common conversions that skip the generic stuff
[20:43:00 CET] <kepstin> this doesn't appear to be one of those cases.
[20:44:18 CET] <Soni> for any paletted image with nearest neighbor, there should be no need to convert anything. you shouldn't even look at the palette, just the pixel data.
[20:44:42 CET] <kepstin> yep. patches welcome.
[20:45:04 CET] <Soni> (it's called "nearest neighbor" for a reason. it's not MSAA or w/e.)
[20:45:36 CET] <Soni> (idk what imagemagick uses but it's probably some form of MSAA)
[21:04:27 CET] <faLUCE> Is it possible, with some filter, to "decompress" dynamics which are compressed with drc_scale = 1 ?
[21:04:51 CET] <kepstin> no, it's a lossy / unreversable process.
[21:05:34 CET] <faLUCE> why lossy? it affects volume, not samples...
[21:06:17 CET] <kepstin> lossy because any time volume is reduced, that means reduced precision per sample. not a huge deal in most cases, but still a thing.
[21:06:35 CET] <kepstin> unreversible because there's no way to know what volume change was applied in which parts of the audio.
[21:07:40 CET] <faLUCE> kepstin: there should be a function to apply when there are strong changes of dynamics
[21:08:18 CET] <kepstin> but there's no longer strong changes in dynamics after the drc has been applied
[21:08:39 CET] <faLUCE> kepstin: of course, but there still are changes bigger than others...
[21:09:43 CET] <faLUCE> https://forum.audacityteam.org/viewtopic.php?t=3750
[21:09:51 CET] <kepstin> i mean, there are expander filters, but they're very generic, tricky to tune, and will certainly not reproduce the original audio (it'll probably sound worse than the compressed audio, tbh)
[21:10:27 CET] <faLUCE> kepstin: yeah, I remember that one of these produced distorted audio
[21:10:59 CET] <faLUCE> I don't aim to reproduce the original audio, but at least to improve the compressed one
[21:12:25 CET] <kepstin> honestly, the best you can do is go through with the envelope tool in audacity and go "this bit was supposed to be louder" and "this bit was supposed to be quieter"
[21:12:53 CET] <faLUCE> kepstin: yes, I know, but it's long and hard...
[21:13:05 CET] <faLUCE> in addition, the envelope tool in audacity is terrible
[21:14:05 CET] <kepstin> maybe someone can train a neural net to figure out if something sounds like it should be louder or should be quieter and applies appropriate adjustment. that could be kinda cool :)
[21:14:14 CET] <faLUCE> rotfl
[21:17:42 CET] <faLUCE> another question: if I want to make a wav file from an ac3 one, should I use 16 or 24 bit depth ?
[21:18:43 CET] <kepstin> if you're going to be doing additional editing on it, consider using 24bit int or 32bit float on intermediate files if you have the space. otherwise 16 bit int is fine.
[21:19:35 CET] <faLUCE> kepstin: I don't have to edit it... just put it on the dvd
[21:20:11 CET] <faLUCE> why should I use 24 bit if I edit it?
[21:20:28 CET] <kepstin> note that ffmpeg's ac3 decoder and encoder both natively work on 32bit floating point, so any other format requires additional conversions.
[21:21:02 CET] <faLUCE> kepstin: I just used ffmpeg -i file.ts file.wav
[21:21:13 CET] <faLUCE> should I specify the bit depth ?
[21:21:22 CET] <kepstin> wav uses s16le unless otherwise specified
[21:21:46 CET] <faLUCE> kepstin: ok, but does it loose something from the oiriginal ac3 ?
[21:21:52 CET] <faLUCE> 16 bit
[21:22:02 CET] <kepstin> ac3 is lossy, you've already lost something
[21:22:25 CET] <faLUCE> kepstin: I know, but do I loose something else when transforming it to wav 16 bit ?
[21:22:36 CET] <kepstin> the decoded ac3 is an approximation of the original signal anyways, and so .. ? probably doesn't matter much.
[21:23:19 CET] <faLUCE> ok, but I wonder if the encoded ac3 carries an info about the bit depth for decoding
[21:23:30 CET] <kepstin> in theory since ffmpeg's ac3 decoder outputs 32 bit float, and ffmpeg's ac3 encoder takes 32bit float, then saving 32bit float in the temporary file reduces the number of conversions. in practise, i don't know that it would be possible to tell the difference
[21:23:49 CET] <kepstin> faLUCE: original bit depth is basically irrelevant given the design of lossy codecs
[21:24:02 CET] <kepstin> since they usually use some sort of floating-point-like representation internally.
[21:25:27 CET] <faLUCE> kepstin: then, what this floating point representation causes ?
[21:26:18 CET] <faLUCE> I mean, why is it not relevant for 24 or 16 bit ?
[21:28:11 CET] <kepstin> i don't know what you mean
[21:29:06 CET] <faLUCE> I mean: you told that this codec uses a floatinbg point representation... why it is not relevant for the bit depth ?
[21:30:44 CET] <faLUCE> this thread says that ac-3 is 16 bit only
[21:30:46 CET] <faLUCE> https://forum.videohelp.com/threads/335799-Dolby-Digital-Audio-bit-depth-16-bits-Why
[21:32:28 CET] <kepstin> lossy codecs generally don't end up representing individual samples using specific numbers of bits internally, so "bit depth" of the decoded output is just a matter of what format the decoder ended up using when rebuilding the signal.
[21:32:53 CET] <kepstin> ffmpeg's ac3 decoder decodes to 32bit per sample floating point, fwiw.
[21:33:14 CET] <kepstin> but it probably doesn't actually use all that precision, of course.
[21:37:50 CET] <kepstin> (lossless codecs of course *do* have specific bit depths, because the whole point is that when decoded, they produce the exact same samples as what they had as input)
[21:41:15 CET] <kepstin> the reason to use a higher bit depth for intermediate editing is that when doing multiple edits on stuff, you in theory can accumulate quantization noise. if you're working in 24bit depth, that quantization noise will end up being <1bit at 16bit depth, so it's basically like there was no added noise.
[21:41:27 CET] <kepstin> not that anyone would really notice 1 bit of noise in 16bit audio :)
[21:45:33 CET] <cousin_luigi> Greetings.
[21:46:47 CET] Action: cousin_luigi has a nice clip with an AAC audio track that's not being recognised. ffprobe returns a "Unsupported codec with id 100359 for input stream 1"
[21:47:03 CET] <cousin_luigi> mediainfo recognises it and vlc can play the clip with audio
[21:47:38 CET] <cousin_luigi> CounterPillow: Is this possibly for -devel ?
[21:48:08 CET] <kepstin> cousin_luigi: ideally you'd pastebin the entire output of ffprobe, please.
[21:48:35 CET] <CounterPillow> no this is not for -devel
[21:48:37 CET] <kepstin> cousin_luigi: but if it doesn't work with the latest ffmpeg from git, it might be helpful for you to file an issue on trac with a sample.
[21:48:45 CET] <CounterPillow> ^-
[21:48:59 CET] <CounterPillow> that's what I've been telling him lol
[21:49:32 CET] <cousin_luigi> kepstin: https://pastebin.com/raw/z7BfG0K5
[21:50:06 CET] <cousin_luigi> kepstin: Not sure how to supply a sample...
[21:50:40 CET] <cousin_luigi> CounterPillow: Was telling me about the -loglevel debug and -report switches.
[21:50:58 CET] <kepstin> those might provide additional helpful information, yeah.
[21:51:25 CET] <kepstin> but for a sample - if you can cut e.g. the first couple mb of the file and you get the same output from ffprobe, then that's a good sample.
[21:52:25 CET] <cousin_luigi> kepstin: cut like with dd ?
[21:52:29 CET] <kepstin> yeah
[21:52:45 CET] <kepstin> (it's possible that won't work on an mp4 file, depending how it was made)
[21:54:19 CET] <cousin_luigi> kepstin: In fact it didn't.
[21:54:30 CET] <cousin_luigi> So, would the log do, you reckon?
[21:54:40 CET] <kepstin> better than nothing :/
[21:54:51 CET] <cehoyos> cousin_luigi: Please provide the input sample
[21:55:26 CET] <cousin_luigi> cehoyos: I'm not sure how. It's 800MB long and non legally distributable.
[21:55:44 CET] <cehoyos> We have never received a sample that was legally distributable
[21:56:40 CET] <cehoyos> Do not provide a cut sample unless you verified that it still plays with vlc
[21:56:56 CET] <cehoyos> (It is likely possible to cut the sample but it may be difficult)
[21:57:12 CET] <kepstin> if the file size is really an issue for you, it's possible that replacing most of the middle of the file with '0's and then compressing it with gzip or whatnot might work around that, but again - verify (the first part of it, at least) plays and that you get the same ffprobe output.
[21:57:33 CET] <cousin_luigi> kepstin: That's an interesting notion. How much of the tail should I keep?
[21:57:34 CET] <cehoyos> See http://0x0.st/
[21:57:56 CET] <cehoyos> I will do that, it will likely take you longer than the uploading
[21:58:17 CET] <cousin_luigi> cehoyos: FYI, I have a shitty connection.
[21:58:30 CET] <cousin_luigi> like 300kbps up.
[21:58:37 CET] <cehoyos> Then please provide the first 10MB, the last 10MB and the exact file size (before cutting)
[21:58:51 CET] <cousin_luigi> ok, will try that
[21:59:03 CET] <cehoyos> Better the first 20 and the last 5
[22:00:46 CET] <faLUCE> do you know anything about the "extrastereo" filter? I'm trying it with smplayer, I thing it's something associated with ffmpeg. It produces great sound, but I don't understand how it works
[22:07:07 CET] <kepstin> faLUCE: there's info in the documentation...
[22:09:03 CET] <faLUCE> how can I obtain the info with the command line?
[22:09:15 CET] <faLUCE> I googled but could not find the info
[22:09:18 CET] <kepstin> "man ffmpeg-filters"
[22:09:43 CET] <faLUCE> sorry, I searched "mpv extrastereo"
[22:09:45 CET] <faLUCE> thnks
[22:24:41 CET] <cousin_luigi> cehoyos: Should I paste the link here or in PM?
[22:24:53 CET] <cehoyos> Here
[22:24:58 CET] <cousin_luigi> cehoyos: http://0x0.st/zIET.xz
[22:41:45 CET] <cousin_luigi> cehoyos: Do you need me to file a trac ticket too?
[22:50:35 CET] <cehoyos> https://trac.ffmpeg.org/ticket/7762
[22:55:07 CET] <rocktop> how can  I start stream_loop from certain time ?
[23:00:08 CET] <jcelerier> Hello :)
[23:00:24 CET] <jcelerier> does someone know if there is a way to read WAV chunks from ffmpeg in addition from the sample data ?
[23:00:54 CET] <jcelerier> (arbitrary ones - I am interested in the acid chunk in particular but I doubt that it would be handled directly by ffmpeg)
[23:01:23 CET] <cehoyos> What does the acid chunk do?
[23:04:04 CET] <jcelerier> it has some information useful for music software
[23:04:12 CET] <jcelerier> namely, what is the tempo and time signature of the .wav file
[23:05:21 CET] <rocktop> anyidea?
[23:07:09 CET] <jcelerier> and some other musically-relevant metadata
[23:07:10 CET] <jcelerier> most sample libraries ship .wav files with that chunk
[23:11:33 CET] <furq> doesn't look like it
[23:11:57 CET] <furq> libsndfile supports it
[23:12:34 CET] <kepstin> honestly, riff is such a simple format that you could pretty easily find the chunks yourself. i wrote a wav parser in ruby once in ~15 lines of code :/
[23:12:50 CET] <furq> i mean sndfile supports parsing the acid chunk directly
[23:13:31 CET] <kepstin> (although if you can avoid that it is nice, corner cases and there's rf64 and whatnot to deal with)
[23:13:53 CET] <cousin_luigi> cehoyos: Is the audio problem subtitle-related?
[23:14:25 CET] <cehoyos> No, but there is no audio problem, only a demuxer problem
[23:15:05 CET] <jcelerier> yes, I actually already do it
[23:15:16 CET] <jcelerier> but since I use ffmpeg for other stuff I was looking to decrease my amount of custom code :)
[23:15:26 CET] <cousin_luigi> Ah.
[23:15:39 CET] <jcelerier> the best program is the one I don't have to write ;)
[23:16:08 CET] <jcelerier> (also it sucks a bit to have a path to read .wav file and another to read all the other compressed formats)
[23:17:11 CET] <cousin_luigi> well, I suppose I'm done here.
[23:17:14 CET] <cousin_luigi> Have a good night.
[23:17:20 CET] <cehoyos> Thank you!
[23:18:03 CET] <furq> it looks like wavdec already has support for some nonstandard chunks, so i guess someone could add it
[23:22:03 CET] <jcelerier> but what I haven't found is how to retrieve that information afterwards
[23:22:22 CET] <jcelerier> I understand that this is tricky to do because the ffmpeg api is generic, and this is specific to RIFF-like formats
[23:23:57 CET] <cehoyos> It can be exported via metadata
[23:24:01 CET] <kepstin> depending on what's in the data, it might be appropriate to have it as metadata on the format context, or maybe expose it as a "data" stream.
[23:25:31 CET] <kepstin> (or even side data on a stream, i suppose)
[00:00:00 CET] --- Thu Nov 28 2019


More information about the Ffmpeg-devel-irc mailing list