[Ffmpeg-devel-irc] ffmpeg.log.20171209
burek
burek021 at gmail.com
Sun Dec 10 03:05:01 EET 2017
[00:13:56 CET] <orbisvicis> I'm trying to remove a xing header from a cbr mp3 with reencoding, can ffmpeg help with this?
[00:15:04 CET] <orbisvicis> the obvious doesn't work: ffmpeg -i IN.mp3 -c copy OUT-unxing.mp3
[00:16:51 CET] <BtbN> why do you want to remove it? It serves a somewhat vital purpose.
[00:17:23 CET] <orbisvicis> well, it prevents mp3splt from working in bit reservoir mode. But what purpose does it serve on cbr files ?
[00:17:42 CET] <BtbN> pure information
[00:18:30 CET] <orbisvicis> i think mp3splt assumes it is a vbr file and bails
[00:19:48 CET] <orbisvicis> BtbN: xing provides frame/bytes/toc/quality. None of that is necessary for a cbr file
[00:22:48 CET] <orbisvicis> anyway, I would like to remove it
[00:30:01 CET] <BtbN> so turn it off if you really want to
[00:32:00 CET] <BtbN> According to the option, it contains the duration.
[00:37:55 CET] <orbisvicis> what option ?
[00:38:07 CET] <orbisvicis> (turn it off how)
[00:39:38 CET] <orbisvicis> anyway duration in cbr depends only on file size
[00:53:47 CET] <orbisvicis> fwitw, this file was created by lavc56.60
[01:00:29 CET] <orbisvicis> well, problem solved with tail -c +...
[03:03:31 CET] <Rajko> hello i need to get the picture num of a h264 frame output in an AVFrame, the respective fields are always 0
[03:04:07 CET] <Rajko> int coded_picture_number and int display_picture_number
[03:20:53 CET] <RoyK> hi all. I want to setup a few machines for streaming video to central storage, think of it as cctv storage, somehow. It's a private experiment, filming birds. I'm using some orange pi zero things, which have pretty good performance cpu-wise, but I'm lost to how I can configure the streaming. The howtos on the net are a mix of a brazillion of ffmpeg versions, pretty incompatible. I'm on ffmpeg 3.2.5 now, so
[03:20:59 CET] <RoyK> if someone has something that works with that version, it'd be nice
[03:26:39 CET] <DHE> for continuous recording? a few options. an output format that splits into multiple chunks like segment or hls helps make things manageable... or stream over the network and have some app on the storage machine collect them?
[03:34:53 CET] <RoyK> DHE: not sure yet, but I was wondering about the syntax first. Haven't used ffmpeg for this in quite a few years. The cameras do 720p, so I guess it should do with a few terabytes of storage
[03:36:07 CET] <RoyK> DHE: btw, looking at things like motion or zoneminder, those look good, and I use motion today, but there's no audio option with that. Any idea how to solve that easily?
[03:37:38 CET] <DHE> that's not my area of expertise unfortunately. I deal with non-stop recording...
[03:38:15 CET] <RoyK> ok - no problem
[03:39:02 CET] <RoyK> but would you suggest a simple "just grab the shit and dump it somewhere" for a simple 720p camera? Or something for streaming it further to a central server?
[03:40:08 CET] <DHE> depends on the camera. is it something that integrates directly into the Pis?
[03:40:27 CET] <DHE> I mostly use webcams so I can just have one machine pull from them and store locally
[03:40:53 CET] <RoyK> just a cheap USB camera
[03:41:13 CET] <RoyK> storing it locally should work
[03:41:27 CET] <RoyK> over nfs or something
[03:46:20 CET] <Rajko> actually coded_picture_number is A-OK ! but display_picture_number is always 0
[03:49:47 CET] <RoyK> DHE: IIRC you were hanging in here 15 years ago ;)
[03:51:30 CET] <DHE> here? ffmpeg, no
[03:51:42 CET] <RoyK> ok
[03:52:38 CET] <RoyK> anyway - is there a quick way without a ton of magick options to just rip off things off a webcam and either dump it as it is or transcode it to h.264?
[03:53:44 CET] <DHE> RoyK: ffmpeg [input-options] -i inputdev -c copy -f segment -segment_time 60 -segment_list_type flat -segment_list /nfsshare/camera1.txt /nfsshare/camera1-%04d.mp4
[03:54:14 CET] <DHE> this is a very rough starting point. splits files into 60 second increments. try it, see how it works for you, and tweak
[03:57:54 CET] <RoyK> DHE: hm - http://paste.debian.net/999909/
[03:59:21 CET] <DHE> aww... camera doesn't output encoded data. you'll have to use "-c libx264 -crf 20" or such. or something better that the pi supports
[03:59:45 CET] <RoyK> for input?
[04:01:13 CET] <DHE> some hardware outputs h264 directly or such. was hoping so. means less work for you.
[04:01:49 CET] <RoyK> yeah, can see that
[04:02:24 CET] <RoyK> perhaps time to get a better cam :þ
[04:03:38 CET] <furq> RoyK: what does v4l2-ctl --listofmrats say
[04:03:41 CET] <RoyK> it's just an experiment - I love corvidae, and I want to just film them doing experiments, trying to solve things to find their food
[04:03:42 CET] <furq> er
[04:03:44 CET] <furq> --list-formats
[04:04:40 CET] <DHE> also note that your camera isn't producing audio...
[04:05:26 CET] <furq> doh
[04:05:28 CET] <furq> --list-formats-ext
[04:05:37 CET] <RoyK> DHE: pretty sure why this thing was cheap http://paste.debian.net/999910/
[04:05:51 CET] <furq> yeah sorry it's --list-formats-ext to list them all
[04:06:10 CET] <RoyK> http://paste.debian.net/999911/
[04:06:12 CET] <furq> with that said if the camera only does 480p then raw yuv is fine
[04:06:21 CET] <DHE> so that's a no then. transcode required... unless you want to dump some crazy high bitrate
[04:06:26 CET] <furq> it looks like that ffmpeg build has omx
[04:06:32 CET] <furq> so you can use the pi's builtin encoder
[04:06:45 CET] <furq> use -c:v h264_omx and be prepared to throw a ton of bitrate at it because omx isn't very good
[04:07:28 CET] <furq> oh
[04:07:29 CET] <furq> orange pi?
[04:07:51 CET] <furq> i guess you're stuck with x264 then
[04:08:11 CET] <RoyK> ffmpeg -i /dev/video0 -c:v h264_omx -crf 20 -f segment -segment_time 60 -segment_list_type flat -segment_list camera1.txt camera1-%04d.mp4 # ?
[04:08:32 CET] <furq> no omx is a raspberry pi thing
[04:08:38 CET] <furq> the orange pi has a hardware encoder but it's not in ffmpeg yet
[04:08:44 CET] <RoyK> ah
[04:08:46 CET] <furq> there's some fork that has it but that's probably more trouble than it's worth
[04:08:49 CET] <RoyK> no, it doesn't
[04:09:00 CET] <RoyK> guess I'll just find another cam
[04:09:13 CET] <furq> does x264 ultrafast run in realtime for 480p
[04:09:15 CET] <RoyK> or perhaps use a raspberry pi zero
[04:09:30 CET] <RoyK> I tried hw encoding with raspberry pi - worked well
[04:09:47 CET] <furq> it's worth trying x264
[04:09:54 CET] <furq> i wouldn't be surprised if it runs ok at 480p
[04:10:15 CET] <RoyK> at 720p the cpu load was at 90% or so
[04:10:29 CET] <furq> that should probably work ok then
[04:11:25 CET] <RoyK> seemed to spread out well over the cores
[04:11:48 CET] <RoyK> I remember Måns Rullgård started working with that parallallism&
[04:12:39 CET] <furq> you might even be able to use superfast
[04:12:44 CET] <furq> superfast is a huge step up from ultrafast
[04:13:07 CET] <RoyK> higher compression?
[04:13:32 CET] Action: RoyK worked with Måns around 2001 when he started working on that
[04:13:47 CET] <DHE> more CPU usage, but better quality/ratio
[04:14:14 CET] <RoyK> can't afford more cpu here
[04:16:48 CET] <RoyK> A small investment in new cameras can be a good idea, perhaps&
[04:37:35 CET] <Rajko> PLEAS how do i get picture_number of the ffmpeg h264 decoder ?
[04:37:50 CET] <Rajko> technically its in the parser
[04:42:18 CET] <DHE> if it has no b-frames or you're looking at an i-frame, then coded picture equal display picture. otherwise you'll have to do some pts tracking and looking ahead
[04:42:31 CET] <Rajko> it has b-frames
[04:42:34 CET] <Rajko> 2
[04:42:54 CET] <Rajko> why doesnt the h264 decoder fill in display_picture_number, its always 0
[04:43:19 CET] <Rajko> it KNOWS what it is, since it can delay the frame output until it reaches the correct one (reordering)
[04:43:29 CET] <Rajko> even with no PTS supplied (annex-B stream only)
[04:44:27 CET] <DHE> really? because I thought with b-pyramid it would need to do some level of decoding
[04:44:37 CET] <DHE> if pts values were unavailable
[04:44:50 CET] <Rajko> well the decoder is giving me AVFrames
[04:44:55 CET] <Rajko> it should fill in display_picture_number
[04:46:17 CET] <Rajko> but the h264 one never writes to it
[04:55:32 CET] <Rajko> how do i get a ptr to the current h264 parser from the decoder context ?
[06:23:41 CET] <Cracki__> I notice chanserv gives a notice to joining people ("When asking a question be precise..."). how is that done?
[06:24:06 CET] <Cracki__> nvm, entrymsg
[08:03:46 CET] <illegal> Would there be a reason as to why trimming/cutting a part of a video with ffmpeg might yield 1. incorrect starting position and 2. incorrect timing numbers?
[08:04:30 CET] <illegal> Example; starting at 6 seconds instead of 00
[08:04:35 CET] <illegal> 0*
[12:02:03 CET] <Fyr> guys, is development of x265 stalled?
[12:02:40 CET] <Fyr> I saw their bitbucket commits, nothing was worth looking at.
[12:11:50 CET] <adimit> Hi, I have an MKV with text-based subtiles, and I want to create an MPG that I can burn to a DVD, if possible, with the subtitles as a separate track (dvdsub instead of burning them straight onto the movie.) Is there a way to this with FFMPEG? I know how to burn them into the image, but I'd like them to be selectable.
[12:12:18 CET] <adimit> If I use -c:s dvdsub it complains that the source subs aren't in bitmap format, which they're not, but I don't know how to convert them first.
[12:16:55 CET] <dystopia_> in my experience adimit ffmpeg is of at extracting subs
[12:17:00 CET] <dystopia_> when built with libzvbi
[12:17:07 CET] <dystopia_> but not converting to another type
[12:17:12 CET] <dystopia_> i use external programs
[12:17:58 CET] <JEEB> there is no external file format for teletext
[12:18:24 CET] <JEEB> as in, there is no official format that's ~one-to-one to teletext
[12:18:28 CET] <BtbN> ffmpeg should be perfectly able to convert text-based subtitles to dvdsubs
[12:18:28 CET] <adimit> dystopia_: cool, I'm fine with extracting the SRT, then creating bitmap overlays and putting them back into the video, I just don't know how to do it :-(
[12:18:46 CET] <JEEB> but if you were using the API you could get the timing data and text
[12:19:01 CET] <JEEB> oh, wait. you meant something else. sorry
[12:19:04 CET] <JEEB> still waking up
[12:19:05 CET] <adimit> BtbN: do you know how? I've been trying to, but the only thing I can do is burn them into the image.
[12:19:18 CET] <BtbN> The plain stupid way should just work
[12:19:41 CET] <BtbN> -target pal-dvd -c:s dvdsub ...
[12:19:52 CET] <JEEB> I think there might have been some issues with palettes, but not sure. I think Chloe was poking that at some point.
[12:20:34 CET] <adimit> BtbN: if this is the plain stupid way, I haven't been smart enough: ffmpeg -i cut.mkv -c:s dvdsub -f dvd -target pal-dvd output.mpg It complains that the input doesn't have bitmap subtitles.
[12:22:09 CET] <JEEB> uhh
[12:22:19 CET] <JEEB> oh, two discussions even
[12:22:33 CET] <JEEB> yea, text-based to image based requires some effort
[12:22:44 CET] <JEEB> not sure if filter_complex works out of the box
[12:22:56 CET] <JEEB> if you try to overlay the subtitles you get on top of a correctly sized overlay
[12:23:14 CET] <JEEB> for DVD/DVB/PGS subtitles
[12:23:23 CET] <JEEB> and then -map the output of that
[12:25:08 CET] <adimit> JEEB: -filter_complex "[0:v][0:s]overlay[v]" -map "[v]" didn't work for me, as it, too, complains about non-text based subs. But -vf subtitles=input.mkv did work, albeit with some timing issues, that I'd have to resolve. And, of course, it permanently burns the subs into the image.
[12:25:27 CET] <JEEB> yea, that's not what I meant
[12:25:46 CET] <JEEB> like, both of those are just overlaying subtitles on top of the video
[12:27:27 CET] <adimit> oh. Ok. I don't know how to use filter_complex to create a separate stream. I would probably need to create it with -map, no?
[12:28:35 CET] <JEEB> the basics would be to have a see-through generated frame instead of 0:v, and then you'd use the subtitle filter to overlay on top of it (I think overlay only works with image based subtitles)
[12:29:02 CET] <JEEB> and then you -map the output of that (in the thing you pasted it's called "v" but you can call it however you want
[12:29:40 CET] <JEEB> if you set the size of the generated frame right it might go through to the subtitle encoder, although how those work with AVFrames (I don't think they do?) is still up to grabs
[12:29:53 CET] <adimit> JEEB: do you think I can use the text2movsub -bsf instead?
[12:29:56 CET] <JEEB> the API would work with this, but we're currently talking about ffmpeg.c I bet :P
[12:30:02 CET] <JEEB> adimit: no
[12:30:10 CET] <JEEB> that's completely different
[12:30:28 CET] <JEEB> the mere fact it mentions "movsub" already is a red flag that it has nothing to do with your case
[12:30:39 CET] <adimit> JEEB: Ok, thanks, I was confused, then.
[12:34:55 CET] <adimit> I think I might end up not using ffmpeg for this, then. What you're saying sounds a bit complicated for me :-(
[12:35:53 CET] <adimit> Thank you anyway for the help!
[12:36:16 CET] <JEEB> if it works with filter_complex, it's not really complicated
[12:36:32 CET] <JEEB> there's a filter that gives you base images that you can tell it you want transparent
[12:36:48 CET] <JEEB> the size should be whatever are your needs for DVB subtitles (720x576?)
[12:37:09 CET] <Fyr> guys, what does it mean: "Thread message queue blocking; consider raising the thread_queue_size option"?
[12:37:12 CET] <JEEB> then you use the subtitle filter or so to overlay the image
[12:37:32 CET] <Fyr> I set -threads 8
[12:38:08 CET] <adimit> OK, I'll see what I can do, thanks.
[12:38:50 CET] <JEEB> of course it is possible that ffmpeg.c just can't handle that, but in that case you can make a ticket for that use case so people know it :P it, after all, is possible with the API
[15:10:36 CET] <matt3o12> Hey, I have two videos of variable sizes which I want to overlay. The second video should use 25% of the size of the first video and the second video should be placed on the right bottom corner. How can I do that?
[15:12:00 CET] <JEEB> the overlay part takes parameters regarding its position and you can scale the thing to be overlayed to be smaller or exactly the same size as the viewport
[15:12:05 CET] <JEEB> as in, the canvas
[15:12:11 CET] <JEEB> so I don't see anything special in that?
[15:12:19 CET] <JEEB> scale the thing you want to overlay to your preferred size
[15:12:24 CET] <JEEB> set the position params
[15:14:03 CET] <matt3o12> I have troubles understand the ffmpeg command line syntax and I have no expierence working with ffmpeg in general.
[15:14:29 CET] <matt3o12> Can you point me to any links where to get started? `man ffmpeg` is rather difficult to understand.
[15:14:37 CET] <JEEB> yes, that's not the best part to start with
[15:14:43 CET] <JEEB> as it just gives you a lot of stuff
[15:16:59 CET] <JEEB> but basically -filter_complex '[1:v:0]scale=w=300:h=200[scaled_overlay];[0:v:0][scaled_overlay]overlay[overlay_out]' -map '[overlay_out]'
[15:17:02 CET] <JEEB> is an example
[15:17:13 CET] <JEEB> this is with two input files which both have video tracks
[15:17:33 CET] <JEEB> the first part takes the second video file (nr 1 when starting from zero)
[15:17:45 CET] <JEEB> scales it to w=300:h=200
[15:17:52 CET] <JEEB> and outputs its as 'scaled_overlay'
[15:18:08 CET] <JEEB> then we take the video from the first input, and the 'scaled_overlay'
[15:18:19 CET] <JEEB> and tell libavfilter to use those two for overlaying purposes
[15:18:26 CET] <JEEB> and output those as 'overlay_out'
[15:18:51 CET] <JEEB> I recommend searching through ffmpeg-all.html for these filters
[15:18:56 CET] <JEEB> a la https://www.ffmpeg.org/ffmpeg-all.html#overlay-1
[15:19:17 CET] <JEEB> also this can be maybe useful with various more or less non-simple examples
[15:19:18 CET] <JEEB> https://trac.ffmpeg.org/wiki/FilteringGuide
[15:19:31 CET] <Fyr> guys, do 16-bit, 24-bit and 32-bit audio have difference to a human ear?
[15:20:07 CET] <neverminder> Hi JEEB, gotta minute to take a quick peak at my log? I'm trying to record video/audio and it hangs. Video alone or audio alone records just fine.
[15:20:16 CET] <redrabbit> Fyr: its going to be hard to notice
[15:20:19 CET] <sfan5> Fyr: no https://people.xiph.org/~xiphmont/demo/neil-young.html
[15:20:29 CET] <redrabbit> but you can between 16-bit 24-bit
[15:20:38 CET] <redrabbit> 24-bit vs 32 however
[15:20:38 CET] <JEEB> ahahaha
[15:21:04 CET] <JEEB> 16bit already provides quite a bit of headroom and range of values as sfan5's linked article notes
[15:21:20 CET] <JEEB> additional precision is good for filtering, which is when filtering you should be using something like float or double :P
[15:21:24 CET] <redrabbit> imho 96khz 24bit is a tiny bit better than 44.1k 16b
[15:21:26 CET] <kerio> you can take my 24bit radiohead out of my cold dead hands
[15:21:35 CET] <Fyr> redrabbit, but it's possible to discern if one has a good earphones?
[15:21:40 CET] <kerio> Fyr: no
[15:22:01 CET] <redrabbit> with very good gear you can "feel" something
[15:22:15 CET] <redrabbit> idk if you can blind determine between
[15:22:22 CET] <sfan5> lmao
[15:22:25 CET] <redrabbit> maybe you can with super high end gear and good ears.
[15:22:29 CET] <kerio> redrabbit: was there ever a published double-blind test result about it?
[15:22:29 CET] <sfan5> redrabbit: ABX test results or gtfo
[15:22:38 CET] <JEEB> just watch the thing sfan5 linked
[15:22:58 CET] <JEEB> what was picked for audio CDs was surprisingly sane in hindsight
[15:23:03 CET] <kerio> "by the way these are 800$ headphones" "omg i can totally hear the extra bits"
[15:23:04 CET] <redrabbit> i did some vinyl rips
[15:23:08 CET] <kerio> JEEB: fuck 44100 tho
[15:23:14 CET] <redrabbit> and the rips with 96khz 24bit sound better
[15:23:16 CET] <redrabbit> more natural
[15:23:21 CET] <kerio> vinyl isn't natural
[15:23:34 CET] <redrabbit> if you downsample it it sounds more closed
[15:23:36 CET] <JEEB> kerio: well even that is 22.050kHz minus some with nyquist
[15:23:55 CET] <kerio> JEEB: i'm not arguing about the magnitude
[15:24:37 CET] <kerio> i'm arguing against choosing 44100 instead of 48000
[15:24:43 CET] <JEEB> sure
[15:24:45 CET] <kerio> fuck that 49 factor
[15:24:51 CET] <JEEB> I have no historical info on that
[15:25:11 CET] <JEEB> and no idea why broadcast and music CDs ended up with different rates
[15:25:15 CET] <kerio> it's 2*2*3*3*5*5*7*7
[15:25:20 CET] <matt3o12> Sorry, Ive been disconnected. Does the channel have a log for any message I might have missed?
[15:25:40 CET] <kerio> and they specifically chose a different sample rate than DAT so people couldn't copy them as easily
[15:25:44 CET] <redrabbit> The key difference between 24 bit audio and 16 bit audio is the noise floor. In other words, a quiet sound recorded in 24 bit has less inherent noise than the same sound recorded in 16 bit. This allows for a much wider dynamic range in 24 bit recordings. You can see hear for yourself if you record a very quiet sound in both 16 and 24 bit, then normalize both files to a higher output level; the 16 bit f
[15:25:50 CET] <JEEB> matt3o12: http://up-cat.net/p/a93537a7
[15:25:50 CET] <redrabbit> ile will be audibly noisy compared to the 24 bit file.
[15:25:53 CET] <redrabbit> boom headshot
[15:26:01 CET] <matt3o12> JEEB: thanks :)
[15:26:22 CET] <JEEB> and then I linked the filtering guide as well https://trac.ffmpeg.org/wiki/FilteringGuide
[15:26:24 CET] <kerio> "if you fuck up your audio file in this specific way, 24 bit ends up better than 16 bit"
[15:26:36 CET] <redrabbit> quit trolling
[15:26:45 CET] <redrabbit> better noise floor
[15:26:48 CET] <redrabbit> fact.
[15:27:18 CET] <redrabbit> mathematically superior
[15:27:18 CET] <JEEB> redrabbit: for filtering higher precision is useful, but that's it :P
[15:27:43 CET] <JEEB> if you're supposed to be listening it there should be no discerning differences
[15:27:46 CET] <redrabbit> well 98% of my library is 44.1
[15:28:09 CET] <JEEB> anyways, please have a watch of that xiph.org video article
[15:28:12 CET] <JEEB> it is useful
[15:28:45 CET] <neverminder> What could be the problem here? It just hangs while eating 100% of one CPU core: https://pastebin.com/tAc9AU46
[15:29:06 CET] <kerio> om nom nom
[15:29:21 CET] <kerio> neverminder: does guvcview work?
[15:29:24 CET] <redrabbit> 44.1-16 is fine, its silly to say anything above it isnt better
[15:29:38 CET] <redrabbit> ok it can restitute up to 20khz
[15:29:39 CET] <sfan5> neverminder: uh? https://trac.ffmpeg.org/ticket/6889
[15:29:44 CET] <redrabbit> but how ugly is that restitution
[15:29:54 CET] <JEEB> please just watch the video
[15:30:04 CET] <JEEB> or read the article in text
[15:30:19 CET] <neverminder> sfan5: I closed the ticket, because after latest update the problem changed
[15:30:20 CET] <JEEB> but the video might help you understand these things better as it's not just text but actual tests with things as well
[15:30:38 CET] <neverminder> kerio: what exactly is that?
[15:30:55 CET] <kerio> some other program to view webcams or other v4l2 sources
[15:31:09 CET] <redrabbit> theres no vid on that link
[15:31:30 CET] <sfan5> redrabbit: https://video.xiph.org/vid2.shtml (?)
[15:31:45 CET] <neverminder> kerio: well recording video alone works, same with audio alone, so not sure why combined it doesn't?
[15:31:46 CET] <kerio> actually it might be just for UVC devices
[15:31:49 CET] <JEEB> redrabbit: it has a link to what sfan5 just linked
[15:31:51 CET] <redrabbit> high frequency sounds are more detailed with 96-24
[15:31:56 CET] <kerio> oh then idk
[15:32:03 CET] <redrabbit> the highs are smoother at high volume
[15:32:21 CET] <redrabbit> less agressive
[15:32:52 CET] <sfan5> I like my music aggressive
[15:33:19 CET] <redrabbit> you punk
[15:34:31 CET] <redrabbit> that dude on the vid is too old to hear the difference
[15:34:37 CET] <redrabbit> im probably as well
[15:34:45 CET] <redrabbit> i could hear it when i was younger.
[15:34:56 CET] <JEEB> just watch through it
[15:34:56 CET] Action: redrabbit speak the true true
[15:37:47 CET] <redrabbit> i hope he test other stuff than sins
[15:38:00 CET] <redrabbit> sinus obviously is gonna be pretty transparent
[15:39:10 CET] <redrabbit> music aint a sine wave
[15:39:13 CET] <redrabbit> dumb shit
[15:39:49 CET] <redrabbit> try with a f-ing square pls
[15:40:00 CET] <JEEB> go poke #xiph with that
[15:40:19 CET] <redrabbit> do the same shit with a square signal at 22khz
[15:40:23 CET] <redrabbit> and gimme the lols
[15:40:31 CET] <redrabbit> its gonna look like shit
[15:41:56 CET] <redrabbit> its mathematically impossible to get a proper square signal at 22khz at these sample rates
[15:42:28 CET] <redrabbit> however 96-24 can do it.
[15:43:59 CET] <redrabbit> so, better highs, better depth, better dynamic.
[15:44:18 CET] <redrabbit> sure its marginal, but saying it doesnt do anything is silly
[15:45:29 CET] <kerio> redrabbit is literally a dog
[16:02:49 CET] <redrabbit> woof
[16:23:11 CET] <Fyr> guys, when converting a 8k video, FFMPEG tries to mallocate a huge amount of memory. is there a way to avoid such mallocation?
[16:23:46 CET] <Fyr> it seems like 24 Gb of RAM and 2 Gb of swap is not enough.
[16:24:54 CET] <DHE> each frame has 32 million pixels. multiply by the sample sizes, multiply by internal buffering for look-ahead and bframes and stuff... that doesn't sound COMPLETE nuts...
[16:25:10 CET] <DHE> maybe turn down lookahead frames? (if your codec does so)
[16:25:21 CET] <Fyr> ok, DHE, how much memory is required to convert 8k video?
[16:25:30 CET] <JEEB> depends on the encoder and the settings
[16:25:40 CET] <JEEB> if you do just `ffmpeg -i input -f null -`
[16:25:44 CET] <JEEB> you can see how much pure decoding takes
[16:25:45 CET] <Fyr> libx264, the setting are set to default.
[16:25:46 CET] <JEEB> :P
[16:25:55 CET] <JEEB> yes, libx264 I think buffers 40 or 60 frames by default
[16:26:08 CET] <DHE> dunno. but my multi-bitrate application takes like 700 MB of RAM with 1080p input.. so crank that by 16x sounds completely reasonable actually
[16:27:53 CET] <Fyr> JEEB, will NVENC require such amount of memory?
[16:28:20 CET] <JEEB> Fyr: you sure fly from one topic to another don't you
[16:28:29 CET] <JEEB> why didn't you rather ask "how do I minimize the buffering"?
[16:28:41 CET] <DHE> I though 4096x4096 was the nvenc limit
[16:28:50 CET] <Fyr> oh, ='(
[16:28:50 CET] <JEEB> anyways, no idea how fucking much nvenc buffers but DHE noted the max res
[16:29:10 CET] <DHE> Fyr: add -tune zerolatency and see if the memory usage goes way down (at the expense of quality mind you)
[16:29:25 CET] <Fyr> ok, thanks
[16:29:38 CET] <JEEB> that is just the single-line way of disabling as much buffering as possible
[16:29:57 CET] <JEEB> you can then move into tweaking if you want
[16:30:35 CET] <DHE> yeah this is intended as "proof that internal buffering is the cause" by eliminating internal buffering. though I'm 97% sure I'm right
[16:31:01 CET] <JEEB> well yea
[16:31:12 CET] <JEEB> that's pretty obvious that it is the reason because libx264 buffers 40-60 pictures
[16:31:15 CET] <JEEB> by default
[16:31:18 CET] <JEEB> (preset medium)
[16:31:20 CET] <Guest64446> Is this the right channel to ask about how to record an OpenGL animation to an mp4 file?
[16:34:36 CET] <Guest64446> I used this command on the apitrace page but the output is very pixelated and grainy: apitrace dump-images -o - solid.trace | ffmpeg -r 30 -f image2pipe -vcodec ppm -i pipe: -vcodec mpeg4 -y solid.mp4
[16:38:36 CET] <DHE> Guest64446: mpeg4 is an old codec and you didn't specify any settings like bitrates. add "-qp 3" just after -y for a pretty high quality version
[16:40:11 CET] <Guest64446> basically, I want to put this animation on my web page and have anyone with a browser be able to watch it. I assumed mpeg4 was the most popular - but if there's something better I'm all ears ...
[16:41:18 CET] <Guest64446> Sorry, I don't mean in a web browser, I mean someone with your typical Windows 10 computer
[16:42:15 CET] <Guest64446> or I suppose in a browser - I'm not sure if/which video is viewable in a browser
[16:42:18 CET] <DHE> mpeg4 can be misleading as technically it's a multi-section document describing multiple codecs. "mpeg4" is mpeg4 part 2 (once known as DivX in the early 2000s)
[16:42:40 CET] <DHE> nowadays you want h264 (aka mpeg4 part 10) which requires -c libx264 with ffmpeg
[16:43:24 CET] <DHE> with h264 instead try encoding with -crf 22 for your quality setting
[16:45:53 CET] <Guest64446> what should the extension of an h264 output file be?
[16:46:56 CET] <DHE> .mp4 is fine
[16:47:23 CET] <DHE> if you want streaming support there's more options you should add, but let's do one step at a time
[16:48:40 CET] <Guest64446> well with those settings you mentioned, it looks great...
[18:57:29 CET] <Darxus> I'm using ffmpeg version 2.8.11-0ubuntu0.16.04.1. I'm trying to convert a bunch of png's to webm. It works until I specify a framerate with "-r 2". Without specifying a framerate, I get this at 25fps, which is fine: http://www.eternalmachinery.com/ecar/ebucket25fps.webm With "ffmpeg -i ebucket%04d.png -r 2 ebucket2fps.webm" I get this, which is all messed up:
[18:57:34 CET] <Darxus> http://www.eternalmachinery.com/ecar/ebucket2fps.webm Is this a known bug? How ...
[18:57:37 CET] <Darxus> ... do I get a slower video from these images?
[18:59:20 CET] <DHE> put "-framerate 2" ahead of -i instead so it's treated as a 2fps input
[19:00:36 CET] <Darxus> DHE: Hah, that did it, thank you.
[19:01:22 CET] <Darxus> I did try playing with -framerate, but it's... not actually documented in the man page?
[19:01:56 CET] <DHE> ffmpeg is a collection of modules which accept different options. -framerate is an option specific to the demuxer that makes a movie out of a series of still image files
[19:02:23 CET] <DHE> https://ffmpeg.org/ffmpeg-formats.html#image2-1
[19:02:53 CET] <Darxus> Ahh, thanks. You've resolved an awful lot of frustration for me.
[19:22:57 CET] <Darxus> I'm currently rendering that same animation at 1920x1080, with 800 frames, instead of 20. If I want to reduce that to a 1 megabyte video, what would give me the best results? Leave the resolution and frame rate, and use lots of compression? Reduce the frame rate? Reduce the resolution?
[19:23:07 CET] <d9867eb> hi
[19:23:42 CET] <durandal_1707> hi
[19:25:26 CET] <d9867eb> I wrote a script https://pastebin.com/DLfpDn5L for encoding movies to x265 or theora. can you please critique it?
[19:26:35 CET] <sfan5> why theora
[19:26:53 CET] <d9867eb> because it is opensource
[19:27:21 CET] <BtbN> x265 is as well
[19:27:39 CET] <d9867eb> no just parts
[19:27:50 CET] <BtbN> uhm, no
[19:28:36 CET] <DHE> you mean the mpeg licensing stuff?
[19:29:01 CET] <d9867eb> hmm probably
[19:29:17 CET] <DHE> Darxus: 800 frames at 1080p for 1 megabyte of file size? dunno if the quality is going to be there unless it's very low motion
[19:29:43 CET] <sfan5> aside from your script being totally unreadable: use a proper option parser, why is quality different when not using -i? why are you using mp3 for audio? why aren't you using vp8/vp9 instead of theora?
[19:30:29 CET] <sfan5> Darxus: you can also keep both and just turn the quality of the video down, and make sure to use 2pass encoding when targeting a specific file size
[19:30:38 CET] <Darxus> DHE: I'd say it's low motion. I'm mostly just curious. I feel like I should be able to tell ffmpeg a target file size and have it figure out the best way to get there, by cranking up compression / dropping frames / reducuing resolution.
[19:30:57 CET] <DHE> Darxus: how long is the video? (for calculation purposes)
[19:31:24 CET] <d9867eb> sfan5: what is option parser?
[19:31:26 CET] <Darxus> DHE: Say 60fps, 13 seconds.
[19:31:35 CET] <sfan5> d9867eb: e.g. GNU getopt
[19:33:08 CET] <DHE> Darxus: making it up as I go, I'd start with: ffmpeg -framerate 60 -i ebucket%04d.png -c:v libx264 -r 20 -pix_fmt yuv420p -g 300 -preset slow -s 1280x720 -b:v 600k -pass 1 output.webm
[19:33:16 CET] <d9867eb> sfan5: why is quality different? becuase if I expect DVD to have higher quality than a already encoded file
[19:33:20 CET] <DHE> then run it again with -pass 2 instead
[19:33:57 CET] <d9867eb> sfan5: then what is a okay quality to use in the script?
[19:34:11 CET] <DHE> bring it down to 20fps, 720p, and see how it looks.
[19:34:31 CET] <sfan5> d9867eb: that depends very much on the input video, your qualitty settings are not necessarily bad
[19:34:38 CET] <sfan5> was just wondering why they differ in specific cases
[19:35:24 CET] <Darxus> DHE: Thanks.
[19:35:47 CET] <d9867eb> sfan5: isnt vp8/vp9 intended for video on the web?
[19:35:58 CET] <sfan5> sort of, is that a problem?
[19:36:04 CET] <DHE> Darxus: take a look and play with it a bit. bitrate tweaks can be done with only a pass 2 re-run. other changes require running both passes again
[19:36:22 CET] <sfan5> theora is pretty old and you should be using something better if you can
[19:36:35 CET] <Darxus> DHE: Nice, thanks.
[19:36:37 CET] <d9867eb> sfan5: not necesseraly
[19:38:27 CET] <d9867eb> but i thoght a more general format would be better for longterm video storing
[19:40:25 CET] <d9867eb> when encoding using my script it dosent skip the dvd_nav_packet. how do I skip it but keep all other streams?
[19:44:46 CET] <Darxus> Wow, it came out as 384K with the defaults: http://www.eternalmachinery.com/ecar/ebucket4big.webm
[19:50:41 CET] <ayum> Hi, Seems ffmpeg will according to the timestamp to drop or duplicate frame sometimes, but my current project require ffmpeg do no drop and duplicate frames, is this possible by setting some ffmpeg options?
[19:51:34 CET] <JEEB> -vsync vfr or -vsync copy
[19:51:44 CET] <ayum> okay, let me try it
[19:53:16 CET] <ayum> it's still dropping
[19:53:52 CET] <ayum> I wrote a compare filter for used to compare 2 v4l2 streams
[19:54:14 CET] <ayum> the compare filter is based framesync
[19:55:01 CET] <ayum> perhaps framesync will cause some problem and make 2 v4l2 input streams not synchronized
[19:58:34 CET] <durandal_1707> ayum: you need to setpts filter for pts to be always properly defined, otherwise you will get wrong results
[20:00:44 CET] <ayum> can you give me an example command about setpts filter? I am not sure how to use it. like: -filter_complex setpts=???
[20:03:49 CET] <durandal_1707> setpts=N ?
[20:04:21 CET] <ayum> This is my current command:
[20:04:22 CET] <ayum> ./ffmpeg -f v4l2 -thread_queue_size 256 -i /dev/video1 -f v4l2 -thread_queue_size 256 -i /dev/deo0 -f alsa -thread_queue_size 256 -i hw:2,0 -filter_complex "[0:v]setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'[o0];[1:v]setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'[o1];[o0][o1]compare" -c:v h264_nvenc -b:v 4M -maxrate 5M -c:a libfdk_aac -ar 44100 -ac 2 -b:a 128k -f mpegts udp://192.168.2.2:9999 -loglevel verbose
[20:04:48 CET] <ayum> and works good, but many "Past duration too large" warnings
[20:14:05 CET] <DHE> Darxus: turn out okay?
[20:14:57 CET] <Darxus> DHE: Not great, still playing. Doing two pass right now.
[20:28:27 CET] <ayum> I am using this filter complex, is it correct? "[0:v]setpts=FRAME_RATE[o0];[1:v]setpts=FRAME_RATE[o1];[o0][o1]compare,setpts=N/FRAME_RATE/TB"
[20:29:11 CET] <ayum> I think it's wrong, especially. setpts=FRAME_RATE.
[20:30:31 CET] <durandal_1707> that sets pts to constant value
[20:54:00 CET] <Darxus> Wow, that's quite a difference in the two video loops at the top of this page: http://www.eternalmachinery.com/ecar/
[20:54:56 CET] <Darxus> The top, smoother one, is 452K webm, the second, with far fewer frames, is 452K ogg theora.
[20:59:31 CET] <d9867eb> sfanhi
[20:59:33 CET] <d9867eb> hi
[20:59:44 CET] <sfan5> what
[20:59:45 CET] <d9867eb> i am still having problems
[21:00:10 CET] <d9867eb> also when i encode *.VOB files using my script, the navigation is displayed in the begginning of the movie. how do i skip it?
[21:00:55 CET] <sfan5> you probably need to choose the correct vob file to skip those
[21:01:08 CET] <d9867eb> and flac dosent seem to work my script. why? should i use another codec?
[21:01:35 CET] <sfan5> i'd suggest using a different utility first to remux the DVD to some usable format, after that you can re-encode it
[21:02:14 CET] <d9867eb> sfan5: like what?
[21:02:59 CET] <sfan5> makemkv
[21:03:30 CET] <d9867eb> is that open source?
[21:03:59 CET] <sfan5> no
[21:04:26 CET] <d9867eb> sfan5: i want that
[21:04:32 CET] <durandal_1707> why you promote closed payware here?
[21:04:52 CET] <sfan5> because it just works"
[21:05:08 CET] <sfan5> d9867eb: then consider something like handbrake instead, it should also be able to read DVDs
[21:06:44 CET] <d9867eb> sfan5: but i had like to use ffmpeg instead, isnt there some way to make my script work?
[21:07:39 CET] <sfan5> this would be helpful
[21:10:03 CET] <d9867eb> here is the output from my script https://pastebin.com/Z4z2xkD8
[21:10:18 CET] <d9867eb> sfan5:
[21:10:50 CET] <sfan5> i thought there was a problem with flac?
[21:12:24 CET] <d9867eb> sfan5: script in current state https://pastebin.com/uNDLSbJi
[21:13:06 CET] <sfan5> also since your source is DVD you probably want to deinterlace
[21:14:14 CET] <d9867eb> sfan5: how?
[21:15:10 CET] <sfan5> -vf yadif
[21:17:55 CET] <d9867eb> sfan5: my script doesent appear to recognise audio from dvds.
[21:18:15 CET] <sfan5> this is why i suggested a different utility
[21:19:29 CET] <d9867eb> sfan5: so this is like impossible to do?
[21:19:35 CET] <sfan5> dunno
[21:19:47 CET] <sfan5> it's just that I do not know what's wrong here
[21:22:00 CET] <d9867eb> ok thanks anyway
[21:23:15 CET] <d9867eb> i remember reading a blog about this some time ago, I will go search for that
[21:42:03 CET] <d9867eb> navigation issue solved
[21:42:38 CET] <d9867eb> audio seems to work with a another video
[21:57:27 CET] <neverminder> is it possible to record video and output it to screen at the same time?
[22:53:40 CET] <Sun> Hello! I'm trying to add a logo to the video. Is it possible to scale image according to the video resolution? I found the variables about the image's itself width and height only... I would like to use something like: -filter_complex "scale=772*main_w/1920:184*main_h/1080[logo], [src][logo]overlay=32*main_w/1920:872*main_h/1080". So here as I understand, overlay works fine, but with scale there are some problems...
[22:54:40 CET] <Sun> So is there kind of variables I could use instead of "main_w" and "main_h" in the "scale" section?
[22:55:49 CET] <durandal_1707> see scale2ref filter
[23:05:17 CET] <Sun> Thank You :) But it seems, the filter section becomes more and more complicated... is it possible to debug the inputs and outputs between the filters somehow?
[23:06:23 CET] <Sun> So for example, now I've got the problem, that scale generated only one stream (or so), and it was ok for overlay filter. So as I understand, scale2ref generate 2 outputs?
[23:06:30 CET] <durandal_1707> scale2ref filter needs 2 inputs and give two outputs
[23:15:28 CET] <Sun> Sorry, got completely confused :( So I'm using this: "... [deint][2]scale2ref=772*main_w/1920:184*main_h/1080[logo], [logo]overlay=32*main_w/1920:872*main_h/1080". So ffmpeg shows me many errors
[23:16:12 CET] <Sun> Undefined constant or missing '(' in 'main_w/1920', Failed to configure output pad on Parsed_scale2ref_1 and so on
[23:17:03 CET] <durandal_1707> Sun: have you read documentation of scale2ref filter?
[23:19:09 CET] <Sun> Yes, but only this one: https://ffmpeg.org/ffmpeg-filters.html#scale2ref - maybe the problem is I'm not so experienced how to use filter chains and so on, but please, could You give me a hint, what could be wrong here?
[23:24:06 CET] <Darxus> Re-rendering with -deadline best gave me a 7.0% decrease in file size. Took an hour and 20 minutes. I think the default encoding took something like 7 minutes.
[23:26:52 CET] <durandal_1707> Sun: you need to specify 2 outpads for scale2ref filter
[23:27:55 CET] <Sun> it's strange, but I did, and it didn't help, the same errors... "... [2][deint]scale2ref=772*main_w/1920:184*main_h/1080[logo][vid], [vid][logo]overlay=32*main_w/1920:872*main_h/1080"
[23:29:03 CET] <Sun> Here are the errors: https://pastebin.com/rZt6VnDX
[23:30:47 CET] <durandal_1707> Sun: what ffmpeg version?
[23:31:29 CET] <Sun> ffmpeg version N-79143-g8ff0f6a Copyright (c) 2000-2016 the FFmpeg developers
[23:31:50 CET] <BtbN> that's quite old
[23:32:36 CET] <durandal_1707> why dont you try more recent one, main_w should be recognized
[23:34:23 CET] <Sun> Ouch... just used it for long time without problem and didn't even noticed that it has been outdated :) I try new one
[23:35:58 CET] <BtbN> well, if you used it for a long time, and never updated it, what did you expect? :D
[23:48:27 CET] <Sun> lol, now it works :D
[23:49:36 CET] <Sun> But still a little problem: width not divisible by 2 (257x61) - it seems, the problem is that by scaling it became odd... Is it possible to round somehow that it be dividable by 2? :)
[23:51:06 CET] <zash> Heh, two primes for size
[23:51:38 CET] <Sun> Found only this solution: scale="854:trunc(ow/a/2)*2"
[23:52:06 CET] <BtbN> put -2 for one of the two
[23:52:27 CET] <BtbN> Or what kind of weird scaling do you want to do that does not keep aspect?
[23:54:33 CET] <FishPencil> Where does FFmpeg need to find AMF to be included? I just keep getting 'ERROR: amf requested but not found'. The header can be found in AMF/core/Version.h
[23:55:22 CET] <sfan5> it should be in your compiler's default include folder
[23:55:23 CET] <FishPencil> That error doesn't really help much either
[23:55:33 CET] <sfan5> also take a look at ffbuild/config.log
[23:55:41 CET] <FishPencil> I did, that's the last line
[23:55:44 CET] <FishPencil> All it says
[23:56:04 CET] <sfan5> there's more usually (detailing what it ran to check for amf)
[23:56:38 CET] <FishPencil> That's all it says
[23:57:27 CET] <Sun> BtbN: I have a bit non-standard picture size, which I want to embed in the video, and it doesn't want to embed any pictures, which sizes are both non-dividable by 2...
[00:00:00 CET] --- Sun Dec 10 2017
More information about the Ffmpeg-devel-irc
mailing list