[Ffmpeg-devel-irc] ffmpeg.log.20190302
burek
burek021 at gmail.com
Sun Mar 3 03:05:03 EET 2019
[00:51:41 CET] <ricemuffinball> i noticed that there are like 10 different AAC codecs , all producing different quality. is there like 10 different opus and vorbis too?
[00:52:47 CET] <furq> not for opus
[00:53:06 CET] <ricemuffinball> furq so there is only ONE opus?
[00:53:11 CET] <furq> as far as i know
[00:53:15 CET] <furq> there's definitely only one in ffmpeg anyway
[00:53:26 CET] <furq> aside from the experimental internal one which you can ignore
[00:53:45 CET] <ricemuffinball> if opus is free, won't there be like 10 different OPUS from 10 different people
[00:54:07 CET] <furq> aac and mp3 aren't free and there are hundreds of those
[00:54:13 CET] <pink_mist> no, opus is free enough that 10 different people has no legal need to make their own
[00:54:16 CET] <ricemuffinball> furq that's true
[00:54:25 CET] <furq> vorbis is free and all of the vorbis encoders i know of are forks of libvorbis
[00:54:42 CET] <ricemuffinball> how many vorbis are there
[00:54:52 CET] <ricemuffinball> is there more than 3 ?
[00:54:55 CET] <furq> idk there used to be a bunch of "tuned" vorbis encoders like aotuv and lancer
[00:55:03 CET] <furq> but a lot of that stuff got folded back into mainline iirc
[00:56:13 CET] <furq> anyway as far as ffmpeg is concerned there's only one of each of those encoders you need to care about
[00:56:26 CET] <furq> unless you want to build ffmpeg yourself with libfdk-aac
[00:56:30 CET] <ricemuffinball> how many different aac does ffmpeg support
[00:56:38 CET] <furq> two
[00:56:46 CET] <furq> it used to support more but the builtin encoder is good now
[00:57:22 CET] <ricemuffinball> which 2?
[00:57:37 CET] <furq> aac (internal) and fdk-aac (not gpl compatible so not included in any prebuilt binaries)
[00:57:51 CET] <furq> aac is decent quality, fdk is probably a bit better and it supports he-aac
[00:58:00 CET] <furq> but you need to build ffmpeg yourself to use it
[00:58:23 CET] <ricemuffinball> so it only supports one if you don't build it yourself
[00:58:28 CET] <furq> right
[00:58:43 CET] <furq> if you just want cbr lc-aac then the internal encoder is the only one you need to care about
[00:58:55 CET] <ricemuffinball> aac (internal) is that similar to faac one
[00:59:05 CET] <furq> no because faac sucks
[00:59:10 CET] <ricemuffinball> i see
[00:59:26 CET] <ricemuffinball> so faac is removed from ffmpeg competely?
[00:59:28 CET] <furq> yeah
[00:59:59 CET] <ricemuffinball> what about aac that google/youtube uses
[01:00:05 CET] <furq> shrug
[01:00:14 CET] <furq> nobody knows for sure what google uses
[01:00:25 CET] <furq> fdk is part of android so it seems likely that they'd use that for youtube
[01:00:40 CET] <furq> also because youtube is using ffmpeg on the backend
[01:01:08 CET] <ricemuffinball> i remember it was called .....
[01:02:41 CET] <ricemuffinball> i can't remember
[01:02:52 CET] <ricemuffinball> but it had 2 "O" in the lib name
[01:04:00 CET] <ricemuffinball> anybody know?
[01:37:17 CET] <ricemuffinball> why is opus converting 44.1K to 48K ?
[01:39:30 CET] <ricemuffinball> why is opus converting 44.1K and my 96k audio to 48K ?
[01:39:34 CET] <another> because opus has only 8, 12, 16, 24 and 48kHz sampling rate
[01:39:37 CET] <furq> https://wiki.xiph.org/OpusFAQ#How_do_I_use_44.1_kHz_or_some_other_sampling_rate_not_directly_supported_by_Opus.3F
[01:39:54 CET] <ricemuffinball> that's horrible
[01:40:05 CET] <furq> it's justified pretty well in the link i just posted
[01:40:29 CET] <ricemuffinball> i want to keep my 96K to 96K
[01:40:35 CET] <ricemuffinball> and 44.1K to 44.1K
[01:41:29 CET] <another> why?
[01:41:52 CET] <another> if that is important to you, why are you using a lossy codec at all?
[01:42:13 CET] <ricemuffinball> does vorbis do this too?
[01:42:14 CET] <another> because chances are you can't hear a difference
[01:42:30 CET] <another> relevant reading: https://people.xiph.org/~xiphmont/demo/neil-young.html
[01:42:30 CET] <furq> vorbis doesn't resample 44.1 but it also doesn't support 96k
[01:42:49 CET] <furq> there's no benefit to keeping 44.1, it'll be resampled on playback anyway
[01:43:09 CET] <another> and it makes opus a lot easier
[01:43:40 CET] <another> every rate it supports is a divisor of 48
[01:44:14 CET] <ricemuffinball> ffmpeg aac doesn't change 96k to 48k
[01:45:59 CET] <another> aac supports higher sampling rates
[01:46:14 CET] <another> which may or may not be useful
[01:46:55 CET] <furq> that's being quite generous
[01:47:10 CET] <another> well if you want to record bats...
[01:47:10 CET] <ricemuffinball> not sure why opus didn't make it to support 44.1K
[01:47:15 CET] <ricemuffinball> it's popular khz
[01:47:40 CET] <ricemuffinball> and 96khz
[01:48:45 CET] <another> it makes the codec a lot simpler
[01:49:13 CET] <another> and 96kHz is just overkill anyway
[01:49:14 CET] <ricemuffinball> then it has to resample
[01:49:25 CET] <ricemuffinball> 96k is standard that dvd-audio use
[01:49:37 CET] <another> it's still overkill
[02:07:20 CET] <ricemuffinball> opus clearly not the best: http://bernholdtech.blogspot.com/2013/03/Nine-different-audio-encoders-100-pass-recompression-test.html
[02:07:43 CET] <iive> recompression?
[02:07:56 CET] <iive> also 2013
[02:08:04 CET] <ricemuffinball> but there are samples
[02:08:10 CET] <ricemuffinball> you can hear
[02:08:17 CET] <pink_mist> was opus even done in 2013?
[02:08:22 CET] <pink_mist> I don't think it was
[02:09:07 CET] <pink_mist> hmm, seems initial releases was in 2012
[02:09:24 CET] <ricemuffinball> listen to the samples
[02:09:36 CET] <pink_mist> but that's an OLD version
[02:09:36 CET] <iive> it doesn't matter, the test is reencoding 100 times the same sample
[02:09:43 CET] <pink_mist> latest version was released in 2018
[02:09:54 CET] <pink_mist> and as far as I'm aware it's supposed to be magnitudes better
[02:10:31 CET] <another> i faintly seem to remember that there was a bug related to this which got fixed
[02:10:46 CET] <ricemuffinball> iive so? best audio codec should still sound the best compared to others
[02:11:11 CET] <iive> ricemuffinball, nope
[02:11:59 CET] <iive> you want codec that encodes the original sound into something that sounds good the first time you do it.
[02:12:47 CET] <ricemuffinball> Have you ever wondered how different codecs are affected by re-encoding / re-compressing? Of course, recompressing audio is a bad idea, but sometimes can't be avoided. Quality loss will inevitably occur, but are some codecs more resilient than others? To clear things up, I did a test with the following encoders:
[02:13:19 CET] <ricemuffinball> like that person said, sometimes it can't be avoided
[02:13:31 CET] <iive> it can. don't reencode audio
[02:14:57 CET] <iive> if you care about audio quality
[02:15:01 CET] <ricemuffinball> does reencoding to wav 1000 times cause quality loss too?
[02:15:13 CET] <iive> it is lossless.
[02:15:17 CET] <ricemuffinball> so no?
[02:15:23 CET] <iive> flac, alac.
[02:16:00 CET] <iive> look, different codecs use different acoustic models. they are going to cut different things.
[02:17:22 CET] <ricemuffinball> iive but that nero-aac sample is impressive even after 100 reencode
[02:17:45 CET] <iive> but we don't know why
[02:18:01 CET] <another> https://hydrogenaud.io/index.php?topic=114317.0
[02:18:12 CET] <iive> it may not use any acoustic model, so it sounds bad from the first encode.
[02:18:15 CET] <another> here is a more recent reenconding test
[02:19:15 CET] <ricemuffinball> another thanks , good link
[02:19:59 CET] <another> but anyway, these test are interesting but not really relevant
[02:22:31 CET] <furq> lol
[02:23:36 CET] <furq> i agree that opus is very disappointing for when you want to reencode the same file 1,000 times
[02:23:42 CET] <furq> i don't see how the developers could have overlooked this
[02:24:23 CET] <ricemuffinball> furq but listen to nero aac
[02:24:31 CET] <furq> it doesn't matter at all
[02:24:55 CET] <iive> ricemuffinball, read the comments of the article you have given
[02:29:36 CET] <furq> more to the point it doesn't really matter which is The Best Audio Codec
[02:29:47 CET] <furq> vorbis, opus and a good aac encoder will all sound great at 128k
[02:30:26 CET] <ricemuffinball> i would like to see 100 reencoding test for video as well
[02:30:55 CET] <furq> i'd be pretty confident x264 would do quite badly in a test like that if you used normal settings
[02:30:59 CET] <ricemuffinball> furq not after 100 times
[02:31:15 CET] <ricemuffinball> furq really? what makes you say that
[02:31:33 CET] <furq> psy
[02:32:31 CET] <ricemuffinball> i can't find anything online for 100 video test
[02:32:43 CET] <furq> that's because it's not a useful thing to test
[02:33:28 CET] <ricemuffinball> people might download from youtube and reupload it
[02:33:41 CET] <ricemuffinball> and if that happens over and over again
[02:33:54 CET] <Hello71> then they're doing it wrong.
[02:34:12 CET] <furq> people might do a lot of awful things
[02:34:16 CET] <furq> that doesn't mean it should be optimised for
[02:35:54 CET] <ricemuffinball> help me find 100 video test
[02:36:02 CET] <ricemuffinball> i am curious now
[03:17:46 CET] <iive> ricemuffinball, make your own.
[03:18:31 CET] <ricemuffinball> iive i don't have a decent computer to
[03:18:44 CET] <iive> you just need shorter sample
[03:19:14 CET] <ricemuffinball> nor i know how to do the scripting
[03:19:55 CET] <ricemuffinball> okay, even if i got the short sample, how do i script that
[03:49:52 CET] <ricemuffinball> why does x264 have such a crappy version # system
[04:05:04 CET] <DHE> they have a version numbering system?
[04:05:13 CET] <DHE> I thought it was just git versions and an ABI compat counter
[04:13:33 CET] <ricemuffinball> DHE yes a crappy one
[04:26:28 CET] <DHE> it's not a version numbering system. it's an ABI compatibility system, designed to prevent weirdness or outright crashes
[05:08:22 CET] <debianuser> Hello. Recently someone in #mplayer mentioned that "encoding 8bit source as 10bit prevents a rounding error in motion compensation. that allows the encode to get smaller, sometimes up to 30%". Now I want to try it for some of my x264 files, so the question is: how can I tell ffmpeg to encode 8bit at 10bit? ;) I know the other params, but what's a proper way to expand 8bit to 10bit? Is there a filter?
[05:14:40 CET] <klaxa> looks like setting -pix_fmt yuv420p10le is enough
[05:15:14 CET] <klaxa> it used to require linking a different libx264
[05:22:28 CET] <useri0> hey everyone, i asked earlier but still wondering if anyone knows what is the correct options i should add to my ffmpeg command to avoid seeing those : https://zerobin.net/?53bf9baa955dbae8#gve/ha3KCwuULnr+Df+/PVVyichHDxEcXyMgFAxXbf0=
[05:22:38 CET] <debianuser> klaxa: No special filters needed? It's just I thought expanding bit depth is not just adding zero bits at the end, I mean, 00000000 would turn into 0000000000, but 11111111 should become 1111111111, not 1111111100. So I just wanted to make sure it'd do the right thing...
[05:22:55 CET] <useri0> i have the log level set to "warning"
[05:30:31 CET] <debianuser> klaxa: Ah! I also needed at least `-vprofile high10` in addition to `-pix_fmt yuv420p10le`... Trying to encode with that and see what happens. Thanks for your hint!
[08:08:03 CET] <ricemuffinball> opus clearly not the best: http://bernholdtech.blogspot.com/2013/03/Nine-different-audio-encoders-100-pass-recompression-test.html
[09:15:42 CET] <ricemuffinball> when convert just a audio file to opus , do i use .opus or .ogg
[09:16:53 CET] <TheAMM> The container will be OGG, but some say to prefer .opus as the extension, but not all software support the .opus extension
[09:17:19 CET] <TheAMM> For example Android's media scanner ignores .opus, so you'll have to use .ogg on it
[09:17:26 CET] <TheAMM> (This may have been fixed already)
[09:18:04 CET] <TheAMM> The file will be the same, it's just preferences regarding the name
[09:18:17 CET] <ricemuffinball> then why some people prefer .opus
[09:18:45 CET] <TheAMM> Because it contains Opus audio inside and OGG, instead of the older OGG Vorbis
[09:19:06 CET] <TheAMM> inside an*
[09:19:58 CET] <TheAMM> It's just more explicit and the Opus authors recommend you to use .opus, too
[09:20:43 CET] <ricemuffinball> what are the option parameters for opus
[09:20:46 CET] <TheAMM> Personally I prefer .ogg because .opus feels like .h264 which implies raw h264 stream instead of a container
[09:21:01 CET] <TheAMM> ffmpeg -help encoder=libopus
[09:21:02 CET] <ricemuffinball> i can't find the docs
[09:22:11 CET] <ricemuffinball> audio E...A.... Favor faithfulness to the input
[09:35:59 CET] <ricemuffinball> ffmpeg -i input.flac -acodec libopus output.opus : what is the command to skip first 50 seconds
[09:38:07 CET] <TheAMM> ffmpeg -ss 50 -i in.flac -c:a libopus -b:a 160k out.opus
[09:40:21 CET] <ricemuffinball> does -ss 50 have to be before -i input ?
[09:41:13 CET] <TheAMM> No, but -ss after -i means the input will be decoded and discarded up until that point
[09:41:29 CET] <TheAMM> -ss before -i will do a fast seek
[09:42:01 CET] <ricemuffinball> what does -ss after -i do then, slow seek ?
[09:42:10 CET] <TheAMM> <TheAMM> No, but -ss after -i means the input will be decoded and discarded up until that point
[09:42:36 CET] <ricemuffinball> what is that mean in real world though? slower seek ?
[09:42:56 CET] <TheAMM> It means the unused part will be decoded instead of skipped
[09:43:04 CET] <TheAMM> Decoding is slower than not decoding
[09:43:37 CET] <TheAMM> It's not a "slower seek" because no seeking is done, but arguing about terminology might confuse you
[09:43:47 CET] <TheAMM> So just ignore that
[09:44:23 CET] <ricemuffinball> let me rephrase -ss after -i will create bigger file?
[09:44:32 CET] <TheAMM> No
[09:45:29 CET] <ricemuffinball> let me rephrase -ss after -i will result in longer encoding time?
[09:45:38 CET] <TheAMM> Yes
[09:46:01 CET] <TheAMM> It'll be marginal on audio only and a modern CPU, but yes
[09:46:09 CET] <TheAMM> I'm gonna go do something else so don't expect respond after this
[09:46:14 CET] <TheAMM> Someone else will pick up, maybe
[09:46:16 CET] <ricemuffinball> i see, but final opus file will be the same though right ?
[09:46:23 CET] <TheAMM> Should be
[09:46:31 CET] <ricemuffinball> i see, i got you now , thanks
[09:58:31 CET] <ricemuffinball> ffmpeg -ss 50 -i in.flac -c:a libopus -b:a 160k out.opus : what is the command to skip the last 10 seconds and first 50 seconds
[10:00:25 CET] <fling> ricemuffinball: ffmpeg -ss 50 -t $(($input_stream_length_in_seconds - 10)) -i in.flac -c:a libopus -b:a 160k out.opus
[10:01:03 CET] <ricemuffinball> wow it's complicated
[10:01:10 CET] <ricemuffinball> for last 10 seconds
[10:01:18 CET] <ricemuffinball> first 50 seconds is just -ss 50
[10:01:39 CET] <fling> ricemuffinball: $(()) is for calculating length
[10:01:49 CET] <fling> ricemuffinball: it is your shell thing, not complicated
[10:02:01 CET] <ricemuffinball> would that work in cmd.exe
[10:02:11 CET] <fling> ricemuffinball: idk, probably not.
[10:02:19 CET] <ricemuffinball> i need it to work in cmd.exe
[10:02:21 CET] <fling> ricemuffinball: try specifying length directly
[10:02:33 CET] <ricemuffinball> i have 50 files
[10:02:34 CET] <fling> ricemuffinball: then replace $(()) with something working in cmd.exe
[10:02:53 CET] <ricemuffinball> i want to convert all of them with skip the last 10 seconds and first 50 seconds
[10:02:55 CET] <fling> or install perl and script it with ffplay
[10:03:37 CET] <ricemuffinball> why does ffmpeg support first 50 without scripts but not last 10
[10:03:43 CET] <fling> ricemuffinball: ffmpeg does not accept to skip from the back. It accepts length
[10:04:36 CET] <fling> probably because it does not know the actual input stream length until it reads it, but it reads it while encoding.
[10:04:41 CET] <furq> uh
[10:04:43 CET] <furq> -sseof 10
[10:05:18 CET] <ricemuffinball> furq wait, there is a command?
[10:06:07 CET] <furq> sure but it won't do what you want
[10:06:13 CET] <furq> you can either seek from the start or the end, not both at once
[10:06:41 CET] <ricemuffinball> are you kidding me
[10:06:48 CET] <ricemuffinball> why can't i do both at once
[10:07:01 CET] <ricemuffinball> if both commands exisst
[10:07:51 CET] <fling> oh!!
[10:07:58 CET] <fling> furq: sounds good
[10:08:11 CET] <fling> ricemuffinball: you could run ffmpeg twice
[10:08:21 CET] <fling> ricemuffinball: cut from the start first, then cut from the end
[10:08:29 CET] <ricemuffinball> but that will degrade quality
[10:08:38 CET] <fling> furq: I missed this one. Is it a recently added flag? :P
[10:08:53 CET] <fling> ricemuffinball: use -c copy to not reencode
[10:09:16 CET] <ricemuffinball> fling i see
[10:09:39 CET] <ricemuffinball> for %%f in (*.wav) do (
[10:09:40 CET] <ricemuffinball> echo Converting "%%f"
[10:09:40 CET] <ricemuffinball>
[10:09:40 CET] <ricemuffinball> ffmpeg -ss 50 -i "%%f" -acodec libopus -vbr on "%%~nf.opus"
[10:10:30 CET] <ricemuffinball> somebody should report a bug that i cannot do both at once
[10:12:48 CET] <ricemuffinball> what is the second command i use then
[10:16:02 CET] <fling> ffmpeg -sseof 10 -i "%%~nf.opus" -acodec $copy "%%~nf-cut.opus"
[10:18:55 CET] <ricemuffinball> fling why dollar sign
[10:19:00 CET] <ricemuffinball> before copy
[10:20:02 CET] <fling> a typo!
[10:20:05 CET] <fling> remove it
[10:20:06 CET] <fling> -c copy
[10:20:48 CET] <ricemuffinball> ffmpeg -sseof 10 -i "%%~nf.opus" -acodec -c copy "%%~nf-cut.opus" so this?
[10:25:36 CET] <ricemuffinball> is it ffmpeg -sseof 10 -i "%%~nf.opus" -acodec copy "%%~nf-cut.opus" or ffmpeg -sseof 10 -i "%%~nf.opus" -c copy "%%~nf-cut.opus"
[10:34:00 CET] Last message repeated 1 time(s).
[10:43:50 CET] <another> same
[10:44:25 CET] <ricemuffinball> another are you sure?
[10:44:31 CET] <ricemuffinball> they do exactly same thing?
[10:44:48 CET] <another> if you look at the documentation (https://ffmpeg.org/ffmpeg-all.html) you'll find that -acodec is an alias for -c:a
[10:45:27 CET] <ricemuffinball> but i typed: -acodec copy and -c copy
[10:46:10 CET] <another> -c copy selects streamcopy for all streams
[10:47:52 CET] <ricemuffinball> so if a video has 1 video and 3 audio, it will do copy all 4 ?
[10:48:06 CET] <another> yes
[10:48:17 CET] <ricemuffinball> and -acodec copy will do only 3 audio?
[10:50:24 CET] <ricemuffinball> -sseof value must be negative; aborting what am i doing wrong here
[10:52:51 CET] <another> use a negative value?
[10:53:32 CET] <another> again: you can find a lot of the answers to your questions in the documentation https://ffmpeg.org/ffmpeg-all.html
[10:55:25 CET] <ricemuffinball> didn't work
[10:55:41 CET] <ricemuffinball> ffmpeg -sseof -10 -i "%%~nf.opus" -c copy "%%~nf-cut.opus"
[10:55:46 CET] <ricemuffinball> didn't work
[10:56:05 CET] <ricemuffinball> it only included the last 10 seconds
[10:56:08 CET] <ricemuffinball> instead of cutting
[10:58:38 CET] <ricemuffinball> is this a bug
[11:20:53 CET] <perseiver> Hi, I know how to use ffmpeg and now I want to write my own application that will use ffmpeg. I am following the tutorial in link http://dranger.com/ffmpeg/
[11:21:09 CET] <perseiver> But the code present in it seems to be deprecated.
[11:21:52 CET] <perseiver> I am facing lots of problem to compile code as well as run successfully without "Segmentation fault"
[11:24:45 CET] <perseiver> Is there any best tutorial out there? How current developer using ffmpeg? where they got inspired to write best code using ffmpeg. Please let me know if anyone here to advice me. As you all know "The learning get more enjoyable if the code is compiled successfully and reflecting, though the code may be million of lines"
[11:26:46 CET] <ricemuffinball> perseiver you mean like GUI frontend?
[11:28:06 CET] <DHE> I wrote such an app (non-GUI service). Have you checked where it crashes under a debugger?
[11:28:20 CET] <perseiver> ricemuffinball sometime GUI, but most of the time in background application.
[11:30:45 CET] <JEEB> perseiver: there's examples for different parts in doc/examples
[11:30:57 CET] <JEEB> if you are attempting to utilize the API
[11:31:24 CET] <JEEB> the transcoding one is probably the newest over-all one which contains how to read and write inputs/outputs as well as decode/encode and filter I think?
[11:31:36 CET] <perseiver> yes, I am trying to utilize the power of ffmpeg in my application
[11:31:41 CET] <JEEB> and this is a general guide on how to use the decoding/encoding APIs https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[11:32:14 CET] <JEEB> perseiver: which exact APIs you will require will of course depend on what exactly you're requiring
[11:32:36 CET] <JEEB> as in, do you just repackage read data to another container? that's just libavformat APIs generally
[11:32:46 CET] <JEEB> if you need decoding and/or encoding, libavcodec
[11:33:24 CET] <perseiver> ok JEEB
[11:34:59 CET] <JEEB> also I mostly work within FFmpeg's libraries, but I have written some things with the API, so I know the API is not impenetrable ;) (also I think a week or two ago someone successfully did his first API client nicely)
[11:35:21 CET] <JEEB> not sure which day but you should be able to search with that URL I just posted from the IRC logs
[11:35:39 CET] <JEEB> since it's the page I generally post when people ask about API usage :)
[11:35:54 CET] <JEEB> and then when they actually tell what they're trying to accomplish people go into further specifics
[11:47:08 CET] <perseiver> Ok JEEB, I have tried one example program decode_video.c from url https://www.ffmpeg.org/doxygen/trunk/decode_video_8c-example.html . It got compile successfully, But I am not getting benefit from it. As per document it will decode the video, I am passing .264 video and .avi file, but it just complaining "codec not found". It seems I am making wrong. the code is compiled successfully and I am able to execute it. But, the result is opposite.
[11:47:08 CET] <perseiver> what the code will decode?
[11:50:56 CET] <JEEB> you should check out the transcoding example
[11:51:19 CET] <JEEB> I'm not sure if the decoding example cares about anything else than decoding, and I don't think it uses FFmpeg's APIs to read the data to demux it
[11:51:30 CET] <JEEB> that's why I mentioned it
[11:52:10 CET] <JEEB> also of course make sure that your copy of FFmpeg actually has the codec(s) you require
[11:53:16 CET] <JEEB> but the basic gist is - if you need to read a file and demux the streams from the input -> libavformat , if you need to decode already demuxed packets -> libavcodec
[11:56:29 CET] <JEEB> like, if you are trying to read a random file, you should first open it up with https://ffmpeg.org/doxygen/trunk/group__lavf__decoding.html#ga31d601155e9035d5b0e7efedc894ee49
[11:56:38 CET] <JEEB> which you can find from the transcoding example being utilized
[11:57:13 CET] <JEEB> or the demuxing_decoding.c example as well it seems looking at the "Examples:" list (although I'm not sure if that example uses the newer API)
[12:31:58 CET] <ricemuffinball> this is not working: ffmpeg -sseof -10 -i "%%~nf.opus" -c copy "%%~nf-cut.opus" i am trying to cut last 10 seconds
[16:44:14 CET] <hans_> why isn't ffmpeg doing what i want?
[16:45:29 CET] <hans_> i have a video file containing both audio and video, i want to extract the video and encode it in "pcm_f32le" format (whatever that is, idk), and this command `ffmpeg -i in.mkv -vn -c:a pcm_f32le "out.uni" 2>&1 | pastebinit` gives me this https://paste.fedoraproject.org/paste/CAvTa25zp85S5J1osWWv4Q/raw?password=EebVzSwjy7FcDw-Kqx2n
[16:46:05 CET] <acresearch> people, just a quick question, if i want to fuse two audio files together (both .mp3) such as have one become the start of the other, what command can i use without loosing any quality?
[16:46:07 CET] <JEEB> 32bit float, le
[16:46:14 CET] <JEEB> is what pcm_f32le is
[16:46:32 CET] <JEEB> (le being little endian although I'm not sure how much that matters in floating point)
[16:46:41 CET] <hans_> JEEB, that explains f32le but not pcm :p
[16:46:47 CET] <JEEB> pcm is just raw audio
[16:47:01 CET] <JEEB> pulse code modulation
[16:47:54 CET] <JEEB> hans_: what it says is that the container writing thing doesn't know what container you want
[16:47:59 CET] <hans_> well.. i got a game that understands this file https://paste.fedoraproject.org/paste/kanJrceN8T8x6B0mMOI2Sg/raw?password=ZFzJtl-ZUECZQ_Gc10Ro any idea how to encode other audio files in the same format?
[16:48:04 CET] <JEEB> from the output file extension ".uni"
[16:48:20 CET] <richar_d> ffmpeg uses the extension of the output file to automatically select a container format
[16:48:24 CET] <JEEB> oh, it's tracker stuff
[16:48:36 CET] <JEEB> I don't think you can encode into that
[16:48:49 CET] <kepstin> acresearch: note that in general, concatenating lossy audio without re-encoding will have a discontinuity at the join, sometimes audible. but that said, you should be able to use the concat demuxer in ffmpeg to do it.
[16:49:00 CET] <hans_> oh dang, some audio format that ffmpeg doesn't support? wow
[16:49:09 CET] <kepstin> tracker isn't an audio format
[16:49:23 CET] <kepstin> it's more like midi, it's a set of instructions for how to generate audio
[16:49:26 CET] <hans_> well the game gets it's music from files like that one..
[16:49:45 CET] <JEEB> hans_: basically in input it works since someone made a module to render the tracker audio into raw PCM audio
[16:49:55 CET] <JEEB> which is what you push into your audio output
[16:50:29 CET] <JEEB> but for output you can't just take raw PCM audio samples and expect it to be encode'able into pre-defined set of instruments etc
[16:50:56 CET] <JEEB> in theory it's possible by comparing the sounds from music etc into the set of instruments used by a tracker format
[16:51:04 CET] <hans_> and i can't take mp3 files and convert them to `raw PCM` either, i guess?
[16:51:09 CET] <JEEB> no, that part is OK
[16:51:18 CET] <hans_> well that's what i wanna do, basically
[16:51:19 CET] <JEEB> since mp3 is just encoded raw PCM samples
[16:51:24 CET] <kepstin> i mean, some tracker formats can include pcm samples, so in theory you could just include the entire audio as samples :/
[16:51:33 CET] <acresearch> kepstin: hmmmm so i should not do it with ffmpeg ha? maybe re-add the audio to audacity and re-export?
[16:51:33 CET] <kepstin> but that would be kinda strange and also big
[16:51:40 CET] <JEEB> hans_: but you wanted to make that tracker format?
[16:51:44 CET] <JEEB> not raw PCM
[16:52:03 CET] <kepstin> acresearch: if you have the original audio before encoding to mp3, then you should concatenate the original audio and then encode that.
[16:52:16 CET] <acresearch> kepstin: pl
[16:52:18 CET] <acresearch> ok
[16:53:19 CET] <JEEB> hans_: basically, there's a module that has the set of instruments those "uni" tracker files use and you get raw PCM out of it. you cannot easily reverse that process
[16:54:45 CET] <hans_> is there some easy-ish way to convert mp3 files to those "uni" tracker files?
[16:55:06 CET] <JEEB> not really, I mean you basically are using "notes" or "instructions" in those tracker files
[16:55:18 CET] <JEEB> so your app would have compare random sounds to the most "likely" match
[16:55:27 CET] <hans_> oh i see, thanks for the explanation
[16:55:36 CET] <JEEB> it's kind of like MIDI and this stuff https://www.youtube.com/watch?v=CVq4rSEjgnA
[16:55:37 CET] <kepstin> hans_: that's like saying "is there some easy way to convert mp3 to sheet music for my band to play?"
[16:55:38 CET] <hans_> that sounds like a major task indeed
[16:55:52 CET] Action: JEEB kind of wants some old-school roland stuff
[16:56:00 CET] <hans_> roland?
[16:56:36 CET] <JEEB> MIDI synthetizer
[16:57:10 CET] <JEEB> tracker music is similar, you have a set of pre-defined "notes" on X different tracks
[16:57:27 CET] <JEEB> just that tracker stuff game out of the game development and demo areas
[16:57:39 CET] <JEEB> as opposed to official music things :)
[16:58:25 CET] <hans_> this command seems to do SOMETHING, not sure what: ffmpeg -i in.mp3 -f f32le -acodec pcm_f32le out.raw
[16:58:30 CET] <JEEB> yes
[16:58:33 CET] <JEEB> raw PCM you will get
[16:58:56 CET] <JEEB> since mp3 and aac and a lot of ther "normal" audio formats contain the actual audio samples
[16:59:14 CET] <JEEB> as opposed to just the "notes" and tracks and timings :)
[17:03:48 CET] <kepstin> mp3 is a method for compressing pcm audio to reduce its size. If you decode it, you get pcm audio back
[17:04:04 CET] <kepstin> (although it's a lossy codec, so you won't get quite the same pcm audio back, it'll just be similar)
[18:38:54 CET] <Hello71> if you have the original samples it shouldn't be too hard
[18:39:02 CET] <Hello71> something something fourier something. that's all I got
[18:42:11 CET] <ricemuffinball> this is not working: ffmpeg -sseof -10 -i "%%~nf.opus" -c copy "%%~nf-cut.opus" i am trying to cut last 10 seconds
[18:45:53 CET] <JEEB> ricemuffinball: does ffmpeg.c give a duration for the file you're attempting to handle? unlike -ss or -t, I'd guess -sseof requires the duration info to be somewhere
[18:46:42 CET] <JEEB> I try not to use things that require the duration to be known or require frame-exactness with ffmpeg.c since it doesn't create an index
[18:46:42 CET] <ricemuffinball> ffmpeg.c ?
[18:46:47 CET] <JEEB> the command line application
[18:46:51 CET] <JEEB> as opposed to the libraries/API
[18:47:12 CET] <ricemuffinball> no idea what you are talking about
[18:47:21 CET] <ricemuffinball> i just use ffmpeg.exe
[18:47:33 CET] <JEEB> yes, ffmpeg.c is what compiles into ffmpeg.exe
[18:47:48 CET] <JEEB> thus I call it ffmpeg.c as to separate it from other things that are contained with FFmpeg (the project)
[18:47:56 CET] <ricemuffinball> i just want to cut last 10 seconds of a audio file
[18:48:04 CET] <ricemuffinball> how do i do that
[18:48:33 CET] <JEEB> do you get any warnings from that command
[18:48:40 CET] <ricemuffinball> let me check
[18:49:00 CET] <JEEB> as I noted I don't utilize sseof myself, but it does warn you if there's no duration known, for example
[18:50:01 CET] <ricemuffinball> no, NO error what so ever
[18:50:13 CET] <ricemuffinball> i just created a opus file of last 10 seconds onlky
[18:50:16 CET] <ricemuffinball> IT*
[18:50:36 CET] <JEEB> right, which is what sseof means. it seeks to the last 10 seconds
[18:50:48 CET] <ricemuffinball> i want to cut last 10 seconds
[18:50:50 CET] <JEEB> as in, seeks to X seconds before the duration
[18:50:57 CET] <JEEB> ok, usually you'd use -t
[18:51:00 CET] <JEEB> for that
[18:51:12 CET] <JEEB> if you don't know the duration then you'd need something like teof
[18:51:21 CET] <ricemuffinball> ffmpeg -sseof -10 -i "%%~nf.opus" -c copy "%%~nf-cut.opus" where do i put the -t ?
[18:51:30 CET] <JEEB> you remove the -sseof first of all
[18:51:45 CET] <JEEB> you don't want to start from 10 seconds before end after all
[18:52:04 CET] <JEEB> -t is generally an encoding option, and thus you put it after the input file, and before the output file name
[18:52:14 CET] <JEEB> you put the duration there that you want
[18:52:23 CET] <JEEB> and it will stop after that duration
[18:52:36 CET] <JEEB> unfortunately there's no teof as far as I can see
[18:52:47 CET] <JEEB> so you cannot say -teof -10
[18:53:22 CET] <ricemuffinball> so how do i accomlish what i want to do
[18:53:39 CET] <JEEB> you take the full duration, minus ten seconds and put that into -t
[18:53:43 CET] <JEEB> currently that is the way you would do it
[18:53:53 CET] <ricemuffinball> so how do i do that
[18:54:25 CET] <JEEB> well, for example if you want the first 90 seconds you do -t 90 or so?
[18:54:36 CET] <JEEB> it does take in some sort of timestamps as well if you want that
[18:55:48 CET] <ricemuffinball> i wanted to cut first 20 seconds of audio file and you do -ss 20 , and that worked great
[18:56:08 CET] <JEEB> yes, that seeks to point 20s
[18:56:11 CET] <JEEB> and starts from there
[18:56:19 CET] <ricemuffinball> now i just want to do cut last 10 seconds
[18:56:55 CET] <JEEB> I cannot see an option for that as-is
[18:57:04 CET] <JEEB> you can only say the maximum duration
[18:57:08 CET] <JEEB> which is -t
[18:57:29 CET] <JEEB> you will have to first run ffprobe on the file and check if it comes out with a duration
[18:57:37 CET] <JEEB> then you use that minus your ten seconds as the duration
[18:57:42 CET] <Ariyasu> you can script a solution using mediainfo cli to dump source duration into a vairable, then use -ss and t
[18:57:49 CET] <Ariyasu> to start 10s before the end and run for 10s
[18:58:02 CET] <JEEB> that's not what he wants
[18:58:16 CET] <JEEB> he already seemed to try and use sseof which seeks to end-X seconds
[18:58:27 CET] <JEEB> and he wanted specifically everything but the last 10 seconds
[18:58:34 CET] <JEEB> thus -t duration-10
[18:58:35 CET] <Ariyasu> ahh my bad
[18:58:48 CET] <Ariyasu> yeah
[18:59:26 CET] <ricemuffinball> i can't believe nobody has complained before about this
[18:59:45 CET] <ricemuffinball> it's a very common thing to do
[19:00:21 CET] <JEEB> yes, also it's a very common thing that can go wrong with ffmpeg.c, unfortunately. which is why people don't implement that by default. mostly because tehre's a lot of file formats that require indexing to get that stuff exact.
[19:00:27 CET] <JEEB> in your case of course it would probably work
[19:00:32 CET] <JEEB> as it seems to work with -sseof as well :P
[19:00:47 CET] <JEEB> you can feel free an open a feature request on trac if you want
[19:00:57 CET] <ricemuffinball> jeeb are you ffmpeg dev ?
[19:00:59 CET] <JEEB> yes
[19:01:09 CET] <ricemuffinball> i see
[19:01:21 CET] <ricemuffinball> and nobody has ever requested this before on trac ?
[19:01:37 CET] <JEEB> no idea. possibly someone has, but nobody has been interested in hacking it up so far
[19:02:14 CET] <ricemuffinball> jeeb so you think making ffmpeg to do this is really hard?
[19:02:22 CET] <JEEB> making it always work is hard
[19:02:31 CET] <JEEB> making it work for your use case, probably not that hard
[19:02:54 CET] <ricemuffinball> why do you say it's not hard for "my case"
[19:03:09 CET] <ricemuffinball> because it's audio only?
[19:03:10 CET] <JEEB> because most likely you have some sort of signaled duration in the file, and seeking seems to work relatively well
[19:03:34 CET] <JEEB> there are many file formats that are meant for A->B reading only
[19:03:41 CET] <JEEB> and where duration is not something that matters
[19:04:05 CET] <JEEB> at that point FFmpeg's libraries will attempt to guess things, or just not provide duration info
[19:04:08 CET] <ricemuffinball> huh, not sure what you are trying to say
[19:04:22 CET] <ricemuffinball> every media file has duration. what are you talking about
[19:04:34 CET] <JEEB> every media file has a duration after you have read through it at least once
[19:04:37 CET] <JEEB> fully
[19:04:50 CET] <JEEB> there are formats which do not tell you outwards that there's a duration
[19:04:58 CET] <JEEB> or how to seek to a specific point
[19:05:18 CET] <JEEB> in your case, or with mp4 (at least non-fragmented mp4) or properly indexed mkv
[19:05:27 CET] <ricemuffinball> jeeb you mean like corrupted video/audio file?
[19:05:28 CET] <JEEB> you have an index and a duration field or duration can be calculated easily
[19:05:31 CET] <JEEB> no, not corrupted
[19:05:48 CET] <JEEB> let's take that you save some stuff from the digital TV for example
[19:05:59 CET] <JEEB> that format is 100% made for A->B consumption
[19:06:10 CET] <JEEB> so it plays nicely and all that jazz
[19:06:18 CET] <JEEB> but nowhere does it say how long something is
[19:07:06 CET] <JEEB> or if the stream is of not constant bit rate, seeking will not be exact as it is guesstimated by the guesstimated duration and the bit rate
[19:07:28 CET] <JEEB> that said basic ss also would have issues with this
[19:08:16 CET] <JEEB> anyways, I'm not against an option like sseof for duration
[19:08:47 CET] <JEEB> it just might get hard to explain to people why it gets the duration wrong I bet ^^;
[19:08:56 CET] <JEEB> (with some sorts of inputs)
[19:10:04 CET] <JEEB> ricemuffinball: anyways, feel free to make a feature request on trac. if it gets to be a duplicate then someone will mark it as such, and that's all (if you have the time you can of course search trac.ffmpeg.org for similar duration-related tickets if one exists)
[19:23:07 CET] <ricemuffinball> opus clearly not the best: http://bernholdtech.blogspot.com/2013/03/Nine-different-audio-encoders-100-pass-recompression-test.html
[19:28:40 CET] <JEEB> ricemuffinball: I would care much more about 1st gen losses than Nth gen losses. although you can read in the comments regarding why opus took it badly (because the tools that handled it weren't removing the encoder delay and thus the content was always with a different alignment)
[19:28:56 CET] <JEEB> which is funny because I thought the opus command line decoder took away the encoder delay
[19:29:19 CET] <JEEB> also I find it funny that only nero (which hasn't been updated in quite a while) and QT AAC encoders were tested
[19:29:28 CET] <JEEB> f.ex. fraunhofer's open source thing was left out
[19:29:34 CET] <JEEB> or FFmpeg's
[19:29:49 CET] <ricemuffinball> jeeb i guess, but NeroAAC is very impressive on that test
[19:30:32 CET] <durandal_1707> should I kick this nick?
[19:31:07 CET] <JEEB> it also depends on how the encoder handles things. very "simple", or "mechanic" things can lead to re-coding of stuff to be the same
[19:33:20 CET] <JEEB> although as noted, even if it is good at so many passes, it doesn't mean it's as good with a single pass encoding
[19:33:24 CET] <JEEB> which is what you generally handle
[19:34:02 CET] <match_it> hello, I'm trying to upload (feed) a video from my computer to my vps server through h264 format but I still receive conversion fail
[19:34:30 CET] <match_it> the source is an mp4 file from youtube
[19:42:01 CET] <match_it> here is the output
[19:42:03 CET] <match_it> https://ibin.co/4YpY9QM2BUam.png
[19:43:11 CET] <JEEB> will your other side take in stuff at more than real-time?
[19:43:26 CET] <JEEB> because it seems like the connection got reset by the other side
[19:44:16 CET] <JEEB> also do you want to copy, or do you want to re-encode?
[19:44:38 CET] <JEEB> because you are not setting a video encoder, and the default is to pick a default for a format and re-encode :P
[19:48:21 CET] <JEEB> -re before your input path will sleep() accordingly to make it seem like realtime, and -c copy after input path will copy the stream from the mp4 file
[22:33:29 CET] <illuminated> in a video file in the stream identifiers you have 0:1 0:2 etc.. if you have a video file, is it possible to have a 1:0 or something? The way I see it used is when you're combining streams from multiple sources. Like 0:1 is the second stream of the first source file and 1:0 is the first stream of the 2nd source file..
[22:57:21 CET] <BtbN> The first number refers to the input number
[22:57:31 CET] <BtbN> so if you have only one -i, there will only ever be 0
[23:42:01 CET] <ricemuffinball> i have this video that starts the video with 960x540 then changes to 1280x720 after 20 minutes. how is this possible?
[23:44:33 CET] <BtbN> TV channels do that a lot, where ads are different res and they don't bother to re-encode the low res ones, so they just switch resolution
[23:45:33 CET] <ricemuffinball> but this is mp4 file
[23:46:27 CET] <BtbN> I'm not sure if mp4 supports multiple streams like that
[23:46:33 CET] <BtbN> You usually see it in mpeg-ts
[23:47:31 CET] <ricemuffinball> https://pastebin.com/cDbVmkrN
[23:47:43 CET] <ricemuffinball> but it changes to 720 after 20 min
[23:48:43 CET] <ricemuffinball> so i am trying to do this: ffmpeg -ss -00:20:50 -i D:\1.mp4 -c copy R:\2.mkv: why won't this work
[23:49:08 CET] <JEEB> because you're using ss and not sseof?
[23:49:19 CET] <JEEB> normal ss with a negative value makes zarro sense
[23:49:20 CET] <BtbN> mp4 has only one set of extradata per stream. I highly doubt it can res change
[23:49:28 CET] <JEEB> BtbN: it can just fine :)
[23:49:32 CET] <BtbN> how?
[23:49:50 CET] <ricemuffinball> jeeb you are right, i have to remove the negative
[23:50:06 CET] <JEEB> 1) it supports multiple initialization data segments (and those can be separately noted in the samples) and 2) you can just put the parameter sets in-band
[23:50:13 CET] <JEEB> so you can either do it in-band or out-of-band
[23:51:49 CET] <ricemuffinball> after doing -ss 00:20:00 and ffprobing the file: i get this: https://pastebin.com/jsBGZPqL
[23:52:09 CET] <BtbN> If you want to normalize resolution, you'll have to re-encode at least the parts that are wrong
[23:52:18 CET] <JEEB> "wrong"
[23:52:22 CET] <JEEB> but yes
[23:52:31 CET] <JEEB> if it changes resolution then not too sure what you're going to do with that
[23:54:14 CET] <JEEB> in some cases mediainfo doesn't really give you an insight unless you exactly know what it interprets as something :P
[23:54:27 CET] <linext> anything i could be doing better with the video recording script? https://i.imgur.com/mSkI7Ub.png
[23:55:56 CET] <ricemuffinball> Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
[23:57:02 CET] <illuminated> BtbN: thanks for the clarification m8.
[00:00:00 CET] --- Sun Mar 3 2019
More information about the Ffmpeg-devel-irc
mailing list