[Ffmpeg-devel-irc] ffmpeg.log.20180311
burek
burek021 at gmail.com
Mon Mar 12 03:05:01 EET 2018
[00:33:47 CET] <leif> Does anyone have any examples of how to properly get the string stored in a AVBPrint buffer?
[00:34:31 CET] <leif> I'm trying to make a function to handle libavutil's logging, and it seems like I''m supposed to use that data structure.
[00:34:57 CET] <leif> But I can't find any examples outside of `log.c`, which just accesses the struct's fields directly.
[00:35:06 CET] <leif> (Or is that what external users are supposed to do?)
[01:44:19 CET] <df00z> Hey - is avcodec_parameters_to_context still needed after calling av_find_best_stream? I'm getting a message about how formatContext->streams[audio_stream_index]->codec is deprecated
[01:45:14 CET] <JEEB> yes, you're not supposed to utilize the input stream's context but rather create your own
[01:45:41 CET] <df00z> av_find_best_stream looks like it does it for you though, no
[01:45:41 CET] <df00z> ?
[01:45:45 CET] <df00z> Hm
[01:45:53 CET] <JEEB> no, it's just supposed to give you the "best" stream of a type
[01:45:53 CET] <df00z> Oh, wait, I see what you mean.
[01:45:57 CET] <JEEB> it gives you a stream
[01:46:07 CET] <df00z> I need to create a new context. Thanks
[01:53:10 CET] <JEEB> df00z: looking at my code locally I have a function that takes in an AVCodec (received from av_find_best_stream) and AVCodecParameters that are in in in_lavf_context->streams[picked_stream_index]->codecpar
[01:54:53 CET] <JEEB> and then that function initializes an AVCodecContext according to the AVCodec, sets refcounted_frames to 1 if `av_codec_is_decoder()` and then calls avcodec_parameters_to_context(created_ctx, params) and calls avcodec_open2 on the decoder
[01:56:25 CET] <JEEB> df00z: and after that you just do things according to https://www.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[01:56:35 CET] <JEEB> and you should be more or less golden
[05:20:41 CET] <jleclanche> hey there, I'm trying to record a video on my webcam but the sound is cutting off after ~3 seconds of video. this is the command line I use: ffmpeg -f v4l2 -thread_queue_size 512 -video_size 1280x720 -i /dev/video0 -f alsa -i pulse -acodec libmp3lame -ab 48k out.mkv
[05:20:43 CET] <jleclanche> any ideas?
[05:21:09 CET] <jleclanche> I'm not getting any weirdness in the console, just a message about thread_queue_size (which is why i added the param, but still getting it)
[05:25:21 CET] <ChillaryClinton> please pardon my nickspam
[06:55:21 CET] <gnarface> jleclanche: no idea - way too many possibilities. but in my own testing i did find that for -thread_queue_size to have any meaningful effect you're gonna have to set it to something a lot higher.
[06:55:57 CET] <gnarface> (the examples floating around the internet seem massively outdated, try something like 16384
[06:55:58 CET] <gnarface> )
[06:57:57 CET] <gnarface> i did go chasing some performance regressions in encoding using that thread_queue_size value myself recently, but didn't really make much progress in increasing reliability of the stream. it had plagued the machine since the first kernel upgrade past 3.2 but was fixed in debian stretch kernel 4.9 a couple weeks ago
[06:59:00 CET] <gnarface> (so you know, it might be worth it to check for updates)
[07:17:56 CET] <Li> I was searching for a way {mplayer & ffmpeg} to redirect webcam input to hdmi port to make the connected monitor behave like tv, that is when I came accross this puzzling "ffmpeg -f fbdev -i /dev/fb0 -r 24 -c:v libx264 -b:v 500k output.avi" according to man page -i is input for ffmpeg and I can see the example using hdmi as input device /dev/fb0
[07:18:37 CET] <Li> would be nice if anyone agree or disagree on this syntax correctness
[07:19:23 CET] <Li> also I'd appreaciate a helping hand to achive input /dev/video0 to output /dev/fb0
[07:23:54 CET] <relaxed> Li: have you seen https://trac.ffmpeg.org/wiki/Capture/Webcam ?
[07:34:38 CET] <Li> relaxed: I've to that url it doesn't answer the question
[08:28:47 CET] <Johnjay> dvd's would typically come with the extra features on a separate disc, right?
[08:29:12 CET] <Johnjay> the back of this thing says there's exclusive special footage but it's not anywhere on the disc. maybe there's supposed to be a second?
[11:06:54 CET] <kepstin> Johnjay: most recent dvd releases come with extra features on the same disk as the main feature.
[11:08:51 CET] <furq> some of them don't even put the special features into a different titleset
[11:08:54 CET] <furq> which is nice of them
[11:18:48 CET] <kepstin> annoying when they put them into the same title, tho, and you have to find something that understands dvd chapters to cut them out.
[11:19:25 CET] <furq> the same title is new on me
[11:19:29 CET] <furq> doesn't surprise me though
[11:26:14 CET] <Almgren> Morning, is it possible to make a video spin/rotate in a loop? with ffmpeg?
[11:27:03 CET] <furq> !filter rotate @Almgren
[11:27:03 CET] <nfobot> Almgren: http://ffmpeg.org/ffmpeg-filters.html#rotate
[11:42:25 CET] <Almgren> nfobot: thanks
[14:04:38 CET] <kepstin> I once used the rotate filter to make a video rock back and forwards in time with the music. Was a terrible idea, kinda made me seasick a bit.
[14:08:00 CET] <kerio> kepstin: https://www.youtube.com/watch?v=OsnfYn_ZFdE&t=10s
[14:09:23 CET] <kepstin> it did prevent the video from matching youtube content-id, tho, fwiw ;)
[14:14:55 CET] <Almgren> I ended up doing it in gimp. worked out great
[18:55:35 CET] <infamous_> I'm getting an error "ffmpeg: error while loading shared libraries: libopencv_core.so.2.4: cannot open shared object file: No such file or directory" when I run ffmpeg in bash on ubuntu 16.04
[18:55:57 CET] <infamous_> I tried the solutions offered on the net but without success
[18:57:08 CET] <infamous_> After which I removed openCV completely from my system
[18:57:08 CET] <jkqxz> If that's ffmpeg installed from the distribution then the distribution dependencies are broken. If you compiled it yourself then that package probably got removed so you want to compile it again.
[18:57:36 CET] <infamous_> I installed ffmpeg using apt-get
[18:58:03 CET] <jkqxz> And is the ffmpeg you are running the one you installed from apt-get?
[18:58:10 CET] <infamous_> Yeah
[18:58:58 CET] <furq> i don't think ffmpeg on debian has ever depended on opencv
[19:00:42 CET] <infamous_> I tried some solutions offered on https://askubuntu.com/questions/887023/error-with-shared-libraries-ffmpeg
[19:01:17 CET] <furq> https://packages.ubuntu.com/xenial/libavfilter-ffmpeg5
[19:01:18 CET] <furq> huh
[19:01:22 CET] <furq> weird
[19:01:38 CET] <infamous_> And when I run $sudo find / -name "libopencv_core.so.2.4*"
[19:01:54 CET] <infamous_> I get "find: /run/user/1000/gvfs: Permission denied"
[19:02:02 CET] <infamous_> That's it
[19:02:15 CET] <furq> you probably want rid of that distro ffmpeg anyway, it's pretty old
[19:02:18 CET] <furq> https://www.johnvansickle.com/ffmpeg/
[19:02:24 CET] <furq> the easiest solution is to just install this instead
[19:02:51 CET] <infamous_> Ohh cool!:)
[19:02:58 CET] <infamous_> Thanks
[19:05:45 CET] <furq> it's not a great solution because anything that depends on libavfilter will still be broken
[19:10:33 CET] <infamous_> It's solved now
[19:10:39 CET] <infamous_> Hurray!!
[19:11:01 CET] <infamous_> https://github.com/baumgarr/nixnote2/issues/165#issuecomment-350260440
[19:11:06 CET] <infamous_> This works!!
[19:25:23 CET] <kveroneau> I need some assistance with ffmpeg, I am streaming from an external DVB device to twitch.tv, this part works really nicely. Both the video and audio streams go out to twitch with no problems.
[19:25:49 CET] <kveroneau> Now I am trying to mix in my microphone into the same video feed, but am running into problems.
[19:26:35 CET] <kveroneau> I have been trying to use -filter_complex and -map, but either I get an audio-only output stream and lose the DVB video stream, or I get no audio at all.
[19:27:11 CET] <furq> kveroneau: pastebin the command
[19:27:19 CET] <kveroneau> Sure.
[19:29:28 CET] <kveroneau> Here you go: https://pastebin.com/8xRTjRh6
[19:31:30 CET] <furq> you probably just want to use amix instead of amerge,pan
[19:32:08 CET] <furq> if i had to guess i would say twitch doesn't like that you have the audio stream before video
[19:32:15 CET] <furq> so try swapping the two maps around
[19:34:00 CET] <kveroneau> That makes sense, I'll try that. I also tried outputting to a flv file and playing it back, and mplayer was giving me strange results at times as well.
[19:35:22 CET] <furq> also replace libmp3lame with aac
[19:35:33 CET] <furq> it's higher quality and better supported
[19:38:27 CET] <therage3> i don't know the context here, but is AAC really more supported than MP3?
[19:39:00 CET] <furq> it's equally well supported in browsers
[19:39:09 CET] <furq> and i've had issues with mp3 in mp4 with browsers before
[19:39:20 CET] <kveroneau> I am going to try my revised version.
[19:42:11 CET] <kveroneau> Success! Although the audio from the DVB stream is a bit too loud, I may just increase my mics volume in alsa.
[19:43:22 CET] <kveroneau> although -filter_complex should be-able to adjust the volume of the DVB stream.
[19:44:06 CET] <furq> if you're still using amerge,pan then you can do it in pan
[19:44:15 CET] <furq> i would still probably just amplify it and then use amix though
[19:45:37 CET] <kveroneau> I ended up using amix. I am looking at the "volume" filter_complex to see if I can lower the volume of just one stream.
[19:46:20 CET] <furq> [0:a]volume=3dB[mic];[1:a][mic]amix[aout]
[19:47:27 CET] <furq> you might also want to look into dynaudnorm/loudnorm
[19:47:45 CET] <furq> !filter dynaudnorm @kveroneau
[19:47:45 CET] <nfobot> kveroneau: http://ffmpeg.org/ffmpeg-filters.html#dynaudnorm
[19:57:59 CET] <kveroneau> I ended up lowering the volume by the DVB by half and it sounds perfectly now. volume=0.5
[19:58:42 CET] <kveroneau> Now a future task is to composite my webcam into the image, for now this is good enough. Thank you so much.
[20:19:27 CET] <furq> !filter overlay @kveroneau
[20:19:27 CET] <nfobot> kveroneau: http://ffmpeg.org/ffmpeg-filters.html#overlay-1
[20:19:46 CET] <furq> check drawbox as well if you want a nice border around it that the kids these days love so much
[20:48:54 CET] <Cpuroast> https://ffmpeg.zeranoe.com/builds
[20:49:17 CET] <Cpuroast> 3.4.2 static and shared builds do not run on macOS 10.12.6
[20:49:27 CET] <Cpuroast> the build is missing a library
[20:49:31 CET] <JEEB> the guy's not here
[20:49:40 CET] <Cpuroast> ah
[20:49:41 CET] <Cpuroast> :)
[20:51:09 CET] <Cpuroast> oh well, the other macOS build provider has a functional 3.4.2 build
[22:55:24 CET] <gamlegaz> does the x264 encoder use a varying GOP size throughout encoding?
[22:55:51 CET] <JEEB> by default, yes
[22:56:30 CET] <gamlegaz> alright
[22:58:35 CET] <gamlegaz> I'm trying to implement a videoencoder in WebAssembly (which doesn't have access to threads which will in turn make the compiled ffmpeg will run on a single thread) would splitting the encoding up into segments be plausible?
[23:01:36 CET] <gamlegaz> or maybe a better question would be, is every I frame an IDR frame in x264?
[23:02:02 CET] <JEEB> no
[23:02:24 CET] <JEEB> I mean, in x264's marking I (capital i) is IDR
[23:02:28 CET] <JEEB> but that's probably not what I meant
[23:02:33 CET] <JEEB> s/I/you/
[23:03:07 CET] <JEEB> x264 can output normal I frames as well as IDR frames or SEI+I frame open GOP things depending on configuration
[23:04:09 CET] <gamlegaz> would an IDR-interval of ~15-30 be acceptable, or is that very low?
[23:08:03 CET] <iive> gamlegaz, frames or seconds?
[23:08:19 CET] <gamlegaz> frames
[23:08:30 CET] <gamlegaz> for around 25fps
[23:08:56 CET] <iive> it would make the bitrate a lot bigger
[23:12:22 CET] <gamlegaz> okay, thanks :)
[23:15:29 CET] <gamlegaz> My idea was to fix the IDR interval and let threads encode a GOP seperately, keeping a buffer of the frames until it's done
[23:16:03 CET] <gamlegaz> so it'll have to weigh the interval size vs the memory usage
[23:18:28 CET] <BtbN> encoding in webassembly sounds uselessly slow, no matter what you do
[23:18:39 CET] <BtbN> The complete lack of SIMD will kill it
[23:20:10 CET] <gamlegaz> Well, it won't be fast
[23:20:51 CET] <gamlegaz> but maybe a bit faster
[00:00:00 CET] --- Mon Mar 12 2018
More information about the Ffmpeg-devel-irc
mailing list