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

burek burek021 at gmail.com
Wed Jan 11 03:05:01 EET 2017

[00:09:36 CET] <frenda> Didn't worked! I want keep the Persian voice (-map 0:0 -map 0:1) and drop English <-- http://paste.ubuntu.com/23773083
[00:09:49 CET] <frenda> Here is the full command:
[00:10:34 CET] <frenda> ffmpeg -i Keyhan.S01E05.1080p_Film.mkv -ss 00:07:07.000 -to 00:19:08.010 -codec:v libx264 -profile:v main -preset slow -b:v 70k -maxrate 100k -bufsize 140k -vf scale=-2:240 -threads 0 -codec:a libmp3lame -b:a 64k -pix_fmt yuv420p -map 0:0 -map 0:2 cropped.mp4
[00:14:53 CET] <mosb3rg> put map up front
[00:15:06 CET] <mosb3rg> and replace -map 0:2 with -map 0:1
[00:15:15 CET] <mosb3rg> i misunderstood you, sounded like you wanted to keep english
[00:15:55 CET] <mosb3rg> <frenda> Is there any option missing?
[00:15:55 CET] <mosb3rg> <mosb3rg> you could use the -map 0:0 -map 0:1
[00:15:56 CET] <mosb3rg> :D
[00:16:06 CET] <mosb3rg> was the first thing i said though so oh well :P
[00:16:30 CET] <frenda> I used -map 0:0 -map 0:1
[00:16:43 CET] <frenda> I also tried for -map 0:2 too!
[00:17:06 CET] <frenda> none of them keeps the Persian
[00:19:25 CET] <frenda> Solved; I run it without other options!
[00:19:32 CET] <frenda> and worked well
[00:46:09 CET] <spiderkeys> Hi, I'm curious if there is a way to get ffmpeg to mux and h264 stream to fragmented mp4 in such a way that it puts every frame in its own mdat+moof container. I've been successful before in getting the muxing to fragmented mp4 to work, but it seems like the default behavior is to mux an entire GOP together, i.e. if the gop length is 15, each fMP4 segment contains 15 frames (I frame + 14 P frames)
[00:46:31 CET] <spiderkeys> I've tried various flags that target reduction of buffers and whatnot
[00:48:30 CET] <spiderkeys> I would like each frame, whether it is an i-frame, p-frame, etc to be packed into its own mp4 segment. The reason for this is ultra low latency streaming to the browser, which allows you to append fmp4 segments to the media source extension buffer for decoding/rendering
[00:49:16 CET] <spiderkeys> I've implemented that programmatically in my own application using libavformat and libavcodec, but it would be great if I could also do it with the ffmpeg cli tools for producing test streams
[00:57:45 CET] <c_14> spiderkeys: -frag_size 1 ?
[00:58:05 CET] <c_14> not entirely sure how sane that is, I hope it would round up to frames
[00:58:17 CET] <c_14> you can also try -frag_duration
[00:58:23 CET] <spiderkeys> c_14: Yea I was wondering about that, as the docs specify that options in bytes
[00:58:35 CET] <spiderkeys> Worth a try
[00:58:48 CET] <c_14> Well, a frame will always be more than 1 byte and having a fragment contain less than 1 frame doesn't really make sense
[01:13:30 CET] <spiderkeys> c_14: It worked :) Thanks much!
[01:13:51 CET] <spiderkeys> Now I just have na issue where ffmpeg isn't respecting me trying to force the framerate, so the video is playing back at half speed
[02:09:42 CET] <alexspeller> Hi all, I'm trying to figure out a strategy for video compositing. I made a gist explaining it using ascii-art because it's hard to explain in words. Any insight appreciated! https://gist.github.com/alexspeller/aefdd5a6d7100d28d0bbc4838527f797
[02:35:51 CET] <phillipk> I see there's the ability to use "ow" (for output width), is there a shorthand for "input duration"?
[02:42:57 CET] <c_14> phillipk: no
[03:57:49 CET] <wordicorn> hi
[03:57:52 CET] <wordicorn> anyone here? :D
[03:57:56 CET] <wordicorn> I got some noob-like questions
[03:58:23 CET] <wordicorn> mpeg is a container format, right? and h264 is a codec, that encodes video data which may be used in a container like mpeg, right?
[03:58:53 CET] <wordicorn> oh, mpeg is also a compression standard
[03:59:28 CET] <wordicorn> why can ffmpeg also handle h.264? is the name "mpeg" in its name because of its history (it started with mpeg, now it can do more)?
[03:59:52 CET] <c_14> https://en.wikipedia.org/wiki/MPEG
[04:00:57 CET] <furq> The name of the project is inspired by the MPEG video standards group, together with "FF" for "fast forward".
[04:01:45 CET] <furq> also h264 is otherwise known as mpeg-4 part 10
[04:02:05 CET] <furq> that's irrelevant though, ffmpeg deals with lots of formats/codecs which have nothing to do with mpeg
[04:04:54 CET] <wordicorn> furq: thanks!
[04:05:40 CET] <furq> maybe it's time to rename ffmpeg to reflect how it is now a general purpose audio video converter
[04:05:54 CET] <furq> i don't see how you'd turn that into a snappy name though
[04:05:58 CET] Action: c_14 wants an invisible bikeshed
[04:06:00 CET] <wordicorn> furq: a related question: 1080p, 25fps stream, how much bandwidth would that consume? current estimate is about 8Mbit/s - is that right?
[04:06:07 CET] <furq> what codec
[04:06:11 CET] <wordicorn> h264
[04:06:18 CET] <furq> if it's not rawvideo then there's not really a correct answer
[04:06:31 CET] <wordicorn> what could one estimate in best and worse case?
[04:06:41 CET] <wordicorn> audio is unimportant, could be even no audio
[04:06:49 CET] <furq> the best case would be a static image, in which case it'd be about 100kbps
[04:07:02 CET] <wordicorn> and if the image pans?
[04:07:11 CET] <wordicorn> can the compression algorithm handle that efficiently?
[04:07:13 CET] <furq> the worst case would be solid noise, in which case it'd be >100mbps
[04:07:17 CET] <wordicorn> oh :D
[04:07:36 CET] <furq> it depends on the source to such a massive extent that it's not really worth speculating
[04:08:00 CET] <wordicorn> furq: so I have to measure that over a time and find out a good average
[04:08:01 CET] <wordicorn> ok
[04:08:05 CET] <furq> yeah
[04:08:13 CET] <furq> although i'll undermine myself now and say 10mbps is often enough
[04:08:25 CET] <furq> you shouldn't need to concern yourself with that though
[04:08:27 CET] <furq> just use crf
[04:09:17 CET] <wordicorn> furq: let's say I got one single ipcamera which streams 1080p 24fps - to a server because otherwise the internet connection would be saturated soon with more viewers) - what streaming service is affordable/cheap for a small amount of viewers?
[04:09:36 CET] <wordicorn> I thought about using a cheap VPS with lots of traffic or "unlmited" traffic
[04:09:41 CET] <furq> a cheap vps would be fine
[04:09:47 CET] <wordicorn> cool
[04:09:57 CET] <wordicorn> some got a fair use policy that they may reduce the bandwidth if too much is used
[04:09:58 CET] <furq> if the camera doesn't move then that'll probably be pretty low bitrate
[04:10:06 CET] <wordicorn> the camera moves slowly (pans)
[04:10:14 CET] <wordicorn> can the codec handle that intelligently?
[04:10:18 CET] <furq> sure
[04:10:19 CET] <wordicorn> like a larger buffer or so?
[04:10:21 CET] <wordicorn> cool
[04:10:21 CET] <wordicorn> :D
[04:10:24 CET] <wordicorn> then I am happy
[04:10:31 CET] <wordicorn> crf is interesting, thanks for the hint
[04:10:59 CET] <furq> well crf will cause some bitrate spikes, which isn't great for streaming
[04:11:11 CET] <furq> but it's usually still fine
[04:12:08 CET] <wordicorn> bitrate spikes means that the image degrades or that there are short surges of increased traffic?
[04:12:27 CET] <furq> the latter
[04:12:45 CET] <furq> or the former if the vbv is enabled
[04:14:12 CET] <wordicorn> furq: does a h264 streaming server (ipcamera itself) already some adaptive bandwidth feature? so when there are only visitors with small resolutions to view, could the server demand less from the camera?
[04:14:45 CET] <furq> if the camera itself outputs h264 then probably not
[04:15:26 CET] <wordicorn> furq: if it outputs mpeg which is processed to h264 by the server?
[04:16:06 CET] <furq> you can encode multiple streams for adaptive streaming
[04:16:41 CET] <furq> or your server can
[04:17:01 CET] <wordicorn> furq: the ipcam supports dual streaming, so it could provide two streams, one with low and one with higher resolution, right?
[04:17:10 CET] <wordicorn> and the server could connect/disconnect to the higher res stream on demand
[04:17:43 CET] <furq> well the server would just serve both and the client would pick one
[04:20:01 CET] <wordicorn> ah
[04:20:50 CET] <wordicorn> furq: so that the server can demand less bandwidth from the ipcam if there is less demand from the clients is a more complicate thing (adaptive bitrate from the ipcam) - so it is unlikely to work with some usual ipcamera, right?
[04:21:29 CET] <furq> well if you're transcoding to h264 anyway there's not really much point getting multiple streams off the camera
[04:21:48 CET] <furq> you could just get the high-res stream and encode multiple copies at different resolutions
[04:22:38 CET] <wordicorn> furq: I guess I am naive/nooby here, I thought that a client could demand more and more bandwidth until it is satisfied (= displayed resolution) and then only that bandwidth is transmitted until a new client wants more, etc - so I am wrong with this assumption?
[04:23:14 CET] <wordicorn> so that the ipcamera encoder would know from client what resolution is intended and transcode only so much for it
[04:24:02 CET] <furq> i've never really touched ipcams so maybe that does some kind of magic
[04:24:48 CET] <furq> but if the camera outputs mpeg then that stuff probably all goes out the window
[04:25:09 CET] <wordicorn> furq: thanks! this was helpful for me :)
[04:25:56 CET] <furq> normally with adaptive streaming you'd have e.g. a 360p stream, 480p, 720p, 1080p or whatever, each one advertises a nominal bitrate and the client picks the one it wants
[04:26:29 CET] <furq> so you'd have something like ffmpeg taking in a 1080p stream from the camera and encoding four streams at each of those sizes
[04:26:38 CET] <wordicorn> furq: ah! and the encoder would not encode a 720p stream if there are no clients that want it, right? It would wait until it is requested and save CPU?
[04:26:55 CET] <furq> maybe
[04:27:04 CET] <furq> i'm pretty sure there are streaming servers which will encode on demand
[04:27:17 CET] <wordicorn> furq: How is this called what I see sometimes in streams? That the quality is first quite bad/blocky and then the image becomes better when only few things move (e.g. only the face)?
[04:27:31 CET] <furq> that just sounds like bitrate starvation
[04:27:50 CET] <wordicorn> so one can see the smartness of the codec, right? that it can re-use parts of the scene and only transfers the changing parts of it
[04:28:20 CET] <furq> generally the less motion there is, the less bitrate is needed
[04:28:52 CET] <furq> so if you have a 500kbps cbr stream it'll be fine if there's no motion but will go to hell for a long shot of the sea or something
[04:29:12 CET] <furq> the point of crf is that it'll use as much bitrate as is needed
[04:29:18 CET] <furq> but that's not always great for streaming
[04:32:07 CET] <wordicorn> furq: a camera that _slowly_ pans over a quite static landscape, it wouldn't be that much traffic then?
[04:32:22 CET] <furq> probably not
[04:33:56 CET] <wordicorn> furq: Could a router/internet connection of someone do multicasting? Like the packets of the ip cam distributed to lots of viewers - behind the limited internet connection? Or is this not possible usually with normal internet connections because of the ISP/architecture?
[04:34:46 CET] <furq> i don't think multicast over wan is really a thing
[04:34:50 CET] <furq> i've never touched multicast though
[04:38:02 CET] <wordicorn> furq: how much fps is enough for a simple landscape stream with some slow panning?
[04:38:15 CET] <wordicorn> 24fps is the minimum, but I try to reduce the bandwidth using less fps, too
[04:38:30 CET] <furq> reducing the fps won't really reduce the bandwidth much
[04:39:04 CET] <furq> and only you can say what looks good enough
[07:20:08 CET] <Bray90820> if you run a command such as this ffmpeg -i "21.mkv" -c:a copy "21.mp4" and you delete the MKV file while it's still encoding would it still finish correctly?
[08:47:04 CET] <c_14> Bray90820: yes, but I wouldn't recommend it
[08:52:10 CET] <Bray90820> c_14 Usually I don't but it did happen and I wanted to know if it was ok or not
[08:54:03 CET] <Mateon1> Hello, I want to create a timelapse from a video, or basically speed up the video by a certain factor. How can I do that?
[08:54:19 CET] <Mateon1> Everything I could find on Google was creating timelapses from series of images
[08:54:42 CET] <c_14> use the setpts filter?
[08:54:59 CET] <Mateon1> In other words, I want to take every 10th frame or so from the original video, and create a new video at 60fps from those frames
[08:55:12 CET] <c_14> https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
[08:55:16 CET] <c_14> then just drop excess frames
[08:55:27 CET] <Mateon1> I'll take a look
[08:57:20 CET] <Mateon1> Awesome, that seems like what I'm looking for
[08:57:23 CET] <Mateon1> Thanks
[09:08:32 CET] <Mateon1> Uh, it seems to work, kindof. The video is faster, but it still has the original length. So, the video stops at 1:44 but the player claims it's 52:03
[09:08:44 CET] <Mateon1> How do I make the video length match up properly?
[09:11:17 CET] <c_14> audio?
[09:12:19 CET] <Mateon1> Yes, that seems to be the audio's fault
[09:12:48 CET] <furq> -af atempo to speed up the audio or -an to drop it
[09:12:50 CET] <c_14> Either speed up the audio as well, get rid of it entirely, or cut it off when the video ends (atempo filter, -an, and -shortest respectively)
[09:14:37 CET] <Mateon1> c_14, furq: Cool, I'll try -an
[10:28:27 CET] <mbarisa_> hi guys, I managed to get -ldl running, but I don't know why openssl is still not linking, if someone has an idea why this is happening please let me know. here is paste: http://pastebin.com/JWyAM3sA
[10:33:48 CET] <mbarisa_> false alarm, still -ldl not found
[12:17:40 CET] <madskillz> Hi how to make ffmpeg with custom demuxer , changes in matroskadec.c - http://pastebin.com/fzAaQ8xm
[13:11:26 CET] <durandal_1707> madskillz: use your text editor
[13:13:43 CET] <madskillz> Text editor ?
[13:13:47 CET] <madskillz> For what u mean
[16:22:07 CET] <madskillz> any help
[16:49:05 CET] <DHE> if you can't understand what to do yourself, you probably shouldn't be trying it yourself.
[16:53:59 CET] <madskillz> Then for wht is this irc space use of ? If you guys cant help and only taunt.
[16:58:13 CET] <kurufu> This irc is for afking in.
[17:07:10 CET] <ZexaronS> madskillz, it was barely morning in USA
[17:42:41 CET] <madskillz> Sorry for my outburst , but I just need some answers.
[18:19:46 CET] <daslicht> is it normal that when you convert a mp4 to ogv and webm , they will have slightly different colors ?
[18:20:12 CET] <daslicht> or is there a way to even that out ?
[18:32:26 CET] <josuebc> Hi there. I've been trying to add a custom header to ffmpeg but using -header does not have any influence on this. Is there any other way to do it?
[18:50:53 CET] <BtbN> a custom header?
[18:56:43 CET] <DHE> like an HTTP header in a fetch?
[18:58:00 CET] <josuebc> BtbN: DHE: I would like to read an RTSP stream that uses an "If-Match" header. Just want to add that header.
[19:05:46 CET] <DHE> from a quick inspection of the source code says no you can't add arbitrary headers
[19:06:00 CET] <josuebc> DHE: Bummer, thanks.
[19:06:26 CET] <DHE> though if you really need it, the source code looks pretty straight-forward
[19:06:41 CET] <DHE> if you're okay with building your own copy
[19:07:23 CET] <klaxa> a nice developer would probably even send a patch to the ML :)
[19:07:52 CET] <josuebc> That would be nice. I'll try to make some time to do that.
[19:08:39 CET] <klaxa> i'm personally quite familiar with http.c in libavformat, so if you have questions chances are i could know something if you are having troubles
[19:08:57 CET] <josuebc> klaxa: Thanks :)
[19:11:17 CET] <klaxa> huh, according to the docs, -headers exists
[19:11:20 CET] <klaxa> https://ffmpeg.org/ffmpeg-protocols.html#http
[19:11:41 CET] <klaxa> anyway, gotta go, back later though
[19:13:12 CET] <DHE> klaxa: it's my understanding that the RTSP engine overrides it with its own headers for its operation, unless I misunderstand how it works
[19:54:52 CET] <josuebc> DHE: -user-agent works but not -headers
[19:57:10 CET] <josuebc> DHE: I do see this: Reading option '-headers' ... matched as AVOption 'headers' with argument 'If-Match: root::1111'.
[21:04:24 CET] <goldkatze> Hi :-)
[21:05:48 CET] <goldkatze> I have some videos which have, for instance, a start in portrait, later camera rotated to landscape, finally camera rotated back to portrait.
[21:07:41 CET] <goldkatze> When viewing these, of course, the landscape part will be 90 degrees off. I am aware of vidstab and deshake, transpose and rotate. However, I cannot find a filter suitable for rotating this, such that the resulting video is, eg, 1920x1920 and a 1920x1080 picture rotates inside, such that everything remains upright.
[21:07:51 CET] <goldkatze> Any suggestions on how to achieve this?
[21:59:07 CET] <chrishell> hello out there, since Debian changed to ffmpeg I have some performance issues with my old hardware (thinkpad X60). Is there something I can improve? ffprobe: https://paste.debian.net/908155/
[22:01:17 CET] <JEEB> I'd be surprised if something was due to the Libav->FFmpeg switch, but if that really is built for i386 then it's lacking a whole lot of possible optimizations. at least I don't think I spot --disable-asm ?
[22:03:09 CET] <BtbN> 32bit Debian still builds everything for i386 I think, which is a good reason for stuff to be slow.
[22:03:23 CET] <JEEB> in general if you can run 64bit, you should. it's not like old asm in general gets removed, but new asm as a general rule only gets written for 64bit intel arch now
[22:03:32 CET] <JEEB> BtbN: at least that doesn't disable manual optimizations
[22:03:54 CET] <BtbN> There's also a lot of amd64-only hand-written asm
[22:04:59 CET] <JEEB> which is what I was referring to
[22:05:18 CET] <JEEB> of course (in general) old asm doesn't get removed, so things shouldn't become slower
[22:06:07 CET] <JEEB> exceptions do happen, f.ex. in 2011 the AVC decoder got slower because a bug was found in it that required making it less dumb (fast)
[22:12:12 CET] <chrishell> okay is there anything I can do to circumvent the 64bit routines?
[22:12:47 CET] <furq> 21:03:09 ( BtbN) 32bit Debian still builds everything for i386 I think, which is a good reason for stuff to be slow.
[22:12:51 CET] <furq> stretch requires i686
[22:12:58 CET] <furq> jessie is still i386 though
[22:13:37 CET] <furq> er, jessie is 586
[22:13:40 CET] <furq> https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html
[22:16:56 CET] <chrishell> fair enough, my X60 provides a Core Duo
[22:18:52 CET] <chrishell> so it's not that old
[22:47:53 CET] <chrishell> okay so there is nothing I can do about it?
[23:09:40 CET] <kurufu> Are there any articles or examples of muxing already encoded video and audio frames with ffmpeg? Preferably with some explanation on properly setting pts/dts and the muxer. Note the encoded frames not coming from an ffmpeg encoder so I cant just use muxing.c as an example.
[23:10:27 CET] <kurufu> I've gotten the audio/video to kinda work. But only in like ffplay which shows an ever growing desync between audio and video which im not aware of how to debug let alone fix.
[23:39:25 CET] <arog> hello
[23:41:37 CET] <arog> i have not done a lot of work with ffmpeg but I have a very basic question. I have a custom file format that has a bunch of images and the timestamp of that image. The timestamp differences are something like: 0, 32ms, 39ms, 31ms, 29ms, 33ms, etc.  IE: it is not a constant 15/30/60fps  but varying. I want to convert it into a steady 60fps.
[23:42:15 CET] <arog> my plan was: push frame X and record that time. do time += 16ms and check if the next frame is in that time, if it is push the next frame, if not, push the previous frame and time += 16ms again.
[23:42:24 CET] <arog> would something like that be doable with libav*?
[23:53:16 CET] <madskillz> Hi
[23:53:16 CET] <arog> i found concat but is there some sort of functionality to call that in code rather than a bash script
[23:53:53 CET] <arog> oh maybe i should ask in libav :)
[23:54:37 CET] <madskillz> Can someone help me with compiling libsox on ubuntu using zeranoe MingGW-w64 Build Script 3.6.7 ?
[23:56:04 CET] <madskillz> I want to know the cmake command to use for compiling
[23:56:55 CET] <arog> sorry im not familiar with that
[23:57:36 CET] <madskillz> can you tell me the cmake command for libsox natively ?
[23:57:43 CET] <madskillz> without the script i mean
[23:58:32 CET] <arog> sorry dont know
[23:59:51 CET] <madskillz> somebody will know right ?
[00:00:00 CET] --- Wed Jan 11 2017

More information about the Ffmpeg-devel-irc mailing list