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

burek burek021 at gmail.com
Fri Dec 21 03:05:02 EET 2018


[01:00:09 CET] <orion> Hi. I am running ffmpeg in this way: ffmpeg -i foo.webm -f image2pipe -vf fps=1/600 pipe:1 | test.py <-- How does ffmpeg signal the end of one frame and the beginning of another?
[01:06:28 CET] <klaxa> don't think it does? images should include information about their size? if not, simply scanning for headers should work
[02:03:43 CET] <ntd> i have this cctv solution using the ffmpeg api for captures
[02:03:45 CET] <ntd> zoneminder
[02:04:14 CET] <ntd> some cameras don't make the audio stream available along with video when doing rtsp
[02:04:49 CET] <ntd> so i have it pull the video stream then find some option to add a second inout for audio
[02:05:14 CET] <ntd> "-i" isn't a support option :P
[02:11:50 CET] <relaxed> ntd: how are you getting the audio?
[02:12:06 CET] <ntd> i can ffplay it straight from the source
[02:12:23 CET] <ntd> but zoneminder won't let me deifne to sources for the same minitor
[02:12:34 CET] <ntd> two sources
[02:13:13 CET] <relaxed> you can have two inputs (-i)
[02:13:31 CET] <ntd> yeah
[02:13:56 CET] <ntd> but the ffmpeg api ZM is built on doesn't let you add two inputs
[02:14:42 CET] <relaxed> sounds like you need support from zoneminder
[02:15:41 CET] <ntd> the extra "-i" option isnt't supported
[02:15:55 CET] <ntd> any other way to specify pulling sep source?
[03:27:12 CET] <saml_> I want to combine a video and an audio. And loop the video until the audio finishes.
[03:27:46 CET] <saml_> ah there's loop filter and -shortest
[10:08:43 CET] <th3_v0ice> Does FFmpeg still support preset files?
[10:10:32 CET] <furq> th3_v0ice: https://ffmpeg.org/ffmpeg.html#Preset-files
[10:11:02 CET] <th3_v0ice> Yeah, found it, was confused by some other info. If I use -fpre I should be able to specify the full path to the preset right?
[10:11:34 CET] <furq> probably
[10:11:38 CET] <furq> i've not used ffprests since about 2011
[10:11:40 CET] <furq> e
[10:12:03 CET] <th3_v0ice> Why is that?
[10:12:43 CET] <furq> i just don't have any reason to use them
[10:12:47 CET] <furq> the x264 default presets work fine for me
[10:12:58 CET] <furq> and i never encode anything else
[10:14:07 CET] <th3_v0ice> Ok, I thought there was some other problem with it :)
[13:25:44 CET] <k-man> i'm trying to convert some mp3 to m4a, but i get this error about framerate too high: https://hastebin.com/derutirape.bash
[13:25:49 CET] <k-man> any idea what I'm doing wrong?
[13:28:06 CET] <furq> k-man: add -vn
[13:29:31 CET] <furq> or upgrade your ffmpeg, cover art in m4a was added fairly recently iirc
[13:29:42 CET] <k-man> oh is that the issue?
[13:30:01 CET] <furq> yeah ffmpeg treats cover art as a single-frame video stream
[13:30:32 CET] <furq> so sometimes this sort of thing happens
[13:30:38 CET] <furq> https://trac.ffmpeg.org/ticket/2798
[13:30:40 CET] <k-man> thanks furq
[14:01:11 CET] <k-man> furq, so i built at new version of ffmpeg but it still wouldn't work without the -vn
[14:02:35 CET] <k-man> oh, i would need to use the -c option? maybe -cv ?
[14:06:24 CET] <furq> maybe -c:v png
[14:06:31 CET] <furq> or -c:v copy
[14:39:25 CET] <Sunger_> hello
[14:39:56 CET] <Sunger_> im having trouble installing ffmpeg 4.1 on debian 9
[14:40:06 CET] <Sunger_> where can I find some help ?
[14:46:19 CET] <pink_mist> maybe a debian-related channel? I don't rightly know
[14:49:54 CET] <iive> Sunger_, what's the problem?
[14:51:48 CET] <Sunger_> after installing the package I came up with no configuration
[14:51:57 CET] <Sunger_> no encoders
[14:52:21 CET] <Sunger_> ony the raw ffmpeg with codecs
[14:53:11 CET] <Alina-malina> how to capture video desktop and sound from my speakers with ffmpeg?
[14:57:56 CET] <Alina-malina> https://pastebin.com/raw/tRaAwiwu  this is my error
[15:38:46 CET] <relaxed> Alina-malina: maybe it's just ...:audio="Stereo Mix"
[15:39:34 CET] <Alina-malina> relaxed, [dshow @ 00000000005f3080] Could not find video device with name [UScreenCapture] among source devices of type video.
[15:39:35 CET] <Alina-malina> video=UScreenCapture:audio=Stereo Mix: I/O error
[15:40:59 CET] <relaxed> you're going off of https://trac.ffmpeg.org/wiki/Capture/Desktop ?
[15:43:05 CET] <Alina-malina> i guess so
[15:44:31 CET] <relaxed> try the example with two inputs (-i)
[15:45:35 CET] <Alina-malina> no, still same error
[15:45:44 CET] <Alina-malina> i think UScreenCapture is wrong
[15:46:30 CET] <Alina-malina> relaxed, ffmpeg -f gdigrab -framerate 30 -i desktop output.mkv this works, but no sound
[15:48:08 CET] <Alina-malina> relaxed, and its awful quality tbh
[15:55:44 CET] <relaxed> I don't use Windows, so I'm just stabbing in the dark. For higher quality see https://trac.ffmpeg.org/wiki/Encode/H.264
[16:22:18 CET] <saml> is it difficult to write a filter?
[16:23:03 CET] <saml> using trim many times and concat  to exclude many portions of a video is too slow  probably because each trim filter starts seeking from the beginning
[16:23:29 CET] <saml> so, I want to write my own filter that scans the video once, cut them to pieces, and concat
[16:23:36 CET] <saml> i'll name it cutcat
[16:24:44 CET] <saml> ffmpeg -i a.mp4 -filter_complex '[0:v][0:a]cutcat=0 1 4 9 10 40[v][a]' -map '[v]' -map '[a]' out.mp4
[16:25:24 CET] <saml> cutcat takes even number of floats. it'll include segments at (0, 1), (4, 9), (10, 40)  seconds of a.mp4
[16:25:29 CET] <Mavrik> Take a look at vf_select.c to see how to write a filter that only selects certain segments.
[16:26:21 CET] <Mavrik> and other filters (they're named vf_<filtername>.c in source)
[16:26:31 CET] <saml> Mavrik, once I write a filter, how do I compile it? do I put my .c file to libavfilter/* and rebuild ffmpeg?
[16:26:51 CET] <saml> i should search online first
[16:27:06 CET] <Mavrik> Source is your best friend in this case :)\
[16:27:19 CET] <Mavrik> I think it should be picked up automatically, but grep for vf_source.c and see if has to be listed somewhere.
[16:27:29 CET] <saml> https://github.com/FFmpeg/FFmpeg/blob/master/doc/writing_filters.txt
[16:27:49 CET] <furq> you could do this with select and setpts fwiw
[16:28:09 CET] <furq> but i guess your thing would have nicer syntax
[16:28:16 CET] <saml> https://gist.github.com/saml/312f3a11b8db3a64c0ab1a17b4b6b6d4  this is what i'm doing
[16:28:25 CET] Action: saml reads manual for select
[16:29:45 CET] <furq> -vf select=between(t,9.8,10.283)+between(t,11.55,14.983)+between(t,16.617,22.484),setpts=PTS-STARTPTS
[16:29:55 CET] <furq> plus the same thing again with aselect and asetpts
[16:30:17 CET] <saml> whoa
[16:33:08 CET] <furq> actually i guess that'd need to be setpts=N/(FR*TB)
[16:50:11 CET] <saml> what is timebase, TB? is that in seconds?
[16:57:10 CET] <saml> ah my ffmpeg was a bit old and didn't have FR but had FRAME_RATE
[17:01:09 CET] <saml> hrm using select or trim and concat  yields pretty similar time. I thought select would be faster
[17:01:32 CET] <saml> looks like each between(t,A,B)  starts seeking from the beginning as well
[17:06:32 CET] <saml> now, I want to create a summary of video, selecting a  couple of seconds of each scene. scene change detection is also select filter, right?
[17:06:50 CET] <saml> select='gt(scene\,0.4)'
[17:08:47 CET] <kepstin> hmm, the 'scene' detection will only match single frames. the challenge would be figuring out how to include several seconds of following video too (I'm not sure where to start with this, tbh)
[17:09:01 CET] <furq> 16:01:32 ( saml) looks like each between(t,A,B)  starts seeking from the beginning as well
[17:09:04 CET] <furq> it doesn't
[17:09:07 CET] <furq> and trim shouldn't either
[17:09:11 CET] <furq> but both of them will decode the entire file
[17:09:16 CET] <saml> "select='gt(scene,0.4)',showinfo"
[17:09:38 CET] <saml> to get timestamps. then I parse stderr and add few seconds to each
[17:09:40 CET] <furq> i don't think you can make lavfi seek forwards
[17:09:46 CET] <saml> and then use select or trim,concat
[17:10:05 CET] <saml> furq, what does seek forward mean?
[17:10:48 CET] <furq> like between(t,0,1)+between(t,100,101) will still decode :02 to 1:39
[17:11:04 CET] <saml> between(t,1,10)+between(t,11,20)      for second between(t,11,20), would it seek from previous (that ended at 10)?
[17:11:09 CET] <furq> no
[17:11:19 CET] <furq> like i said i don't think filters can do that
[17:11:30 CET] <furq> select is just taking what comes from the decoder and comparing the timestamps
[17:12:28 CET] <saml> ah, so decorder decodes entire file.  and for each frame of the file, select filter decides if the frame needs to be included or not
[17:12:40 CET] <furq> something like that yeah
[17:12:44 CET] <saml> so, each between()  will scan all frames?
[17:13:05 CET] <furq> it runs the entire expression for every frame
[17:13:16 CET] <furq> but that's a drop in the ocean compared to actually decoding the entire file
[17:13:17 CET] <saml> or, i guess for each frame, multiple between() clauses are evaluated
[17:13:21 CET] <furq> yeah
[17:16:19 CET] <saml> ffmpeg -i /tmp/a.mkv -an -vf "select='between(t,0,2)+between(t,1,2)',setpts=N/(FRAME_RATE*TB)" out.mkv
[17:16:28 CET] <saml> hrm so between()s  can overlap
[17:17:03 CET] <saml> this is great tool.
[17:17:37 CET] <kepstin> note that if the betweens overlap, it'll add up to '2' instead of '1', which causes different behaviour in the select filter.
[17:18:56 CET] <kepstin> (you might explicitly thow all the betweens into a 'gte(...., 1)' check to about that.
[17:18:57 CET] <furq> it's only different if you have multiple outputs iirc
[17:19:12 CET] <kepstin> hmm, so overflow just sends to the last output?
[17:19:18 CET] <furq> i might be wrong about that
[17:20:29 CET] <kepstin> oh, wow, you can store and retrieve variables in expressions. that's cool.
[17:28:34 CET] <saml> is filter graph turing complete
[17:31:07 CET] <th3_v0ice> Guys, can anyone shed some light on the following issue. The MPEG-TS stream I am outputting using the API is working fine. No errors. But some software that checks the quality of the given stream reports that program clock register (PCR) is not sent and/or is not sent fast enough. Is there something that I am missing while writting the packets to the muxer or this needs to be configured somewhere?
[17:31:07 CET] <th3_v0ice> Thanks.
[17:37:06 CET] <Hello71> saml: only if the input is infinitely long
[17:40:10 CET] <^Neo> Hello friends, say I have a discontinuous HLS feed that I want to capture and ensure smooth playback without PTS jumps. I'm finding that doing `-fflags +genpts` is sometimes insufficient, should I additionally add vsync flags as well?
[17:44:37 CET] <saml> what's an HLS feed?
[17:44:41 CET] <saml> multiple videos?
[17:56:44 CET] <^Neo> @saml, assume just a live HLS playlist that may have discontinuities within the manifest
[17:56:52 CET] <pzy> https://trac.ffmpeg.org/ticket/7589?cversion=0&cnum_hist=11
[17:56:58 CET] <pzy> I love GPL slapfests
[17:57:12 CET] <pzy> anyone want to talk about how annoying NewTek is? :P
[17:57:50 CET] <JEEB> I dunno if they're annoying, and this partially was a problem with whomever let that thing past to begin with. we need better rules
[17:57:55 CET] <saml> ^Neo, not sure if it's relevant.. but when I had to select many segments of a video and concat them to make video shorter, I had to use setpts=N/(FRAME_RATE*TB)
[17:58:19 CET] <JEEB> because it's not an OS component etc
[17:58:28 CET] <pzy> let it past what? there was no way to stop them before it happened unless they happened to care about licensing right?
[17:58:29 CET] <saml> that set the timestamp correct after stitching segments together
[17:58:45 CET] <JEEB> pzy: the fact that the nonfree closed source wrapper was merged
[17:59:44 CET] <pzy> NDI is really cool, I wish NewTek wasn't the company behind it :P
[18:00:11 CET] <JEEB> I think the part that's worst is that they seem to have harrassed open source devs that tried to implement their protocol in OSS
[18:00:33 CET] <pzy> I'm not sure if they've done that recently, but they certainly have in the past
[18:00:35 CET] <JEEB> which once again goes to the thing of "why did the wrapper for the library get merged to begin with?"
[18:00:52 CET] <JEEB> like, if they have a history and their thing is not even open source
[18:01:06 CET] <pzy> I think NDI isn't open source because of all the stolen code :P
[18:01:23 CET] <JEEB> and clearly they have had use of it being in FFmpeg because they can market it being usable through FFmpeg
[18:02:08 CET] <pzy> how does it work for licensing if they use ffmpeg for internal workflows in compiled software they provide?
[18:17:53 CET] <BtbN> From how I understand it, they were primarily upset about that OSS clone clearly using re-labeled code from their SDK, and stuff that was clearly decompiled from their library. But that's just their side of the story, and I haven't heard anything from any of the affected oss devs.
[18:18:53 CET] <BtbN> I also wonder what's so special about NDI. Something like it could be relatively easily implemented with existing OSS tools. Nobody just put the pieces together so far.
[18:19:45 CET] <BtbN> The coded seems roughly similar to mjpeg, and network auto-discovery/multicast streaming (no idea what NDI actually does) isn't magic either
[18:19:48 CET] <BtbN> *codec
[18:20:00 CET] <pzy> it's just mdns
[18:20:23 CET] <pzy> NewTek seems to have vaguely "tried" to make NDI "open"
[18:20:27 CET] <BtbN> The only advantage with implementing NDI itself is the interoperability with a large range of applications
[18:20:30 CET] <iive> avahi implements mDNS
[18:20:33 CET] <pzy> but they are a stodgy 1980s software company who hates their customers
[18:21:08 CET] <BtbN> What do they even make money with, in regards to NDI? Since it's pretty much free?
[18:21:15 CET] <BtbN> I guess it's not free if you yourself make money with it?
[18:21:45 CET] <iive> licensing? backdoors?
[18:24:49 CET] <pzy> they made NDI "free" to push sales of their hardware, mostly
[18:24:57 CET] <pzy> TriCasters etc
[18:25:25 CET] <BtbN> The one time I tried to use it in a bigger setup it had so many little hickups that we never used it again
[18:25:27 CET] <pzy> which is just a Windows 10 machine anyway sooooo
[18:25:33 CET] <BtbN> But I partially blame out network for that
[18:25:48 CET] <pzy> like with all newtek stuff, it's great when it works
[18:26:09 CET] <BtbN> I'm pretty sure one of our links degraded to 100Mbit in that setup
[18:26:21 CET] <pzy> is Andrew Cross idling in here? he seems to be that kind of hand-on guy :P
[18:27:08 CET] <pzy> not an encouraging sign from a software company when bug reports and patches come via their literal President
[18:27:26 CET] <pzy> President, CTO, patchmaker
[18:27:44 CET] <BtbN> Why? I prefer that over a completely detached and clueless management
[18:28:19 CET] <pzy> a few reasons, mostly their depressing lack of version control
[18:28:55 CET] <pzy> of course when they removed the violating ffmpeg from their SDK, the SDK version didn't change, nor did any of their documentation
[18:29:10 CET] <BtbN> Hm? They bumped it from 3.7 to 3.7.1
[18:29:27 CET] <pzy> where on earth did you see that? haha
[18:29:55 CET] <BtbN> On the SDK Download page
[18:30:30 CET] <pzy> ah it's 3.8 now, I didn't notice if they bumped it before
[18:30:43 CET] <BtbN> It was release on the same day the issue came up
[18:30:43 CET] <pzy> I just use their permanent new.tk shortlinks so I guess it's partly my fault :P
[18:31:24 CET] <pzy> new.tk/NDISDK will always be the latest
[18:31:39 CET] <pzy> and it still downloaded as 3.7 iirc
[18:37:27 CET] <pzy> when would the ffmpeg project move forward with removing libndi support if newtek remains silent?
[18:37:55 CET] <BtbN> When enough people agree on it. Which seems to not be anytime soon
[18:38:23 CET] <pzy> great, sounds like they got away with it :P
[18:38:45 CET] <BtbN> It would primarily punish everyone but Newtek to remove it from ffmpeg
[18:39:24 CET] <JEEB> yea but it's a closed source thing that isn't even os stuff or hw driver interfacing
[18:39:41 CET] <JEEB> it's a proprietary protocol
[18:40:30 CET] <JEEB> it boggles the mind that i need to have long winded discussions regarding oss patches but that got in :p
[18:40:52 CET] <pzy> haha
[18:41:34 CET] <pzy> I won't even pretend to understand that whole process, I just think it sucks big companies continue to disrespect open source projects while simultaneously enriching themselves thanks to decades of open source work
[18:41:42 CET] <pzy> same old shit I guess
[19:54:52 CET] <^Neo> regarding OSS, does anyone know how to properly use BMD devices?
[19:55:01 CET] <^Neo> do you have to get a redistributable license through BMD?
[19:55:21 CET] <^Neo> since their SDK is obviously not usable
[19:59:02 CET] <ePirat> why is their SDK not usable?
[20:00:34 CET] <ePirat> I still need to email them and ask for clarification though as their license when downloading the SDK contradicts the license in the header files
[20:01:02 CET] <JEEB> lol
[20:02:17 CET] <ePirat> I guess their intention is that the license when downloading applies to the binaries and files without the license preamble in the SDK only
[20:02:56 CET] <pzy> lol licensing
[20:25:29 CET] <fengshaun> I'm learning ffmpeg's libav api and I'm trying to transcode a video file. So far, I've been able to open streams, get codec info, and decode to raw AVFrame thanks for dranger's tutorial. What are the next steps toward re-encoding the frames (eventually transcoding the entire file) and where should I look for docs? doxygen docs are great, but require some knowledge of what to look for.
[20:28:39 CET] <JEEB> see the transcoding example under doc/examples
[20:29:34 CET] <JEEB> demux -> decoding -> filtering (if applicable) -> encoding -> muxing
[20:31:43 CET] <fengshaun> JEEB, thanks, where are those examples? github sources?
[20:32:11 CET] <JEEB> git.videolan.org ffmpeg repo
[20:32:17 CET] <JEEB> (github is a mirror)
[20:32:39 CET] <furq> fengshaun: https://www.ffmpeg.org/doxygen/trunk/examples.html
[20:32:44 CET] <fengshaun> thanks
[20:33:39 CET] <fengshaun> nice and short examples
[20:33:58 CET] <JEEB> not all of them are nice/best way of doing something but they are examples
[21:39:43 CET] <fengshaun> the send/receive api is definitely nicer than encode/decode functions
[21:41:14 CET] <JEEB> yup
[00:00:00 CET] --- Fri Dec 21 2018


More information about the Ffmpeg-devel-irc mailing list