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

burek burek at teamnet.rs
Sat Oct 19 03:05:03 EEST 2019


[00:52:22 CEST] <DanielTheFox> hi there, I was wondering if it's a good/common practice to convert original video to an easy-to-decode codec (say, raw or ffvhuff) if it's known to be re-converted many times right after
[00:55:18 CEST] <DanielTheFox> I'm testing (and throwing many stones at the same time) an old feature phone which has video playback feature, and checking its limits regarding codecs, resolution and framerate
[00:55:24 CEST] <DanielTheFox> so I convert the same sample video many times
[01:10:46 CEST] <furq> it probably won't save enough time to bother, especially if it's a codec you can hwdec
[01:11:29 CEST] <furq> it'll be a tiny fraction of the encode time anyway
[01:11:48 CEST] <furq> unless you're encoding 4k to 360p or something
[02:36:20 CEST] <analogical> what do I type if I want to convert a wav file to aac with the higest available bitrate?
[02:45:34 CEST] <furq> max bitrate depends on the sample rate and channel count
[02:45:42 CEST] <furq> there is really no reason to go above 192k for stereo though
[02:45:55 CEST] <furq> or -vbr 5 with fdk
[02:52:11 CEST] <analogical> furq, I have a file called audio.wav and I want to convert it to audio.m4a with the highest possible quality. Is there a setting for that?
[03:19:20 CEST] <Hello71> -c:a flac
[03:28:42 CEST] <ncouloute> Trying to get the total time of a concat using -f concat but the duration is set to N/A. Anyway to get the duration to work. I'm thinking im going to need to call ffmpeg on each file and then add up the duration =/
[07:21:18 CEST] <pk08> hi guys,
[07:21:48 CEST] <pk08> i there any way to set audio sample format to some fix value
[07:22:14 CEST] <pk08> in filer_complex
[07:23:04 CEST] <pk08> im trying to play video using mpv with filter and i am getting error: "format change on aid1"
[07:23:12 CEST] <pk08> and then mpv stops
[07:23:29 CEST] <pk08> mpv command: https://pastebin.com/XBkuM33s
[07:24:17 CEST] <pk08> and if i try to make same command for ffmpeg and try then ffmpeg crashes and give segmentation  fault
[07:25:28 CEST] <pk08> ffmpeg command: https://pastebin.com/iLqxqfyV
[07:25:50 CEST] <pk08> i tried to add "aresample=48000" in filter chain but it didnt help...
[09:34:52 CEST] <MoziM> what is "il" in this command supposed to refer to? i can't find it anywhere in the ffmpeg documents, is it shorthand for input link? -> ffmpeg -i top.avi -i bottom.avi -filter_complex vstack,il=l=i:c=i -c:v ffv1 il.avi
[09:35:41 CEST] <MoziM> https://video.stackexchange.com/questions/27524/combining-two-video-fields-into-one-to-create-an-interlaced-video
[09:52:44 CEST] <furq> MoziM: https://ffmpeg.org/ffmpeg-filters.html#il
[09:57:06 CEST] <furq> you could also do interleave,weave or interleave,interlace
[09:57:29 CEST] <furq> no opinion on which gives better output but it seems weird to use vstack there
[10:24:03 CEST] <MoziM> furq: ahh thanks, didn't see it
[10:24:12 CEST] <MoziM> C-f just shows "il" everywhere -_-
[12:52:05 CEST] <MoziM> if i have an audio file that's 1 minute long and a file that's 59 seconds long, how can i add 1 second worth of black frames at the beginning of the video?
[13:39:36 CEST] <streamer2> Hello
[13:40:00 CEST] <streamer2> Is it possible to limit the output bitrate range with -maxrate? https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate
[13:40:19 CEST] <streamer2> For example I would like the output bitrate to be limited between the range of 2000 kbps - 4000 kbps
[13:40:50 CEST] <streamer2> and for the bitrate to adhere to -minrate and -maxrate and not exceed maxrate
[13:41:10 CEST] <BtbN> On most encoder, there really isn't a minrate
[13:41:34 CEST] <BtbN> if the pictures are trivial, they will happily produce tiny output
[13:41:58 CEST] <streamer2> Thank you for the reply. I mean for instance a HLS stream
[13:42:21 CEST] <BtbN> CBR mode just fill in null-data to reach the target bitrate
[13:43:13 CEST] <streamer2> BtbN: -b:v 2M -maxrate 2M -bufsize 1M
[13:43:34 CEST] <BtbN> Is this libx264?
[13:43:37 CEST] <JEEB> the result of that depends on the encoder
[13:43:57 CEST] <streamer2> BtbN: Yes libx264 and aac audio
[13:44:18 CEST] <JEEB> that should then be pretty close to what you defined :P
[13:44:19 CEST] <BtbN> If you need strict CBR, you will have to tell it
[13:44:27 CEST] <BtbN> "soft cbr" with a minrate is not a thing
[13:44:37 CEST] <JEEB> also > HLS > strict CBR , but it's not my encode :D
[13:44:44 CEST] <streamer2> BtbN: Thanks. Could you suggest me parameters to include?
[13:44:53 CEST] <BtbN> look at the h264 encoding wiki for cbr
[13:47:05 CEST] <streamer2> BtbN: thanks, just to confirm would something like this work? -crf 22 -b:v 2M -maxrate 2M -bufsize 1M
[13:47:13 CEST] <BtbN> no
[13:47:22 CEST] <BtbN> that's mixing crf and vbr, and makes no sense
[13:47:53 CEST] <JEEB> only libvpx for some reason wants both values, but do remember that whatever CRF maps to with libvpx is different to x264's CRF
[13:48:11 CEST] <BtbN> crf is also the precise opposite of what you want for a CBR HLS list
[13:48:12 CEST] <BtbN> https://trac.ffmpeg.org/wiki/Encode/H.264#AdditionalInformationTips
[13:48:34 CEST] <BtbN> one should remove the -minrate from that, since libx264 does not read that parameter at all
[13:50:05 CEST] <streamer2> BtbN: Ok thanks, that is very helpful. So really there isn't an effective way to adjust the range of the average bitrate?
[13:50:45 CEST] <BtbN> You can set a maximum, and set a target bitrate
[13:50:57 CEST] <BtbN> But if the video is solid black, it will drop down to almost nothing
[13:53:04 CEST] <streamer2> BtbN: cool thanks
[13:54:09 CEST] <streamer2> BtbN: target bitrate is definec as -v:c ? Or is that THE bitrate, just so I understand correctly
[13:54:13 CEST] <streamer2> *defined
[13:54:18 CEST] <BtbN> b:v
[13:54:53 CEST] <streamer2> BtbN: cool thanks
[13:55:15 CEST] <BtbN> but it doesn't mean much for libx264 in vbv mode
[13:57:45 CEST] <streamer2> BtbN: so it's possible to adjust the average bitrate range for libx264 in vbv mode? Or not at all?
[13:58:06 CEST] <streamer2> BtbN: I'm just trying to figure out the best way about doing this
[13:58:18 CEST] <BtbN> vbv buffer based encoding is complicated
[13:58:25 CEST] <BtbN> It has a constant buffer of available bits
[13:58:36 CEST] <BtbN> and it keeps refilling it at the given bitrate, until it reaches the bufsize
[13:58:42 CEST] <BtbN> encoding a frame takes bits from it
[13:59:19 CEST] <BtbN> maxrate governs how fast it refills, bufsize, well, the size of the buffer
[14:01:09 CEST] <streamer2> BtbN: interesting
[14:03:04 CEST] <streamer2> BtbN: so if I am to set the target bitrate to 4000 Kbps and the maxrate to 4000 kbps, it will try to aim for this bitrate at the best effort?
[14:03:20 CEST] <BtbN> no, it never does that
[14:03:42 CEST] <BtbN> it will never exceed the bitrate, over a timeframe given by maxrate and bufsize
[14:04:01 CEST] <DHE> sorta.. after a period of non-motion the buffer fills and when motion begins again the codec is allowed to take not just 4 megabit of video but also chug the buffer as it needs it.
[14:05:13 CEST] <streamer2> DHE: ah ok, that explains it. So based on the fact that it needs to chug the buffer it won't be able to ever specifically stick to the target bitrate at all times?
[14:07:12 CEST] <DHE> the smaller the buffer, the closer to a true maximum bitrate you get. but if you have a 4 megabit maxrate and 4 megabit buffer, the codec could run at 8 megabits for 1 second if it wants, albeit with a drained buffer
[14:07:28 CEST] <BtbN> How would you even define "strict all all times"
[14:07:39 CEST] <BtbN> it's always strict to it, over a specific timeframe of observation
[16:16:32 CEST] <HickHoward> right
[16:18:06 CEST] <HickHoward> so, does ffmpeg support both .BUP and .IFO files
[16:18:07 CEST] <HickHoward> ?
[16:18:24 CEST] <HickHoward> i say this 'cuz i found one that is based directly upon ffmpeg's code that can handle those files quite well
[18:32:02 CEST] <kepstin> HickHoward: ffmpeg has limited or no support for natively reading dvd files, you need to use other tools to read dvd structure.
[18:33:13 CEST] <kepstin> once you've used other tools to extract the part of the video you want to a concatenated vob, ffmpeg can read that directly.
[18:33:42 CEST] <kepstin> (of course there are tools around that can read dvd files directly and then use ffmpeg libraries to encode)
[19:06:36 CEST] <analogical> When I type ffmpeg -i input.wav output.m4a the resulting file is aac 128 kbps which seems to be the defrault bitrate for aac. What do I type to create an aac file with the maximum bitrate available?
[19:31:12 CEST] <analogical> please anyone?
[19:41:56 CEST] <taliho> analogical: https://ffmpeg.org/ffmpeg-all.html#aac
[20:08:57 CEST] <relaxed> analogical: ffmpeg -i input.wav -q:a 0 output.m4a
[20:17:43 CEST] <b5509cd> Hi, `raspivid` can deliver a stream of h264 to stdout, I am wondering if `ffmpeg` can simply "box" this stream as mp4 (and also if it will be efficient enough on a Pi Zero, but I can test that for myself if I can just know what invocation of `ffmpeg` to use)
[20:17:57 CEST] <b5509cd> ... I'd like to continue outputting to stdout to another pipe from `ffmpeg` btw
[20:18:29 CEST] <b5509cd> (I'm ultimately trying to go like `raspivid` -> `ffmpeg` -> `websocat` -> browser video element with MSE)
[20:24:49 CEST] <relaxed> should be possible
[20:26:58 CEST] <b5509cd> `... | ffmpeg -f h264 -i - -f mp4 - | ...` this is currently giving me `muxer does not support non seekable output`
[20:28:57 CEST] <relaxed> what other format does websocat support?
[20:29:20 CEST] <relaxed> try mkv
[20:30:10 CEST] <b5509cd> relaxed websocat is just like netcat or cat... it's just piping its input to output (but wrapped in websocket/http/whatever, in order to be consumed by a client websocket a la the browser)
[20:30:45 CEST] <relaxed> oh, then try flv
[20:30:48 CEST] <b5509cd> need not worry about what raspivid and websocat are doing I don't think, I did already test that just removing the ffmpeg part of the pipeline and then just piping to `mplayer` works alright, since mplayer can play raw h264 streams
[20:31:40 CEST] <b5509cd> I just need ffmpeg to encapsulate the h264 stream with those mp4 headers, to "mux" I guess
[20:31:45 CEST] <b5509cd> and then pass to stdout
[20:32:02 CEST] <relaxed> mp4 is not a live streamable format
[20:32:19 CEST] <b5509cd> damn, I read conflicting info about that
[20:32:38 CEST] <analogical>  When I type ffmpeg -i input.wav output.m4a the resulting file is aac 128 kbps which seems to be the default bitrate for aac. What do I type to create an aac file with the maximum bitrate available?
[20:32:44 CEST] <b5509cd> I guess it is true but you can hack around it by pushing segments around?
[20:33:27 CEST] <relaxed> analogical: ffmpeg -i input.wav -q:a 0 output.m4a
[20:34:03 CEST] <furq> analogical: like i said, the max bitrate depends on the sample rate and channel count
[20:34:20 CEST] <furq> at least according to the codec specs, idk if the builtin encoder goes that high
[20:34:31 CEST] <analogical> relaxed, that creates an outputfile with a bitrate that's even worse than the default setting :/
[20:34:54 CEST] <furq> and yeah last i heard vbr mode didn't work well with the builtin encoder
[20:35:11 CEST] <furq> use -b:a 192k or something
[20:35:17 CEST] <analogical> furq, the intput.wav is audio cd quality
[20:35:44 CEST] <furq> well then the max bitrate is 528k
[20:35:55 CEST] <furq> and also you should not use it
[20:36:52 CEST] <b5509cd> relaxed this works:
[20:36:53 CEST] <b5509cd> raspivid -t 0 -w 1280 -h 720 -hf -ih -vf -fps 20 -o - | ffmpeg -i - -vcodec copy -f mp4 -movflags frag_keyframe+empty_moov pipe:1 | websocat --binary --exit-on-eof --buffer-size 1024 ws-upgrade:tcp-listen:0.0.0.0:1234 reuse-raw:stdio:
[20:36:54 CEST] <analogical> when encoding mp3 there's often a max setting that creates a 320 kbps file
[20:37:04 CEST] <kepstin> at 528k aac you'd be better off using flac :)
[20:37:10 CEST] <furq> well yeah it's -b 320
[20:37:12 CEST] <kepstin> (or alac)
[20:37:18 CEST] <furq> with lame, and idk why you'd use any other encoder
[20:37:38 CEST] <furq> 320k is already a waste of space with mp3, and aac is the best part of a decade newer
[20:37:41 CEST] <kepstin> i think lame with -q:a 0 is also 320kbit cbr? or something close.
[20:37:51 CEST] <furq> it isn't
[20:37:56 CEST] <furq> -V0 is true vbr
[20:38:03 CEST] <analogical> why is this so difficult why isn't it possible to tell ffmpeg to create a fight with highest possible quality?
[20:38:17 CEST] <analogical> a fight > a file
[20:38:18 CEST] <relaxed> analogical: just use -b:a 320k
[20:38:23 CEST] <furq> i just said, it's -b:a 528k
[20:38:34 CEST] <furq> i also said that it's a big waste of space and you should just use 192k
[20:39:14 CEST] <analogical> sigh!
[20:39:17 CEST] <pink_mist> and if you used flac you'd get the highest possible quality regardless of what option you specified
[20:39:27 CEST] <furq> i'm guessing this is for a device that doesn't play flac
[20:39:32 CEST] <analogical> right
[20:39:39 CEST] <furq> if you can imagine such a thing in this day and age
[20:39:49 CEST] <furq> cough cough cough apple
[20:39:51 CEST] <pink_mist> I have a very hard time imagining that
[20:40:41 CEST] <relaxed> alac, it's like flac but fruity
[20:40:42 CEST] <analogical> ffmpeg is probably the least user friendly software I've ever used
[20:41:07 CEST] <furq> i don't see how -b:a 320k is less user friendly than -b 320
[20:41:37 CEST] <analogical> is there a gui available for ffmpeg?
[20:41:50 CEST] <pink_mist> good idea analogical, when there's volounteers here helping you, just complain about the software they're helping you with, that'll get everyone to be happy to help you more
[20:42:18 CEST] <analogical> I'm sorry but this is so frustrating
[20:42:38 CEST] <pink_mist> why? you've been told exactly what you need to do
[20:42:49 CEST] <pink_mist> you've been shown where in the manual you can read more about it
[20:42:57 CEST] <pink_mist> yet you're complaining about something
[20:43:13 CEST] <furq> what part of this is unclear
[20:43:36 CEST] <analogical> I've read the manual and it doesn't answer my question and the examples you gave me doesn't do what I want I'm sorry to say
[20:43:56 CEST] <furq> -b:a 528k will give you an aac file of the highest possible quality that the builtin encoder can create
[20:44:00 CEST] <pink_mist> -b:a 528k does exactly what you've told us you want
[20:44:08 CEST] <pink_mist> if you've lied to us, you should stop lieing
[20:45:04 CEST] <relaxed> analogical: https://trac.ffmpeg.org/wiki/Encode/AAC  read the "Native FFmpeg AAC Encoder" section
[20:46:45 CEST] <analogical> furq, where did you the information about the max 528k bitrate
[20:46:59 CEST] <furq> from the aac codec specs
[20:47:09 CEST] <furq> whether the builtin encoder will ever use that much bitrate i have no idea
[20:47:32 CEST] <analogical> so that bitrate doesn't necessarily work with ffmpeg?
[20:47:40 CEST] <furq> define work
[20:47:54 CEST] <furq> it'll give you the best quality aac file it can
[20:48:00 CEST] <relaxed> analogical: what are you trying to play this back on?
[20:48:20 CEST] <furq> it isn't relevant if it isn't 528k unless you can actually abx it from the flac
[20:49:01 CEST] <analogical> do you also happen to know the highest quality setting for ac3 ?
[20:49:53 CEST] <furq> i don't but ac3 is even older than mp3
[20:49:59 CEST] <relaxed> analogical: alac is lossless and supported on apple devices.
[20:50:26 CEST] <furq> and there's no oss ac3 encoder that's as good as lame
[20:50:31 CEST] <furq> unless you're encoding multichannel content
[20:51:03 CEST] <analogical> the devie I want to use only supports aac and ac3
[20:51:07 CEST] <analogical> *device
[20:51:18 CEST] <pink_mist> what device is that?
[20:51:28 CEST] <analogical> and old televison
[22:30:41 CEST] <SpeakerToMeat_> The way to specify an input's fps is -r before -i right? I mean interpet it as x fps not, recode from its fps to x
[22:31:00 CEST] <furq> yes but it doesn't work for all formats
[22:31:18 CEST] <furq> strictly it should be -framerate as an input option but iirc -r is usually mapped to that
[22:31:23 CEST] <SpeakerToMeat_> Sigh
[22:31:42 CEST] <SpeakerToMeat_> Failing for an mxf
[22:32:15 CEST] <SpeakerToMeat_> I have a 23.976 mxf (with jpeg 2000 in it), the input reads this: "Stream #1:0: Video: jpeg2000 (JPEG 2000 digital cinema 2K), xyz12le(progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 tbr, 23.98 tbn, 23.98 tbc"
[22:32:53 CEST] <SpeakerToMeat_> But the h264 output for some reason says "Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 0.04 fps, 11988 tbn, 23.98 tbc"
[22:33:16 CEST] <SpeakerToMeat_> 0.04....?
[22:33:55 CEST] <durandal_1707> crucial info missing, output container
[22:34:19 CEST] <SpeakerToMeat_> quicktime
[22:34:37 CEST] <SpeakerToMeat_> libx264 for video, aac for audio, yuv420p pixfmt
[22:34:57 CEST] <SpeakerToMeat_> Sorry wrong. mp4 container for output
[22:34:58 CEST] <SpeakerToMeat_> not mov
[22:35:37 CEST] <durandal_1707> something about timebases
[22:35:44 CEST] <furq> if the input fps is being detected correctly then forcing it won't do anything
[22:35:49 CEST] <furq> something else is broken there
[22:35:54 CEST] <SpeakerToMeat_> furq: Correct
[22:36:27 CEST] <durandal_1707> use (a)settb filters
[22:41:27 CEST] <SpeakerToMeat_> The interesting thing, the end file plays right liek this :/
[23:53:28 CEST] <ChocolateArmpits> I got that too, produces valid files so who cares
[00:00:00 CEST] --- Sat Oct 19 2019


More information about the Ffmpeg-devel-irc mailing list