[Ffmpeg-devel-irc] ffmpeg.log.20160520
burek
burek021 at gmail.com
Sat May 21 02:05:01 CEST 2016
[03:40:51 CEST] <pigga> I am trying to compile a program using ffmpeg. But I get a lot of "undefined reference to vaGetImage" errors.
[03:40:52 CEST] <hid|ninja> hi
[03:41:26 CEST] <hid|ninja> what is an easy command to record audio from my sound card?
[03:41:27 CEST] <pigga> I tried using the flag -lva but the errors stilll remain.
[03:42:15 CEST] <pigga> Any help on this plz ? Im stuck and my project is stalled coz of this
[03:44:07 CEST] <pigga> hid|ninja: https://trac.ffmpeg.org/wiki/Capture/ALSA
[03:47:08 CEST] <hid|ninja> :(
[03:48:32 CEST] <pigga> hid|ninja: ?
[03:49:36 CEST] <hid|ninja> that is the page i'm reading
[03:55:24 CEST] <hid|ninja> pigga: it seems that all my sources are suspended
[03:55:42 CEST] <hid|ninja> when i do `pactl list sources`
[03:56:12 CEST] <hid|ninja> you can see here: http://pastebin.com/QD972sKx
[03:58:19 CEST] <gabi_> hey guys, I have this ffmpeg command http://pastebin.com/vze0gmUq that generate a video from images. the first image is the cover, but it's a problem with youtube. he cut's my youtube at 30s
[03:58:30 CEST] <klaxa> if you are using pulseaudio just use: ffmpeg -f pulse -i default -c:a flac recording.flac then open pavucontrol go to the recording tab and select "Monitor of <your soundcard>"
[03:59:31 CEST] <klaxa> hid|ninja: ^
[04:00:03 CEST] <hid|ninja> i see Lavf56.40.101, klaxa
[04:00:03 CEST] <gabi_> I used mp4, mkv but no results. wrong video length and different images position
[04:00:33 CEST] <klaxa> h-how is that related?
[04:00:45 CEST] <klaxa> *relevant
[04:02:00 CEST] <relaxed> gabi_: use -framerate instead of -r
[04:02:44 CEST] <relaxed> also, you don't need concat
[04:03:59 CEST] <hid|ninja> klaxa: idk, i selected "Monitor of Built-in Analog Stereo" but
[04:04:18 CEST] <hid|ninja> it seems that the sound from the microphone is recorgind
[04:04:32 CEST] <hid|ninja> instead of what comes from the audio card
[04:05:21 CEST] <klaxa> that is weird but not a problem with ffmpeg
[04:05:33 CEST] <hid|ninja> klaxa: could it be vecause of Sources SUPENDED?
[04:05:39 CEST] <hid|ninja> SUSPENDED*
[04:06:17 CEST] <hid|ninja> this is in my previous pastebin
[04:06:24 CEST] <klaxa> hmm no idea, mine are in "RUNNING" state
[04:06:47 CEST] <hid|ninja> that must be it
[04:07:25 CEST] <hid|ninja> in the pactl manpage, it says to do: "pactl suspend-source SOURCE 1|0"
[04:07:40 CEST] <hid|ninja> so here: pactl suspend-source SOURCE 0
[04:08:20 CEST] <hid|ninja> and when i try with: pactl suspend-source alsa_output.pci-0000_00_1b.0.analog-stereo.monitor 0
[04:08:40 CEST] <klaxa> maybe try #pulseaudio ?
[04:08:57 CEST] <hid|ninja> ok i try that
[04:21:16 CEST] <gabi_> relaxed: perfect, but is a problem with the last image. just 1 second for the last image instead 10
[04:24:56 CEST] <gabi_> relaxed: https://www.youtube.com/watch?v=Zoqjyaou-1w
[06:04:28 CEST] <k_sze[work]> erm, what the heck?
[06:04:52 CEST] <k_sze[work]> I just tried encoding Elephant Dreams from the PNG files.
[06:05:19 CEST] <k_sze[work]> There are 15691 files, but ffmpeg somehow encoded 18829 frames!?
[06:10:15 CEST] <c_14> It probably duplicated some of them, so?
[06:10:31 CEST] <c_14> Depending on input and output framerate, that can happen
[06:11:00 CEST] <k_sze[work]> I didn't specify an input frame rate (because they are just png files), but I specified -r 30 for output.
[06:11:23 CEST] <c_14> I believe the default input framerate for the image2 muxer is 25
[06:11:34 CEST] <c_14> it is
[06:12:07 CEST] <c_14> You will notice that 15691/18829 ~= 25/30
[06:12:26 CEST] <k_sze[work]> I see.
[06:15:33 CEST] <c_14> You can either set -framerate 30 as an input option, or remove the -r 30, or just live with it
[06:16:17 CEST] <k_sze[work]> I'll add -r 30 as input, because I want to test how well a device can playback lossless at 30 fps.
[06:16:44 CEST] <c_14> Don't use -r as an input option unless you know what you're doing
[06:16:47 CEST] <c_14> You want -framerate
[06:16:50 CEST] <c_14> They don't do the same thing
[09:58:01 CEST] <alexyecu> Is there any possibility now to create mpegts receiver with dynamic port and get it's port from it after?
[09:58:08 CEST] <alexyecu> avformat_open_input waits until some data will be readed from it, but I need to get opened port and send it to sender side, without it no input will be available.
[09:58:14 CEST] <alexyecu> So I need to open input before any reading, get dynamically allocated port from it, send it to output site, and, after all of that, read input and other usual stuff
[09:58:51 CEST] <JEEB> it might be best to create your own AVIO thing
[09:59:04 CEST] <JEEB> so you open the port, signal it
[09:59:15 CEST] <JEEB> then implement your own read
[09:59:31 CEST] <JEEB> there should be a custom AVIO example
[09:59:46 CEST] <flux> ironspider, so did you get the last-30-seconds-thingy working?
[09:59:46 CEST] <JEEB> AVIO is basically the read(),seek(),write() functions that you can override
[10:00:05 CEST] <JEEB> look under docs/examples or so?
[10:15:16 CEST] <ploop> does anyone know what's causing this to drop frames? https://bpaste.net/raw/e4e7970c11e2
[10:15:41 CEST] <ploop> I ran the same command earlier but lost the output, but after about 5 minutes it was averaging a dropped frame every 6 seconds
[10:18:01 CEST] <c_14> No idea, but you are aware that it isn't burning the subtitles in, right?
[10:18:13 CEST] <ploop> wait, really?
[10:18:32 CEST] <c_14> Specifying a filterchain twice causes the second to override the first
[10:18:40 CEST] <c_14> -vf and -filter:v mean the same thing
[10:19:13 CEST] <ploop> is it possible to prevent them from conflicting?
[10:19:29 CEST] <c_14> If you want to burn the subtitles before scaling prepend the subtitles filter to the filter:v if you want it after the scaling append it
[10:19:34 CEST] <c_14> separate the filters with ','
[10:20:44 CEST] <ploop> so -vf subtitles=filename=01.mkv:si=1,scale=iw*..... ?
[10:24:22 CEST] <c_14> yes
[10:47:01 CEST] <Hababam> hi guys
[10:47:08 CEST] <Hababam> i try to compile ffmpeg with --enable-libquvi
[10:47:16 CEST] <Hababam> but i get an error
[10:47:31 CEST] <spaam> what kind of error is that?
[10:47:38 CEST] <Hababam> Unknown option "--enable-libquvi"
[10:47:41 CEST] <Hababam> so yeah :/
[10:48:00 CEST] <Hababam> i think it;s an valid enable option
[10:48:04 CEST] <Hababam> so i dont get it
[10:50:25 CEST] <spaam> it was removed in 3.0
[10:50:45 CEST] <jkqxz> It was removed. <http://git.videolan.org/?p=ffmpeg.git;a=commit;h=2d40a09b6e73230b160a505f01ed1acf169e1d9f>, <http://ffmpeg.org/pipermail/ffmpeg-devel/2016-January/187710.html>.
[10:51:27 CEST] <Hababam> is there any way to add it ?
[10:51:34 CEST] <Hababam> or is it an lost cause
[10:53:36 CEST] <spaam> it depends how much work you want to do. you can always revert that commit and add it again but you will get some other issues doing that. like security issues. like the commit message say.
[10:53:45 CEST] <Hababam> hmm
[10:54:18 CEST] <Hababam> does any of you guys know how to stream an youtube vid to sdi then
[10:54:30 CEST] <Hababam> without the --enable-libquvi
[10:57:47 CEST] <c_14> you can write a script wrapping youtube-dl -g (-j)
[14:59:07 CEST] <hyponic> does ffmpeg support vaapi hardware accelaration on intel gpu?
[15:00:30 CEST] <jkqxz> Yes.
[15:01:59 CEST] <hyponic> jkqxz is there examples or tutorials i can see that might help me on my way? i am using gstreamer today and it works. so drivers and stuff like that works
[15:03:36 CEST] <jkqxz> Not really. What do you want to do?
[15:06:16 CEST] <jkqxz> (Decode in lavc has been around for quite a while, but support for encoding and command-line usability are both very recent.)
[15:13:06 CEST] <yagiza> Hello!
[15:16:30 CEST] <yagiza> I have a question regarding avformat_query_codec() method. If it returns error, does it mean that I just cannot be sure if this codec could be used with specified format?
[15:29:37 CEST] <hyponic> jkqxz i want to transcode live ts streams to a lower quality ts streams and pipe them to tvh. the piping part i can do.. the transcoding part in ffmpeg is the one i am looking for.
[15:49:46 CEST] <jkqxz> hyponic: That is certainly possible, both through ffmpeg and through libav* APIs.
[15:59:07 CEST] <hyponic> jkqxz can you please explain how to me? or give me an example i can work out from?
[16:05:16 CEST] <jkqxz> hyponic: Through which method? <https://wiki.libav.org/Hardware/vaapi> has some important top-level detail and command-line stuff. For libav* API use, ffmpeg.c and ffmpeg_vaapi.c form the main example use.
[16:07:06 CEST] <hyponic> jkqxz to be honest i am not sure. i just want to replace gstreamer with ffmpeg to transcode 30 streams on a single transcoder.
[16:36:17 CEST] <platzhirsch> I have set -segment_list_flags to +live and turned it off again. In both cases it's served as a playlist with metadata header. I cannot find in source code or documentation what it actually does
[16:40:22 CEST] <c_14> As far as I can tell, it does nothing.
[16:40:35 CEST] <nichego> hello. is there a way to extract a single chapter of a dvd with ffmpeg? (the results i find vai google all depend on first using mplayer to extract the chapter)
[16:40:57 CEST] <nichego> *via
[16:41:07 CEST] <c_14> afaik commandline ffmpeg doesn't support seeking to chapters
[16:41:46 CEST] <nichego> is there way to at least get chapter information (timestamps) using only ffmpeg to supply to -ss and -to?
[16:42:01 CEST] <c_14> ffprobe will dump them
[16:42:32 CEST] <nichego> can ffprobe be run against an iso file or should i first mount it?
[16:44:01 CEST] <c_14> you'd have to mount it, and I don't think FFmpeg actually has DVD support (i.e. dvd layout/metadata/chapters)
[16:44:42 CEST] <nichego> i see. thanks
[16:44:56 CEST] <nichego> mplayer has many deps. i was hoping not to have to install all of them on that machine
[16:45:58 CEST] <c_14> You can probably find some other application that can read/output dvd chapters
[16:46:11 CEST] <nichego> no luck yet
[16:46:45 CEST] <furq> dvdbackup will do it
[16:47:24 CEST] <nichego> seems to be the right tool. thanks
[16:47:42 CEST] <nichego> very few deps, too
[16:48:28 CEST] <c_14> DVDs are terrible though
[16:48:43 CEST] <nichego> yeah, that's why i want to extract the chapter
[16:48:51 CEST] <nichego> not to have to deal with dvd format
[16:49:44 CEST] <c_14> Well, still better than BluRay...
[16:51:59 CEST] <furq> is that opinion based on anything other than the encryption
[16:52:08 CEST] <furq> or the drm in general
[16:52:11 CEST] <c_14> Also the Java menus
[16:52:19 CEST] <furq> oh wow really
[16:52:43 CEST] <nichego> lack of foss tools to deal effectively with either format is usually a bad sign
[16:52:53 CEST] <c_14> And some other stuff I've heard but never really investigated enough to repeat
[16:53:00 CEST] <furq> there are plenty of decent free tools for dvd
[16:53:07 CEST] <furq> maybe not so much open-source though
[16:53:30 CEST] <c_14> There's libdvdnav(read) and libbluray, but I haven't heard good things about either (though I also don't think I've heard bad things about libbluray with exception of the java sandbox)
[16:53:47 CEST] <furq> any particular memories about why libdvdnav is bad
[16:53:53 CEST] <furq> i was considering using it for something
[16:54:01 CEST] <nichego> bd-j is broken even in proprietary player
[16:54:22 CEST] <nichego> every so often for new titles to work the player has to be updated
[16:54:36 CEST] <nichego> this is years after release of (the patent-encumbered) bd-j spec
[16:55:27 CEST] <c_14> furq: I believe it was problems with libdvdnav being very picky as to how it's used etc. Especially concerning it working with/in vlc but not with i.e. mplayer. Though most of that is also with menus. If you just want a title it's not that bad
[16:55:54 CEST] <furq> yeah i was considering writing something for dumping PGCs which has a less annoying ui than dvdbackup
[16:56:06 CEST] <c_14> nichego: BluRay players basically have to be always-online for various reasons, it's pretty terrible
[16:56:07 CEST] <nichego> dvdbackup -sN -eM did just what i wanted, furq. thanks!
[16:56:10 CEST] <furq> so i guess that should be fine
[16:56:36 CEST] <c_14> And if the BluRay player manufacturer ever stops supporting your player, you're SOL
[16:56:45 CEST] <furq> i've never owned a bd player
[16:56:48 CEST] <furq> looks like i made the right choice
[16:56:50 CEST] <nichego> dvd/bd menu handling was removed from mpv for reasons of inconvenience as well
[16:58:58 CEST] <furq> well at least you can rest easy knowing that nobody can watch HD releases of new movies without paying for it
[16:59:10 CEST] <furq> oh wait, no
[16:59:42 CEST] <c_14> There is literally no good way to get HD releases of basically any movie (legally).
[17:00:01 CEST] <nichego> people still watch them without paying
[17:00:09 CEST] <nichego> the premium they lose is menu interaction
[17:00:26 CEST] <nichego> the lack of which many consider to actually be an improvement
[17:00:35 CEST] <furq> and five minutes of unskippable trailers and anti-piracy warnings
[17:00:57 CEST] <nichego> yeah, that famous "infographic"
[17:01:16 CEST] <nichego> this: http://craphound.com/images/ifurapirate.jpeg
[17:01:27 CEST] <c_14> What I always found interesting is that you only get those warnings if you legally acquire the media
[17:01:31 CEST] <furq> "insert dvd" what
[17:01:36 CEST] <c_14> They're addressing the wrong audience.
[17:01:51 CEST] <nichego> it assumes a player device hooked up to a tv, furq. in a home entertainment setting
[17:02:11 CEST] <nichego> the pirate has just burnt a bunch of "scene releases" to dvd
[17:02:22 CEST] <nichego> to watch on their giant tv screen and so on
[17:02:43 CEST] <furq> the top one could have easily just been "watch movie" though
[17:02:51 CEST] <c_14> Or they bought the DVD from their friendly dealer down the road.
[17:03:14 CEST] <nichego> i guess the complaint applies less with netflix and other vod
[17:03:28 CEST] <nichego> which probably explains why they are so immensely popular
[17:03:40 CEST] <nichego> and why optical media is very much dying
[17:03:42 CEST] <furq> well that and it's much cheaper isn't it
[17:03:52 CEST] <furq> assuming you watch a lot of movies anyway
[17:03:58 CEST] <nichego> i have no idea about how they compare in pricing
[17:04:01 CEST] <c_14> Well, it's usually subscription based. But if you watch a lot of movies, yes.
[17:04:09 CEST] <c_14> If you don't, no.
[17:04:44 CEST] <nichego> assuming 15 usd per bluray title you buy off a store once a month you're probably better off with netflix
[17:04:47 CEST] <furq> i think it's about $10/month for the hd plan
[17:04:52 CEST] <c_14> But subscription services have their own range of problems.
[17:04:53 CEST] <furq> so yeah, less than one bd
[17:05:02 CEST] <furq> assuming your isp doesn't throttle it to hell anyway
[17:05:12 CEST] <c_14> Bandwidth, software required to view the stream, region limitations etc
[17:05:21 CEST] <c_14> Does netflix still use flash?
[17:05:29 CEST] <c_14> afaik amazon was Silverlight? at least at some point
[17:05:35 CEST] <furq> i think it uses dash now
[17:06:17 CEST] <furq> and region limitations aren't really unique to subscription services
[17:06:25 CEST] <furq> unless you're comparing it to torrentkrew.tk
[17:06:33 CEST] <c_14> And I'm pretty sure you can't pre-cache videos so if you're ISP slows down at some point, welcome to buffering/and or quality downgrade
[17:07:25 CEST] <c_14> *your
[17:08:31 CEST] <furq> apparently amazon are using dash as well now
[17:09:01 CEST] <c_14> Progress is sometimes kind of amazing.
[17:10:08 CEST] <furq> that big controversy over html5 eme made me laugh
[17:10:15 CEST] <furq> as if we're going to vote for people to carry on using silverlight
[17:14:56 CEST] Action: c_14 would prefer a world without DRM. Doesn't help anyway.
[17:16:11 CEST] <nichego> drm can work. they'll just have to push the envelope to remove user programmability from computers :)
[17:16:31 CEST] <nichego> why would you want a user programmable "device" anyway
[17:16:56 CEST] <c_14> Because that's what I get paid to do?
[17:17:07 CEST] <nichego> (i'm being sarcastic)
[17:17:12 CEST] <c_14> (I know)
[17:17:18 CEST] <furq> (i like parentheses)
[17:17:26 CEST] <nichego> (sorry)
[17:17:32 CEST] <c_14> (You (should (try (lisp))))
[17:17:40 CEST] <furq> #f
[17:17:42 CEST] <nichego> (car truck)
[17:18:04 CEST] <JEEB> I still have a quote around from the time my first encoder was in review
[17:18:19 CEST] <JEEB> < JEEB> man, I feel naked when I start losing parenthesis
[17:19:10 CEST] <nichego> hehe
[17:19:11 CEST] <Satao> Hello all! I'm having some issues with file input loop. I want to loop an mp4 and stream it, but when it goes for the first loop, it presents a "Resource temporarily unavailable"
[17:19:20 CEST] <Satao> using -stream_loop -1
[17:21:00 CEST] <nichego> is it possible to see your full ffmpeg invocation, Satao?
[17:21:17 CEST] <JEEB> looping is a horrible hack IIRC, my friend got that too and since I'm busy at work I haven't gotten to seeing what's going wonk-wonk
[17:21:36 CEST] <Satao> here you have the full output http://pastebin.com/6E07zSzp
[17:21:45 CEST] <JEEB> (or actually there's multiple ways to do looping and the issues range from timestamps not properly going forward to that error depending on what you're doing)
[17:21:53 CEST] <nichego> https://video.stackexchange.com/questions/12905/repeat-loop-input-video-with-ffmpeg
[17:22:08 CEST] <nichego> someone wrote an explanation of what can go wrong
[17:22:12 CEST] <JEEB> it's also container specific if you get those issues IIRC
[17:22:20 CEST] <JEEB> tl;dr - fun for the whole family
[17:22:25 CEST] <nichego> " use container for input file without PTS limits (streaming container). "
[17:22:56 CEST] <JEEB> I will have to see if I can look into proper looping at some point since that's something that's been often requested
[17:23:23 CEST] <nichego> streaming webm instead may solve it for now
[17:24:12 CEST] <Satao> tried mp4 and mkv
[17:24:33 CEST] <nichego> try -f webm out.webm ?
[17:25:03 CEST] <nichego> or -f webm <output thing>
[17:25:17 CEST] <Satao> I tried in the input... the out was always ismv
[17:26:02 CEST] <nichego> for the input the solution suggests using -f mpegts
[17:27:21 CEST] <Satao> will convert the mp4 to ts and try again
[17:28:28 CEST] <nichego> another solution suggest '-fflags +genpts'
[17:28:43 CEST] <nichego> with 2.8.4 (and later i presume)
[17:31:00 CEST] <Satao> tried that one too
[17:31:15 CEST] <Satao> the problem is that the error is generic, doesn't point me anywhere
[17:31:30 CEST] <Satao> though of locked file
[17:31:58 CEST] <nichego> well, the source of it seems to be identified now
[17:32:23 CEST] <nichego> is an issue of trying the workarounds offered
[17:33:54 CEST] <Satao> indeed
[17:34:05 CEST] <Satao> thanks for the pointers
[17:36:00 CEST] <Satao> also found a patch for libav for timestamp offset when -f ismv
[17:36:05 CEST] <Satao> https://github.com/mstorsjo/libav/commit/ee5b19a63456cd7e3c2671200d4b6335c34490b9
[17:47:47 CEST] <Satao> update... apparently it worked changing the container to mpegts
[17:48:01 CEST] <Satao> many thanks for the help
[17:49:18 CEST] <pgorley> I compiled ffmpeg (./configure, make and sudo make install) on Mac and ffmpeg crashes because it can't find the CoreImage library
[17:49:51 CEST] <c_14> did you set LDFLAGS while building?
[17:49:57 CEST] <pgorley> Nope
[17:50:26 CEST] <c_14> Does `ldd ffmpeg' complain about the missing library?
[17:53:49 CEST] <pgorley> c_14: just checked and nope, it doesn't complain
[17:54:21 CEST] <c_14> what's coreimage even used for... Do you have avfoundation enabled?
[17:55:54 CEST] <pgorley> How do I check that? (I'm a total newbie when it comes to Mac)
[17:56:02 CEST] <nichego> cheers, Satao
[17:56:05 CEST] <c_14> It should have been part of your configure line
[17:56:28 CEST] <nichego> coreimage does on os x what imagemagick does on linux, i believe
[17:57:39 CEST] <c_14> Hmm, videotoolbox at least is autodetect. So it might be that
[17:57:51 CEST] <c_14> do you still have your config.log ?
[17:58:24 CEST] <pgorley> AVFoundation is listed under the 'enabled indev' section in the configure output
[17:58:43 CEST] <nichego> why not use homebrew to get ffmpeg on osx, pgorley?
[17:59:13 CEST] <pgorley> I should, to be honest
[17:59:21 CEST] <pgorley> I'll try that instead
[17:59:24 CEST] <nichego> it's cleaner. easier to install and remove
[18:00:08 CEST] <nichego> seems like coreimage is equivalent to gegl on linux
[18:02:21 CEST] <pgorley> brew can't write to /usr/local/Cellar and sudo brew is saying it's not recommended/supported
[18:02:54 CEST] <nichego> that must be a minor homebrew issue
[18:03:45 CEST] <nichego> pgorley: https://stackoverflow.com/questions/4804169/installing-in-homebrew-errors
[18:04:48 CEST] <nichego> so they say do chown -R $USER /usr/local
[18:05:33 CEST] <nichego> or more conservatively chwon $USER /usr/local/Cellar
[18:06:38 CEST] <pgorley> That solved that problem, but now I have this: "Permission denied - /Library/Caches/Homebrew/Formula/ffmpeg.brewing"
[18:06:52 CEST] <furq> the second answer on that page seems much less dreadful than the first one
[18:08:11 CEST] <nichego> pgorley: did you install homebrew as a different user than your current?
[18:08:42 CEST] <pgorley> Not sure, I didn't set up this Mac, I'm only using it for testing right now
[18:08:54 CEST] <nichego> presumably the same solution applies: sudo chown -R $USER /Library/Caches/Homebrew/
[18:09:16 CEST] <nichego> if homebrew existed prior it might have been installed as a different user
[18:09:30 CEST] <nichego> now you're making it hard for that user to do their thing in the future
[18:09:44 CEST] <nichego> serves them right for lending your their pc :)
[18:10:01 CEST] <pgorley> Hahaha
[18:10:54 CEST] <pgorley> There we go!
[18:11:20 CEST] <pgorley> Still looking for CoreImage
[18:12:01 CEST] <c_14> try explicitly disabling videotoolbox?
[18:12:28 CEST] <pgorley> But videotoolbox is exactly what I want to test lol
[18:12:31 CEST] <nichego> if it doesn't find coreimage it should compile without
[18:13:17 CEST] <nichego> if you want to compile with coreimage you should install at least the headers apparently
[18:16:03 CEST] <nichego> pgorley: https://discussions.apple.com/thread/974739?tstart=0
[18:16:23 CEST] <nichego> the library and headers comes as part of apple developer tools
[18:29:37 CEST] <hid|ninja> hello
[18:29:42 CEST] <hid|ninja> i'd like to record all sounds from my audio card
[18:29:49 CEST] <hid|ninja> but it seems my sources are all in "SUSPENDED" state
[18:29:57 CEST] <hid|ninja> in pactl manpage, it says to type: `pactl suspend-source SOURCE 0|1`
[18:30:08 CEST] <hid|ninja> so here, when i type: `pactl suspend-source alsa_output.pci-0000_00_1b.0.analog-stereo.monitor 0`
[18:30:15 CEST] <hid|ninja> but it seems my sources are all in "SUSPENDED" state
[18:30:37 CEST] <hid|ninja> it says: Failure: Invalid argument :(
[18:31:00 CEST] <nichego> can't you use a gui tool to do the same?
[18:31:14 CEST] <nichego> install pavucontrol and try with that
[18:31:27 CEST] <hid|ninja> i did it with pavucontroll too
[18:31:34 CEST] <nichego> what happened then?
[18:32:52 CEST] <hid|ninja> nichego: so, unde Recording, i choose "Monitor of Build-in Audio Analog Stereo"
[18:32:58 CEST] <hid|ninja> under*
[18:33:27 CEST] <nichego> as default recording source, yes
[18:33:36 CEST] <nichego> then you fired up your recording application and what happened?
[18:34:37 CEST] <hid|ninja> nichego: it records something but the audio quality is very low
[18:34:52 CEST] <hid|ninja> as if it were recorded directly from microphone
[18:35:30 CEST] <hid|ninja> but the alsa_output must be the sound card output
[18:37:10 CEST] <hid|ninja> my 2 sources are: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor and alsa_input.pci-0000_00_1b.0.analog-stereo
[18:37:40 CEST] <hid|ninja> alsa_output is the audio card and alsa_input is the microphone (laptop)
[18:40:33 CEST] <nichego> hid|ninja: are the recording settings of your audio recorder adequate?
[18:40:41 CEST] <nichego> do you play back after recording?
[18:43:03 CEST] <hid|ninja> nichego: the command i type is: ffmpeg -ar 44100 -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor output.wav
[18:44:00 CEST] <hid|ninja> so i play it back after recording with mpv and the sound is awful
[18:44:12 CEST] <nichego> hid|ninja: try -i default
[18:45:48 CEST] <nichego> hid|ninja: after setting default source using pavucontrol to 'Monitor of blah blah' of course
[18:51:34 CEST] <hid|ninja> nichego: https://transfer.sh/fQs0n/blabla.png
[18:51:52 CEST] <hid|ninja> the sound is very low
[18:52:51 CEST] <nichego> hid|ninja: that is output devices, not input
[18:53:53 CEST] <hid|ninja> nichego: but my input devices are microphones
[18:54:35 CEST] <nichego> hid|ninja: is the 'low quality' issue gone now?
[18:55:23 CEST] <hid|ninja> https://transfer.sh/nZfiX/scrot.png nichego
[18:56:06 CEST] <nichego> hid|ninja: it's set to 'all except monitors'
[18:56:12 CEST] <nichego> hid|ninja: it should be set to 'all devices'
[18:56:58 CEST] <hid|ninja> WOW
[18:57:01 CEST] <hid|ninja> wait a sec
[18:58:45 CEST] <hid|ninja> nichego: thank you very much my friend :D
[18:58:53 CEST] <nichego> you're welcome
[19:06:58 CEST] <lostquelana> Hi, I when I try do ./configure from the version off of github it says "gcc is unable to create an executable file." and "C compiler test failed." I made a gist of my config.log here: https://gist.github.com/LostQuelana/8ee0d4cb606f453359821c14bfc0f573
[19:08:27 CEST] <nichego> lostquelana: you don't have glibc installed. what dev environment is that?
[19:08:29 CEST] <ln-> lostquelana: are you able to compile anything else?
[19:09:10 CEST] <ln-> (let me guess it's ubuntu and lostquelana has installed gcc but not build-essential)
[19:09:28 CEST] <lostquelana> ...yes
[19:09:35 CEST] <ln-> see
[19:09:35 CEST] <lostquelana> I just realized I never did that
[19:10:09 CEST] <lostquelana> I'm installing that right now
[19:10:33 CEST] <ln-> what we can learn from this is: when configure tells you gcc is unable to create an executable file, a likely cause is that gcc is unable to create executables in general.
[19:10:35 CEST] <nichego> (tangent: what's with people posting their entire build logs when the error is in the last 20 lines)
[19:11:11 CEST] <lostquelana> Well the motd thing at the top made me think you guys needed the whole thing
[19:11:31 CEST] <nichego> no fault on you, really
[19:11:51 CEST] <nichego> if a build log looks like greek to the user they are kind of justified in posting all of it
[19:12:08 CEST] <ln-> what if they are greek themselves?
[19:12:23 CEST] <nichego> then make greek martian runes
[19:12:29 CEST] <lostquelana> You should say dead Latin
[19:12:38 CEST] <lostquelana> people might know greek martian runes
[19:12:51 CEST] <nichego> people might know dead latin, too
[19:12:59 CEST] <nichego> people in general might know anything...
[19:13:05 CEST] <nichego> it's scary
[19:13:31 CEST] <furq> ecce! in picture est puella, nomine cornelia
[19:13:35 CEST] <furq> pictura
[19:14:03 CEST] <nichego> veritas liberabit vos
[19:14:17 CEST] <nichego> is that dead or alive?
[19:14:27 CEST] <furq> etiam in pictura est altera puella, nomine flavia
[19:14:47 CEST] <nichego> pictures with girls in them are nice
[19:14:54 CEST] <furq> three years of latin was well worth it
[19:15:03 CEST] <furq> now i can recite the shit out of the first two lines of "ecce! romani" book 1
[19:15:08 CEST] <lostquelana> I don't think anyone ever maintained the liberabit library, so dead
[19:15:53 CEST] <nichego> eh
[19:18:04 CEST] <furq> i want to make a joke about the old witch's ring but i feel like the opportunity has passed
[19:18:08 CEST] <furq> oh well
[19:18:36 CEST] <lostquelana> You could still go for it
[19:19:23 CEST] <furq> it's ok i can achieve much the same effect by mentioning that i was going to make a joke about it
[19:19:32 CEST] <lostquelana> dang
[19:21:54 CEST] <furq> https://la.wikipedia.org/wiki/Eurovisionis_Certamen_Musicum_2016
[19:21:59 CEST] <furq> the dream of the internet age has finally come true
[19:23:35 CEST] <nichego> much of wikipedia is people practicing their second language learning
[19:24:10 CEST] <nichego> it's good to know unda is wave, though
[19:41:47 CEST] <pfelt> anyone around that has experience using ffmpeg to generate mpegts that's readable by dedicated mpeg hardware?
[19:42:07 CEST] <pfelt> i'm seeing high "inter-arrival time" and various other errors in the stream
[19:42:32 CEST] <nichego> pfelt: profiles don't help?
[19:42:56 CEST] <pfelt> i've tried several profiles and my sencore mrd doesn't want to play well
[19:43:08 CEST] <pfelt> if i start an ffmpeg pulling in the mcast strream it looks ok though
[19:43:20 CEST] <pfelt> (oh and i can make it work with mpeg2 vcodec, but not h264)
[19:46:44 CEST] <DHE> inter-arrival time control isn't supported by ffmpeg. I ended up making my own
[19:47:03 CEST] <pfelt> oh yikes :(
[19:49:03 CEST] <DHE> yeah. udp output just kinda shoots packets at the socket
[19:50:27 CEST] <kepstin> x264, in its default mode, will give very inconsistent frame output - it'll sometimes do a bunch of frames quickly, sometimes hold for a bit as it does analysis
[19:50:42 CEST] <kepstin> you could try -tune zerolatency as a workaround (with some video quality loss, obviously)
[19:50:43 CEST] <pfelt> i've tried zerolatency on it
[19:50:47 CEST] <pfelt> :(
[19:50:56 CEST] <kepstin> doesn't make it consistent enough? :/
[19:52:28 CEST] <DHE> kepstin: that's not the issue. when data is submitted to the udp driver it shoots out a series of packets as fast as the NIC can support it.
[19:52:52 CEST] <DHE> real multicast-based transmissions require a very consistent transmission rate, which usually means something like 1 or 2 milliseconds between packets
[19:53:12 CEST] <pfelt> it's really strange on my sencore that even if i change the frame size (with a -s on ffmpeg) it doesn't see the new frame size
[19:53:20 CEST] <pfelt> nor does it change profiles when i play with it
[19:53:42 CEST] <kepstin> yeah, I guess you'd need to (if you using ffmpeg-cli) have ffmpeg write video to a pipe, which goes into another application that does the packet pacing.
[19:53:52 CEST] <DHE> got the parameter order right? the -s option must go between the input file name and the output file name
[19:53:57 CEST] <kepstin> ffmpeg cli kinda works for some realtime stuff, but it's really not designed for it.
[19:53:59 CEST] <pfelt> and yeah. DHE is right. if i do a tcpdump on one of my source udp streams its *extremely* consisten
[19:54:09 CEST] <pfelt> (as my video bridge analyzer also shows)
[19:54:15 CEST] <DHE> sencore? I have one of those.
[19:54:39 CEST] <pfelt> DHE, yeah. we've got a few different models of things from them
[19:55:33 CEST] <pfelt> i've found that ffmpeg is a ton more forgiving with things. i can take the multicast in and do all sorts of stuff with it in ffmpeg, but my hardware stuff chokes
[19:56:38 CEST] <kepstin> ffmpeg seems to, in general, follow that old unix saying of "be liberal in what you accept from others" :)
[19:56:43 CEST] <DHE> yeah I have one of those pipe apps. wrote it myself.
[19:57:06 CEST] <pfelt> DHE, so let me see if i follow
[19:57:12 CEST] <pfelt> ffmpeg outputs to stdout
[19:57:23 CEST] <DHE> I use a named pipe (man mkfifo)
[19:57:34 CEST] <pfelt> you read stdin in 1316 chun\ks and then write it out on a timer?
[19:57:48 CEST] <pfelt> heh. i use a ton of pipes so that i can get a lot of streams going
[19:57:51 CEST] <DHE> sorta. I buffer the input and actually read the PTS/PCR values to determine the bitrate
[19:57:57 CEST] <pfelt> (this particular commadn though is only 4 incoming pipes)
[19:58:30 CEST] <pfelt> how do you determine the right clocking output rate?
[19:59:00 CEST] <pfelt> i've got c code written already to parse most of the mpeg headers
[19:59:51 CEST] <DHE> the PCR basically tells you what the current time should be as it runs. frame size variation will prevent you from treating it literally but you should be able to measure the bitrate from the PCR and select an inter-packet delay from that
[20:00:17 CEST] <DHE> I actually buffer a large amount before sending so that I get a good average number. buffer underflows are bad
[20:00:21 CEST] <pfelt> then i'm guessing you use usleep() or the equivalent in your language?
[20:01:25 CEST] <DHE> I used clock_nanosleep actually. absolute time and the monotonic clock means you can avoid dealing with the scheduler's inaccuracies
[20:01:52 CEST] <pfelt> i've not seen that function. /me googles
[20:01:54 CEST] <nichego> https://serverfault.com/questions/530127/cat-a-fileraw-to-udp-at-specific-bitrate
[20:02:03 CEST] <nichego> you can do it using pv
[20:02:17 CEST] <nichego> poor man's rate control
[20:02:18 CEST] <DHE> nichego: OBJECTION! The bitrate is not consistent enough for that to work
[20:02:30 CEST] <pfelt> hehe
[20:02:44 CEST] <nichego> motion granted
[20:02:46 CEST] <pfelt> sorry. just had images of a courtroom or something
[20:02:47 CEST] <nichego> i know nothing
[20:02:48 CEST] <nichego> please proceed
[20:02:57 CEST] <DHE> pfelt: I was trying to channel Phoenix Wright actually
[20:03:47 CEST] Action: pfelt had to google that too
[20:04:29 CEST] <pfelt> ok. i'm going to go off and do some reading on pts/pcr and see if i can't figure out dhe's program on his own
[20:04:32 CEST] <nichego> you can get almost-cbr with h264, by the way
[20:04:34 CEST] <pfelt> er& on my own
[20:04:47 CEST] <nichego> https://stackoverflow.com/questions/7125446/encoding-h-264-cbr-videos-with-ffmpeg
[20:05:28 CEST] <furq> well presumably DHE's approach works without cbr, which is good because cbr sucks
[20:05:35 CEST] <nichego> true that
[20:05:43 CEST] <DHE> nichego: you can also use -muxrate to get true CBR out of the mpegts format, but it still sucks
[20:06:12 CEST] <nichego> though i believe DHE's method requires ffmpeg output to always overshoot the target rate
[20:06:24 CEST] <furq> as far as i can tell that technique is mostly useful for minimising latency as much as possible
[20:06:48 CEST] <DHE> no. my program will handle any bitrate as long as the VBV settings are sane. eg: the -bufsize:v is a small number like 0.3 seconds worth
[20:07:23 CEST] Action: pfelt quotes star trek: tng. "he's smart. he can make it go!"
[20:07:25 CEST] <nichego> well, you do provision for underflows
[20:07:40 CEST] <DHE> I ended up needing -muxrate because it's how you can force ffmpeg to generate new PTS values. format conversions sometimes doesn't give PCR timestamps except for keyframes
[20:07:58 CEST] <DHE> unless that bug has been fixed
[20:08:05 CEST] <pfelt> i wonder if we can implement this logic into ffmpeg proper.....
[20:10:39 CEST] <kepstin> adding pacing support to the rtp muxer sounds like something generally useful, indeed.
[20:10:56 CEST] <pfelt> does rtp include mpegts
[20:10:57 CEST] <pfelt> ?
[20:11:05 CEST] <kepstin> oh, you're doing mpegts over udp?
[20:11:10 CEST] <pfelt> yep
[20:11:15 CEST] <kepstin> that would be harder to make general :/
[20:11:17 CEST] <pfelt> multicast
[20:11:44 CEST] <nichego> pfelt: does this do anything remotely like what you want: https://obsproject.com/ ?
[20:12:10 CEST] <furq> that only does rtmp and file output
[20:12:22 CEST] <nichego> i see it does streaming, too
[20:12:32 CEST] <furq> yeah, that's rtmp
[20:12:45 CEST] <nichego> mpegts over udp, they say
[20:12:55 CEST] <nichego> there are even bug reports about it: https://obsproject.com/mantis/view.php?id=186
[20:12:59 CEST] <nichego> (resolveD)
[20:13:17 CEST] <furq> that's an input
[20:13:24 CEST] <nichego> oh
[20:13:28 CEST] <nichego> my bad
[20:14:13 CEST] <furq> i'm pretty sure that just uses libavxyz anyway
[20:14:14 CEST] <nichego> apparently vlc is also an option
[20:14:34 CEST] <furq> since it mostly targets rtmp output, which works fine with ffmpeg, i doubt they've written any streaming code for it
[20:14:39 CEST] <furq> i've never used it though so shrug
[20:15:17 CEST] <nichego> sout=#transcode{vcodec=mp2v,fps=30}:std{access=udp,mux=ts,dst=[yourip:yourport]}
[20:15:31 CEST] <pfelt> yeah. so my use case is read in one or more multicast streams, play around with them, then multicast it back out
[20:15:43 CEST] <kepstin> but yeah, my impression is that the mpeg-ts muxer and udp protocol in ffmpeg are sufficiently unintegrated such that it's basically "mpegts sends a stream of bytes" then "udp splits it into packets arbitrarily and sends them as soon as it can"
[20:15:56 CEST] <DHE> kepstin: correct
[20:16:04 CEST] <pfelt> that certainly *feels* how it's working
[20:16:19 CEST] <DHE> which is why I have an mpegts-aware decoder that can find the timestamps, calculate a good rate, and apply it
[20:17:06 CEST] <nichego> did you try vlc, pfelt?
[20:17:10 CEST] <kepstin> i think the only way to solve that in ffmpeg would be to make a new 'mpegtsudp' muxer or something that handles the udp packetization and protocol internally :/
[20:18:11 CEST] <DHE> if there were some way to provide a timestamp (pts of sorts) to the protocol it could handle it better
[20:18:17 CEST] <jkqxz> MPEG-TS in RTP is already there.
[20:19:00 CEST] <jkqxz> It's trivial; just an RTP header with an integral number of MPEG-TS packets after.
[20:20:21 CEST] <kepstin> sure, but that doesn't help when you have equipment that's expecting bare mpegts in udp :)
[20:21:42 CEST] <kepstin> DHE: that would mean either changing the interface between muxer and protocol to be packetized rather than bytestream... or maybe support some kind of interface where every write can have metadata attached or something :/
[20:21:52 CEST] <nichego> actually, mpegtsmux already exists
[20:21:57 CEST] <nichego> in gstreamer
[20:23:22 CEST] <kepstin> nichego: that doesn't help, we already have a mpegts muxer. the issue is how to pace sending the mpegts stream we have as udp packets :)
[20:23:50 CEST] <nichego> yeah, but apparently gstreamer is also ready to do it right over udp
[20:24:02 CEST] <nichego> i have to read further, though
[20:24:11 CEST] <pfelt> maybe i can use gstreamer and just re-packetize...
[20:24:15 CEST] <pfelt> wasteful
[20:24:16 CEST] <kepstin> hmm, interesting that the gstreamer one supports setting an "alignment value" where it ooutputs buffers containing set number of packets
[20:24:16 CEST] <nichego> there is a udpsink
[20:26:33 CEST] <nichego> https://developer.ridgerun.com/wiki/index.php/Using_UDP_Multicast_with_GStreamer
[20:26:56 CEST] <kepstin> yeah, i suppose it probably can be done in gstreamer, although it would probaly require some programming to build an app that sets up a clocked pipeline properly
[20:26:59 CEST] <nichego> there's a queue plugin that can be inserted in the path
[20:30:46 CEST] <ZeuZ> Guys, is it possible to add just one frame to an already created AVI file at the end?
[20:32:20 CEST] <kepstin> ZeuZ: probably. If you encode the single frame to a video file with matching codec, framerate, etc., then you should be able to use the ffmpeg concat demuxer to combine them into a single video stream without re-encoding.
[20:33:43 CEST] <kepstin> (you obviously won't be modifying the file in-place, just writing out a new file with video copied, but it should be fast and lossless)
[20:36:18 CEST] <ZeuZ> kepstin, thanks, will look on how to do it now, be back after informing myself a little
[20:37:23 CEST] <nichego> ZeuZ: https://gist.github.com/amureki/7fb26fa4dfe87736838c
[20:37:49 CEST] <ZeuZ> Got one more question though, I'm trying to use the concat demuxer from a C application, should I ask about that here? or in -devel?
[20:38:04 CEST] <furq> in here
[20:38:11 CEST] <kepstin> nichego: sure, something like that would work, but that requires doing a re-encode since the concat is done in filters.
[20:38:51 CEST] <nichego> then this
[20:38:53 CEST] <nichego> https://stackoverflow.com/questions/18452058/ffmpeg-concat-videos-and-images
[20:38:55 CEST] <nichego> method 1
[20:39:11 CEST] <yagiza> I'd like to ask again my question about avformat_query_codec()...
[20:39:31 CEST] <yagiza> If it returns an error code, what does that mean?
[20:40:10 CEST] <ZeuZ> yagiza, what error code does it return?
[20:40:44 CEST] <nichego> >1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. A negative number if this information is not available.
[20:41:05 CEST] <yagiza> ZeuZ, "Not yet implemented in FFmpeg, patches welcome"
[20:41:09 CEST] <kepstin> so, there's three possible results. "yes", "no", "i don't know" :)
[20:42:20 CEST] <nichego> yagiza: i.e. the thing you want to put in another thing cannot be put in it using ffmpeg right now but maybe it is theoretically possible. if so patches for ffmpeg to do so would be great
[20:43:27 CEST] <kepstin> in practice, you can probably just do if (result > 0) { muxing ok! }; but you could maybe log a message or something on the <0 case.
[20:43:36 CEST] <nichego> it's : return AVERROR_PATCHWELCOME;
[20:43:40 CEST] <ZeuZ> Ok so I totally got lost, in such a short time, :P is there some place I can poach to get some example of using the concat demuxer in a C application?
[20:44:21 CEST] <kepstin> ZeuZ: well, there's always the option of running the ffmpeg cli app from your C program ;)
[20:44:34 CEST] <JEEB> ZeuZ: docs/examples and the general demuxing/decoding example
[20:44:39 CEST] <kepstin> (other than that, I'm unfamiliar, maybe someone else knows)
[20:44:50 CEST] <JEEB> and specify the concat demuxer
[20:45:14 CEST] <nichego> if that's all the c program does you can just write a script
[20:46:24 CEST] <nichego> if it's part of something bigger
[20:46:38 CEST] <nichego> libav example here: https://stackoverflow.com/questions/16282600/how-to-use-libavformat-to-concat-2-video-files-with-same-codec-re-muxing
[20:47:47 CEST] <ZeuZ> nichego, it's part of something else, yes. It grabs an image in a random period of time and then should add that image for one second to a movie, so I should repeat that image at least 24 times if I use 24 fps to get that second of image..
[20:48:00 CEST] <ZeuZ> the idea is getting a photo snapshot of random periods
[20:48:05 CEST] <ZeuZ> then making a montage
[20:48:15 CEST] <nichego> that sounds all doable from a script
[20:48:27 CEST] <nichego> or you can always use pyffmpeg
[20:48:36 CEST] <nichego> c is the last place i'd look to for accomplishing that
[20:48:44 CEST] <ZeuZ> why so?
[20:49:00 CEST] <nichego> it will be overly verbose and very much prone to error
[20:49:05 CEST] <ZeuZ> I ain't good et all with python so I chose something I think I'm more proficient at
[20:49:20 CEST] <nichego> write a bash script then
[20:49:29 CEST] <ZeuZ> :(
[20:49:36 CEST] <ZeuZ> wanted to avoid having pids so high :P
[20:49:55 CEST] <ZeuZ> (don't ask why, its a little project where it doesnt even make sense)
[20:49:58 CEST] <nichego> you're looking to a few hundred loc of c
[20:50:08 CEST] <nichego> versus a couple dozen lines of bash
[20:50:16 CEST] <ZeuZ> still not scared though..
[20:50:32 CEST] <ZeuZ> the libav snippet might also help
[20:50:42 CEST] <furq> if you want to use the libav* avpis then C is your only viable option really
[20:50:46 CEST] <nichego> not a fear issue. a 'how much time you have to waste on debugging' issue :P
[20:51:04 CEST] <furq> i wouldn't trust pyav and i don't think it exposes all of the apis
[20:51:27 CEST] <furq> but yeah i don't see why you'd use the api for this unless you want an excuse to learn the api
[20:51:59 CEST] <ZeuZ> furq, well, I wanted to do it by tomorrow, and I happen to work at my place, so I kinda have time :P not sure if enough to debug it, but sure enough enough to code it and have a working sample by tomrrow
[20:52:06 CEST] <ZeuZ> not fault-proof but still
[20:52:21 CEST] <furq> if you want to capture a bunch of images and then create a montage at the end then you don't need to do anything with concat
[20:52:48 CEST] <furq> you'd only need to do that if you're capturing images continuously and you want to be able to view the movie while it's still running
[20:53:22 CEST] <ZeuZ> I could potentially run it after an hour or so with a script to see the results, I know
[20:53:32 CEST] <ZeuZ> however the idea was to do it as soon as I could
[20:53:43 CEST] <ZeuZ> after all, I'm just plotting in my head, not even sure if possible
[20:54:42 CEST] <furq> i would just capture a bunch of pngs and combine them as needed, but maybe that doesn't fit your use case
[20:54:50 CEST] <furq> if it does then that's significantly easier
[20:56:14 CEST] <ZeuZ> libav questions are welcome here though?
[20:56:23 CEST] <furq> if you mean the libraries then sure
[20:57:38 CEST] <ZeuZ> lemme put up a pseudo-code or scheme and link it from pastebin, maybe you can tell me if it's good enough like to try to implement it, then I'll take a break from being such a nuisance :P
[21:14:32 CEST] <hyponic> is there a wiki or howto for the vaapi transcoding control options?
[21:20:53 CEST] <BtbN> no
[21:21:25 CEST] <nichego> hyponic: intel or nv?
[21:21:46 CEST] <BtbN> nvidia doesn't support vaapi.
[21:22:27 CEST] <hyponic> intel
[21:22:40 CEST] <nichego> hyponic: look up qsv for encode
[21:22:50 CEST] <jkqxz> <https://wiki.libav.org/Hardware/vaapi>
[21:22:53 CEST] <nichego> hyponic: quality will suffer, though
[21:22:59 CEST] <BtbN> Forget about QSV, it's the most horrible hack ever.
[21:23:04 CEST] <nichego> BtbN: vaapi can work with vdpau backend
[21:23:18 CEST] <BtbN> That won't magically add encoding to vdpau though.
[21:23:30 CEST] <BtbN> Also, the vaapi vdpau backend is bad, don't use it either.
[21:24:01 CEST] <BtbN> Since ffmpeg merged the vaapi encoders, there is absolutely no reason to mess with QSV anymore.
[21:24:01 CEST] <nichego> it will not. for encoding on nvidia+linux you'd use nvenc
[21:24:06 CEST] <nichego> but gpu encoding is bad anyway
[21:24:20 CEST] <BtbN> nobody is talking about nvidia though.
[21:24:54 CEST] <nichego> ok
[21:25:29 CEST] <hyponic> BtbN well what should i use for gpu encoding with ffmpeg and intel?
[21:25:40 CEST] <BtbN> The new vaapi encoders.
[21:25:45 CEST] <jkqxz> All hardware encoding is terrible. You use it because it's fast and low power, not because it's good.
[21:26:26 CEST] <hyponic> BtbN new vaapi encoders with ffmpeg? is there info about that anywhere? wiith control options etc?
[21:26:43 CEST] <jkqxz> hyponic: See link I posted above.
[21:26:58 CEST] <BtbN> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/vaapi_encode_h264.c;hb=HEAD
[21:27:01 CEST] <jkqxz> Little has been writte yet.
[21:27:27 CEST] <nichego> when something is written it'll appear in ffmpeg-codecs(1)
[21:27:29 CEST] <nichego> not yet
[21:31:46 CEST] <kepstin> huh, fun. now I know how to get the vaapi encoder to actually work.
[21:32:36 CEST] Action: kepstin just tested it; 80fps 720p encoding while the cpu is 100% busy compiling might be useful for something :)
[21:33:41 CEST] <yagiza> nichego, that says nothing to me
[21:34:29 CEST] <nichego> yagiza: please explain
[21:36:19 CEST] <yagiza> nichego, you know: that routine should return either 1, if the codec could be used with the format, or 0 otherwise.
[21:36:54 CEST] <nichego> yagiza: as you can see in the source it can also return AVERROR_PATCHWELCOME
[21:37:14 CEST] <nichego> that is, when it does not know what you requested is possible
[21:37:17 CEST] <yagiza> nichego, usually, error (rc<0) means that routine failed.
[21:37:36 CEST] <nichego> what convention is this?
[21:37:50 CEST] <furq> also how is this not like that
[21:38:05 CEST] <yagiza> nichego, yes. So, error means, that I just cannot be sure if it's possible, or not?
[21:38:16 CEST] <furq> -1 means that's not currently supported by ffmpeg
[21:38:18 CEST] <nichego> you can interpret it as furq suggests
[21:38:28 CEST] <nichego> "i cannot do my job of telling you whether it is possible"
[21:38:32 CEST] <jkqxz> kepstin: What are you using to get a number that low? Everything core i-type in my experience gets >>100fps 1080p transcode; even a shitty old Bay Trail got 60fps or so.
[21:38:35 CEST] <nichego> which is basically a failure of the routine
[21:38:37 CEST] <furq> 0 means that it'll never be supported because it's known to be against a spec
[21:38:43 CEST] <furq> presumably, anyway
[21:38:53 CEST] <furq> a/against/in violation of/
[21:39:02 CEST] <kepstin> jkqxz: I forgot to enable hwaccel decoding, so it was limited in decoding speed by the fact I was busy doing a compile.
[21:39:29 CEST] <furq> s/^a/s/
[21:40:17 CEST] <jkqxz> Heh, that would do it.
[21:40:24 CEST] <yagiza> furq, are you sure it is like that, or just suppose?
[21:40:42 CEST] <nichego> you can literally read the source and its self-documentation
[21:41:07 CEST] <yagiza> nichego, yes, I looked into source code.
[21:41:32 CEST] <nichego> what is so mystifying about it then?
[21:41:45 CEST] <nichego> if it can tell you what it should it does (0 or 1)
[21:42:11 CEST] <furq> i can't think of any other reason why the information would be unavailable
[21:42:29 CEST] <nichego> lack of knowledge
[21:42:34 CEST] <nichego> hene PATCHWELCOME
[21:42:44 CEST] <nichego> *hence
[21:42:46 CEST] <furq> that's the same reason
[21:42:50 CEST] <kepstin> well, it'll tell you if it'll work (1) or won't work (0 or <0), and why (0 = container, <0 = ffmpeg can't do it yet)
[21:43:00 CEST] <kepstin> seems easy enough.
[21:43:01 CEST] <nichego> lack of knowledge is not the same as knowing it is not possible
[21:43:09 CEST] <nichego> 1 says it is possible definitely
[21:43:10 CEST] <yagiza> furq, according to source code, the reason is that it is really unavailable!
[21:43:15 CEST] <nichego> 0 says it is impossible definitely
[21:43:32 CEST] <nichego> AVERROR_PATCHWELCOME says it is not known to developers at the time
[21:43:41 CEST] <furq> 19:43:27 ( kepstin) in practice, you can probably just do if (result > 0) { muxing ok! }; but you could maybe log a message or something on the <0 case.
[21:43:46 CEST] <furq> this was the best answer
[21:43:47 CEST] <furq> an hour ago
[21:43:56 CEST] <nichego> of course
[21:46:32 CEST] <yagiza> kepstin, according to comments, only 0 means it is impossible right now. Do you really think, that error code means not that function faild, but also negative result?
[21:47:19 CEST] <kepstin> yagiza: the error code implies that it's not implemented in the version of ffmpeg you're currently using, so it won't work.
[21:47:49 CEST] <yagiza> If that's true, most of formats, FFMpeg supports, cannot store any of codecs FFMpeg supports!
[21:48:48 CEST] <kepstin> hmm. you have specific examples of something you'd expect to work but returns the error code?
[21:48:53 CEST] <yagiza> kepstin, 'cause for most of formats that error code returned for all of the codecs.
[21:50:45 CEST] <kepstin> hmm. using the hwaccel decoder only bumped my test transcode from 80 to 92fps. I guess there's some cpu bottleneck in ffmpeg.
[21:50:59 CEST] <yagiza> kepstin, yes. I tried to encode opus into rtp and got some output and no errors. But that function returns for RTP this error for all the codecs, but one.
[21:51:33 CEST] <yagiza> kepstin, and that one isn't opus.
[21:51:49 CEST] <kepstin> yagiza: what are you using for std_complicance right now?
[21:52:04 CEST] <yagiza> kepstin, yes
[21:52:07 CEST] <kepstin> FF_COMPLIANCE_NORMAL?
[21:52:22 CEST] <yagiza> kepstin, yes, I do
[21:52:39 CEST] <nichego> yagiza: can you please paste your code somewhere?
[21:52:56 CEST] <yagiza> nichego, yes
[21:53:11 CEST] <kepstin> you could try with _UNOFFICIAL and see if that makes a difference :/ other than that, it might very well be that the check is simply unimplemented :(
[21:53:15 CEST] <nichego> go ahead
[21:54:08 CEST] <yagiza> kepstin, that's what I supposed in the first place.
[21:54:10 CEST] <kepstin> in the ffmpeg source I have locally, rtpenc.c contains an is_supported() function that clearly returns 1 for many codecs including opus.
[21:54:30 CEST] <nichego> yagiza: code please
[21:55:40 CEST] <yagiza> nichego, may I put a little piece of code right here?
[21:55:56 CEST] <nichego> yagiza: put it here: https://ptpb.pw/f
[21:56:16 CEST] <nichego> paste in the text box, click on private, click paste
[21:56:22 CEST] <nichego> the link appears at the top of the page
[21:56:32 CEST] <nichego> you can set an expiry time, too, if you wish
[21:56:57 CEST] <furq> great, another pastebin
[21:56:58 CEST] <yagiza> nichego, put it here already http://pastebin.com/Yc9zBCnu
[21:57:10 CEST] <nichego> furq: the best pastebin in existence
[21:57:35 CEST] <yagiza> QAVOutputFormat is my wrapper for AVOutputFormat
[21:57:52 CEST] <furq> it doesn't even tell me how to submit a paste with curl
[21:57:55 CEST] <furq> useless
[21:58:00 CEST] <nichego> where does _outputformat come from, yagiza?
[21:58:05 CEST] <nichego> furq: https://ptpb.pw/
[21:58:23 CEST] <nichego> /f is html form for convenience of the less tech-savvy :)
[21:58:47 CEST] <yagiza> nichego, it's taken by enumerating all the registered output formats.
[21:59:08 CEST] <kepstin> yagiza: what does QF_ASSERT actually do?
[21:59:09 CEST] <nichego> yagiza: please show where you issue calls to queryCodec
[21:59:52 CEST] <yagiza> nichego, this IS the line where I use it!
[22:00:03 CEST] <yagiza> nichego, sorry
[22:00:09 CEST] <nichego> it is the line you call out to libavformat
[22:00:22 CEST] <nichego> one needs to see where and how you call this method
[22:00:28 CEST] <nichego> you may be passing incorrect input to it
[22:00:57 CEST] <kepstin> most assert functions I know of assert on non-zero; and both the error case and the success case are non-zero
[22:01:03 CEST] <kepstin> so are you sure that's doing what you want?
[22:01:36 CEST] <yagiza> nichego, http://pastebin.com/9gQDXQ9m
[22:03:09 CEST] <kepstin> yagiza: too much abstraction in that code, we can't see where the _outputFormat variable gets set.
[22:03:32 CEST] <nichego> yagiza: compliance has no default set in its signature and you don't pass it to queryCodec
[22:03:40 CEST] <yagiza> kepstin, http://pastebin.com/LgQuFN6F
[22:04:33 CEST] <yagiza> kepstin, it is set in constructor:
[22:04:33 CEST] <yagiza> QAVOutputFormat::QAVOutputFormat(AVOutputFormat *outputFormat): _outputFormat(outputFormat)
[22:04:33 CEST] <yagiza> {}
[22:04:49 CEST] <kepstin> yagiza: you might have to try to get support from the QtFFmpeg developers; mixing direct calls to ffmpeg functions and stuff that uses QtFFmpeg will probably do weird things.
[22:05:34 CEST] <kepstin> er, QtAV or whatever it is
[22:05:38 CEST] <yagiza> kepstin, QtFFMpeg is a wrapper I'm developing right now.
[22:05:47 CEST] <nichego> it's name clash
[22:05:52 CEST] <nichego> a qtffmpeg already exists
[22:05:54 CEST] <nichego> but it isn't yours
[22:06:00 CEST] <nichego> or is it?
[22:06:07 CEST] <yagiza> nichego, never heard
[22:06:14 CEST] <nichego> https://github.com/BigHillSoftware/QTFFmpeg/
[22:06:20 CEST] <nichego> maybe good for seeing what they have done
[22:06:58 CEST] <kepstin> yagiza: you still haven't said where the value in the outputFormat variable is actually coming from. Where is the code that intializes that with an AVOutputFormat?
[22:07:01 CEST] <yagiza> nichego, I don't think it has some relations to Qt.
[22:07:15 CEST] <nichego> perhaps. i just googled it
[22:07:16 CEST] <yagiza> nichego, 'cause Qt never typed as QT
[22:07:39 CEST] <nichego> yeah, it's for something called QTKit, whatever that is
[22:07:43 CEST] <yagiza> kepstin, I'll show you the code right now
[22:09:05 CEST] <Aerroon> nichego, that's apple's quicktime kit
[22:09:16 CEST] <nichego> wonderful
[22:09:45 CEST] <yagiza> kepstin, http://pastebin.com/bCzjsJhp
[22:11:58 CEST] <kepstin> yagiza: that's not an AVFormatContext, that's an AVOutputFormat
[22:12:23 CEST] <kepstin> wait a minute...
[22:12:30 CEST] <kepstin> yeah, that's right
[22:12:45 CEST] Action: kepstin didn't know why he was thinking about AVFormatContext
[22:14:13 CEST] <nichego> so ++ has been overloaded correctly for QAVOutputFormat?
[22:14:36 CEST] <kepstin> assuming that your QAVOutputFormat constructor sets the _outputFormat variable, and your interator works, and there's no other bugs in your code that you haven't shown us, that seems like it's probably right?
[22:14:50 CEST] <kepstin> but that's a lot of assumptions.
[22:15:05 CEST] <yagiza> nichego, http://pastebin.com/3mBChrME
[22:15:39 CEST] <yagiza> kepstin, the code is too simple to have bugs, I think.
[22:16:28 CEST] <nichego> so where is _outputformat incremented?
[22:16:48 CEST] <yagiza> nichego,
[22:16:49 CEST] <yagiza> _outputFormat = av_oformat_next(_outputFormat);
[22:16:53 CEST] <nichego> ah
[22:16:56 CEST] <nichego> okay
[22:17:50 CEST] <kepstin> yagiza: hard to say what's wrong. At this point, i'd just suggest throwing it through a debugger and making sure the _outputFormat is correct at the time of the avformat_query_codec call :/
[22:18:02 CEST] <kepstin> (and that the other values are right, too)
[22:18:21 CEST] <nichego> or adding some strategically placed asserts or couts or printfs or what have you
[22:20:24 CEST] <nichego> still, it's unclear what's being passed as default for compliance
[22:20:40 CEST] <nichego> since you don't set it in the queryCodec call
[22:20:41 CEST] <yagiza> kepstin, yes, it is correct, cause I'm performing output of .name just after iterating through the list of decoders:
[22:20:41 CEST] <yagiza> ui->lblFormatName->setText(format.name());
[22:21:02 CEST] <yagiza> kepstin, and I see correct codec name.
[22:21:18 CEST] <nichego> yagiza: what about the value of compliance?
[22:22:24 CEST] <yagiza> nichego, http://pastebin.com/eUxZ4pna
[22:22:45 CEST] <nichego> ah
[22:22:51 CEST] <nichego> okay
[22:25:03 CEST] <yagiza> I guess, if any1 is interested in it, he can just try to call that routine himself for different output formats and encoders to make sure that this behavior is normal for it.
[22:25:38 CEST] <yagiza> nichego, it returns that error in most cases.
[22:26:12 CEST] <yagiza> And I never saw it return 0.
[22:27:08 CEST] <yagiza> For example, for WAVE it returns 1 for most codecs.
[22:28:00 CEST] <yagiza> But for most of other formats it just returns error for all the codecs, or 1 for 1 or 2 codecs.
[22:29:25 CEST] <blue_misfit> hello - what's best practice for encoding mjpg with ffmpeg with best possible speed?
[22:29:59 CEST] <yagiza> So, I guess, I just have to ignore what that method returns right now (v_v). 'cause it's useless in most cases right now.
[22:30:48 CEST] <kepstin> yeah, looks like it is useless for most cases right now
[22:31:11 CEST] <kepstin> the rtp muxer doesn't set the query_codec member of the AVOutputFormat, so there's no function to check
[22:31:32 CEST] <kepstin> so avformat_query_codec only returns 1 if the codec matches the "default" codec
[22:31:56 CEST] <kepstin> which is PCM_MULAW and MPEG4 for rtp :/
[22:32:18 CEST] <kepstin> so I guess you have to treat the error code as "try and see?"
[22:32:47 CEST] <yagiza> kepstin, yes. That's what I guessed from the beginning.
[22:33:20 CEST] <kepstin> it would probably be a 5-line patch to add it to rtpenc.c, just nobody's bothered :/
[22:33:53 CEST] <kepstin> since the logic's already there for the write_header() function, already split out into a separate function even
[22:34:26 CEST] <yagiza> I hope, sooner or later either appropriate methods will be written or tables will be filled. And that method will become really useful.
[22:34:54 CEST] <kepstin> if you want that to happen sooner rather than later, well, patches welcome ;)
[22:35:38 CEST] <yagiza> kepstin, I guess, RTP do not have neither header, nor footer.
[22:36:08 CEST] <kepstin> the write_header() function in the output formats is used as a generic initialization function
[22:36:18 CEST] <kepstin> in rtp it doesn't actually write anything, iirc
[22:36:27 CEST] <yagiza> kepstin, ah, IC
[22:36:40 CEST] <nichego> a little issue
[22:36:46 CEST] <nichego> maybe it's me misunderstanding
[22:37:01 CEST] <nichego> your ::first method calls av_oformat_next for the head of the registered format list
[22:37:29 CEST] <kepstin> yes, if you call av_oformat_next with NULL, it returns the head of the list.
[22:37:34 CEST] <nichego> if you av_oformat_next with null you get back a null
[22:37:53 CEST] <nichego> unless first_oformat is populated elsewhere
[22:38:04 CEST] <yagiza> kepstin, unfortunately, working on a lot of other projects left me no time to participate in FFMpeg development.
[22:38:10 CEST] <kepstin> if you have no codecs, yes. Did you remember to call av_register_all() ? ;)
[22:38:37 CEST] <nichego> i have no clues about ffmpeg api, kepstin. just trying to write a piece of test code for yagiza's case
[22:39:05 CEST] <nichego> i should call that first, i guess, as you say
[22:39:20 CEST] <nichego> a piece of test code without any qt involvement that is
[22:39:20 CEST] <kepstin> nichego: heh. well, if av_oformat_next(NULL) returns NULL, that means you have no output formats, which means you probably forgot to register some output formats.
[22:39:22 CEST] <yagiza> nichego, yes. Cause, I don't know what else I can do if someone calls the method on a null instance.
[22:40:04 CEST] <nichego> kepstin: thing is first_oformat is initialized with null. i suppose i should call something first to change that fact
[22:40:17 CEST] <kepstin> nichego: https://gist.github.com/kepstin/f94e33d783a8a82b9540dd0c8cafcc83
[22:40:46 CEST] <yagiza> nichego, yes. av_register_all() is called at the beginning.
[22:40:55 CEST] <nichego> i'll do that now
[22:41:13 CEST] <nichego> thanks, kepstin. exactly what i wanted
[22:41:25 CEST] <kepstin> (i did in fact write a test program during this conversation, because I was wondering what was going on...)
[22:41:45 CEST] <yagiza> nichego, and av_codec_register_all() should be called to iterate through the codecs.
[22:42:03 CEST] <nichego> fun fact
[22:42:06 CEST] <nichego> format query for opus in rtp: -1163346256
[22:42:24 CEST] <yagiza> nichego, just as I said.
[22:42:42 CEST] <yagiza> nichego, only for default format it will return 1.
[22:43:04 CEST] <yagiza> nichego, for everything else that error will be returned.
[22:43:05 CEST] <nichego> format query for opus in webm: 1
[22:43:16 CEST] <nichego> opus in webm is a known good example
[22:43:25 CEST] <nichego> the result is correct
[22:43:42 CEST] <nichego> format query for aac in webm: -1163346256
[22:43:56 CEST] <nichego> yeah... aac in webm should return a 0
[22:44:15 CEST] <nichego> it is also well-known webm forbids anything but vorbis and opus audio
[22:44:19 CEST] <yagiza> nichego, yes. As I said, that method will return 1 in rare cases and that error in the most of them.
[22:44:41 CEST] <yagiza> nichego, 0 never returned, as I see.
[22:45:32 CEST] <nichego> let's go with something very well-known
[22:45:43 CEST] <yagiza> BTW... which codepage is used in freenode network?
[22:45:58 CEST] <nichego> utf8, not codepages
[22:46:14 CEST] <yagiza> nichego, so, I guessed correctly.
[22:46:38 CEST] <nichego> about what?
[22:46:40 CEST] <yagiza> nichego, why don't you call utf8 not a codepage?
[22:46:57 CEST] <yagiza> nichego, why don't you call utf8 a codepage?
[22:47:43 CEST] <yagiza> nichego, I guessed that utf8 is used here, when choosing a codepage for irc.freenode.net
[22:48:07 CEST] <nichego> codepage is an old term
[22:48:25 CEST] <nichego> utf8 can encode most of ucs code points
[22:48:36 CEST] <nichego> it is not a code page rather an encoding of ucs
[22:48:48 CEST] <yagiza> nichego, and what is the mordern term for codepages?
[22:49:01 CEST] <yagiza> nichego, so, it's encoding? Ok.
[22:49:36 CEST] <nichego> yes, utf8 is an encoding
[22:49:48 CEST] <nichego> but encoding is not a modern term for codepage
[22:49:59 CEST] <nichego> codepage has a specific meaning which is no longer applicable
[22:50:27 CEST] <nichego> if you're interested this is good reading about unicode: http://www.joelonsoftware.com/articles/Unicode.html
[22:50:36 CEST] <yagiza> nichego, anyway, that means I can use any national character here. That's nice.
[22:50:44 CEST] <nichego> yes, you can
[22:51:04 CEST] <nichego>
[22:51:33 CEST] <yagiza> nichego, ]oÄDgY
[22:51:58 CEST] <nichego> yes, it is
[22:52:00 CEST] <yagiza> nichego, MB> :@CB>!
[22:52:24 CEST] <nichego> power at your fingertips
[22:53:37 CEST] <yagiza> Ok. It's too late here. I have to go to bed.
[22:53:56 CEST] <nichego> good night
[22:54:10 CEST] <furq> irc servers have no concept of character encoding
[22:54:10 CEST] <yagiza> Bye-bye!
[22:54:15 CEST] <furq> it's down to your client
[22:55:30 CEST] <nichego> finally
[22:55:35 CEST] <nichego> i got you a 0 return value, yagiza
[22:55:54 CEST] <nichego> format query for pcm_bluray in mkv: 0
[22:55:58 CEST] <yagiza> nichego, and which combination it is?
[22:56:04 CEST] <nichego> this comes up usually in remuxing bluray
[22:56:04 CEST] <yagiza> nichego, nice!
[22:56:11 CEST] <nichego> AV_CODEC_ID_PCM_BLURAY
[22:56:16 CEST] <nichego> in matroska
[22:56:59 CEST] <yagiza> furq, I know. But if all the participants of a specific channel won't agree about encoding, there will be an incompatibility between them. That's why I interested, which encoding is used here.
[22:58:20 CEST] <Illya> generally utf I'd imagine
[22:58:28 CEST] <furq> he already left
[22:58:34 CEST] <nichego> yeah
[22:58:37 CEST] <nichego> so... in summary: avformat_query_codec has a rather sparse codec-container matrix
[22:58:48 CEST] <nichego> this has been educational. specially thanks to kepstin
[23:00:40 CEST] <pfelt> DHE: still around?
[23:36:29 CEST] <nichego> thanks, everyone. goodbye
[23:38:30 CEST] <Illya> How would I go about sharing AVPackets in a non-blocking way between a decoding thread, and a rendering thread? Someone said AVBufferPool but I couldn't find any examples of it's use.
[00:00:00 CEST] --- Sat May 21 2016
More information about the Ffmpeg-devel-irc
mailing list