[00:38:52 CET] <petecouture> Building ffmpeg on centos Im getting an error thrown ERROR: libfdk_aac not found but the library was downloaded and installed as rpm which worked for librtmp. Im reading that there maybe an issue with the new version for centos 7 not including the lib into the name. Anyone else run into this? [00:39:58 CET] <pink_mist> doesn't centos require -devel versions of all such libraries if you want to build something that links to them? [00:40:55 CET] <petecouture> @pink_mist thanks I will review. I didnt run into this with the librtmp library. [00:43:41 CET] <pink_mist> I've never actually used centos, so I may well be mistaken [00:43:46 CET] <petecouture> @pink_mist that worked you rock! [00:43:51 CET] <pink_mist> oh good =) [10:28:46 CET] <mrtAkdeniz> Hey there [10:29:17 CET] <mrtAkdeniz> Im trying to use an image as camera source.. Can I do that with ffmpeg? [10:29:46 CET] <mrtAkdeniz> I tried to google it, but probably used wrong keywords.. [10:51:42 CET] <thin> If I want to take a bunch of webm's and supercut random 1-second intervals from all of them into a video, what's my best option [13:02:22 CET] <haasn> ffmpeg: code 3074: invalid colorspace definition [13:02:24 CET] <haasn> huh? [13:03:21 CET] <haasn> oh nvm I'm stupid [14:12:50 CET] <spaam> w [17:20:11 CET] <AlekseyVl89> Hello, huys [17:20:14 CET] <AlekseyVl89> Hello, guys! [17:21:02 CET] <AlekseyVl89> I'm stuck with the problem. ERROR: opus not found using pkg-config [17:21:26 CET] <AlekseyVl89> I'm trying to make ffmpeg for android. I tried on mac os and Ubuntu. And got the same error [17:21:44 CET] <AlekseyVl89> I've installed libopus with apt-get install libopus-dev [17:22:19 CET] <bencoh> what do you mean "for android"? [17:22:23 CET] <bencoh> is that cross-compilation? [17:22:30 CET] <kepstin> you need to build all the dependent libraries (e.g. libopus, etc.) in your cross-compile build environment. You can't use your system libraries (probably x86) for android (probably arm) [17:22:32 CET] <lays147> Hello guys, I am trying to cut a video, however, the cutting is not happening, the param '-c copy' is mandatory? because its apparently giving conflict with the -vf param [17:22:36 CET] <bencoh> if so, then installing a native package won't help [17:22:59 CET] <kepstin> lays147: if you're filtering video, then you can't copy it, because if you copy it it can't be modified by filters. [17:24:28 CET] <AlekseyVl89> bencoh, thank you. [17:24:44 CET] <AlekseyVl89> I managed to build libopus for android as static library [17:24:54 CET] <AlekseyVl89> How can I compile ffmpeg with it? [17:25:45 CET] <kepstin> AlekseyVl89: after installing libopus to your cross environment root, set PKG_CONFIG_PATH to contain the appropriate pkg-config directory in that corss env. [17:26:54 CET] <AlekseyVl89> like this? PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \ --pkg-config-flags="--static" \ [17:27:02 CET] <bencoh> and assuming you're properly generating your sysroot, you might want to have a look at PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR [17:29:56 CET] <AlekseyVl89> Thanks, guys [20:16:42 CET] <ChocolateArmpits> How is fpsprobesize different from probesize? I have a dv file with messed up audio that doesn't start at beginning, increasing probesize or analyzeduration doesn't help in detecting it initially, however using fpsprobesize helps. [20:26:42 CET] <frendShot> if I use the minterpolate filter to go from a 29.97 fps video to a 60fps one, is it normal for the audio to go out of sync? [20:31:24 CET] <No0n3Left> Do you mean the audio is distorted or that it is not in sync with the video? Assuming it would get a bit out of sync with the video just the framerate has changed and it isnt a multiple of the original, not sure though. [20:32:39 CET] <frendShot> as in, it's out of sync with the video; actions take place at one time in the video, the sound doesn't coincide with them [20:33:44 CET] <frendShot> the sound itself is identical; the minterpolate filter didn't like it when I gave it the video with the audio also muxed in, so I separated the two losslessly, and used the video stream alone with minterpolate [20:33:55 CET] <frendShot> and muxed the audio back in, and that's when it's out of sync [20:33:56 CET] <No0n3Left> Is the video still the same length? [20:34:41 CET] <frendShot> *exactly* the same length? I doubt it; I interpolated from 29.97fps to 60fps... but that shouldn't be that important, right? [20:34:59 CET] <No0n3Left> Do events take place at the same time if you play them back at the same time? [20:35:26 CET] <frendShot> hm? Sorry, I didn't understand [20:35:56 CET] <No0n3Left> Like open the videos at the exact same time and start them. Do they stay in sync, not the audio, but hte actual video itself? [20:36:14 CET] <frendShot> oh I see, the original 29.97 fps and the new 60 fps ones [20:36:16 CET] <frendShot> let me check [20:36:46 CET] <No0n3Left> Cause otherwise it may be something happening when you put the audio back in [20:39:38 CET] <frendShot> heh, the events take place at different times... I think I see what happened; the new interpolated frames occur before the sound [21:01:40 CET] <kepstin> frendShot: the minterpolate filter should preserve video timing. for best results you should have the audio and video in the same file so ffmpeg can manage timestamps for everything. [21:02:02 CET] <kepstin> it sounds like your video originally had an offset between audio and video start, and that was lost when you separated them [21:02:15 CET] <frendShot> kepstin, that's the thing, the minterpolate filter didn't like it when I gave it the video with the audio also muxed in [21:02:17 CET] <saml> if you change framerate, you have to reencode audio, right? [21:02:25 CET] <frendShot> so I had to demux it and then use the filter [21:02:37 CET] <kepstin> frendShot: minterpolate filter has nothing to do with audio [21:02:41 CET] <kepstin> frendShot: it should work fine [21:02:51 CET] <frendShot> well, I understand that, but ffmpeg threw some error about it [21:02:58 CET] <frendShot> I could try and replicate it and paste output here in pastebin [21:02:59 CET] <kepstin> frendShot: we can help you with that... [21:03:05 CET] <saml> usually, when I alter video with -c:a copy, there is a-v sync problem [21:03:11 CET] <frendShot> saml, I see [21:03:22 CET] <saml> so, i'm lazy and do -c:a aac or something [21:03:33 CET] <frendShot> yeah, I used -c:a copy to demux the audio, I used an m4a file since it was an AAC stream from a DVD [21:03:34 CET] <saml> there could be a smarter way [21:03:57 CET] <kepstin> saml: hmm, i'd really expect -c:a copy to keep the offsets/timing correct. [21:04:05 CET] <frendShot> ikr [21:05:13 CET] <saml> hrm yeah i could've done something else. if i experience a-v sync problem with exact command line i used, i'll report [21:16:30 CET] <markweston> how to change L/R audio balance in ffplay or somehow else? [21:18:22 CET] <ChocolateArmpits> markweston, for a single file ? [21:18:23 CET] <ChocolateArmpits> you'd have to use the pan audio filter [21:18:29 CET] <durandal_1707> markweston: stereotools is most user friendly way [21:24:29 CET] <markweston> hey, any way to change L/R audio balance? [21:24:39 CET] <markweston> sorry, wrong channel, I already asked [21:24:43 CET] <frendShot> lol [21:24:54 CET] <frendShot> I was going to say, didn't you see ChocolateArmpits and durandal_1707's answers [21:26:03 CET] <markweston> I just don't want to re-encode the whole movie and OpenBSD doesn't have stereotools in packages, so I'll see if I can do it on OS level with sndio or maybe there's some other media player that can do it on the fly [21:27:13 CET] <kepstin> stereotools is an ffmpeg filter, not a separate package. But yeah, many players will be able to do this, I'm pretty sure mpv can at least. [21:28:51 CET] <durandal_1707> markweston: mpv can do it in fly, get and copy this script: https://github.com/wiiaboo/mpv-scripts/blob/master/audio-balance.lua [21:29:59 CET] <frendShot> woops, wrong button [21:30:07 CET] <frendShot> kepstin, everyone else, https://pastebin.com/raw/1SBsjbrL this is the output [21:30:20 CET] <frendShot> the input is ".\ffmpeg.exe -i .\out2.mkv -filter "minterpolate='fps=60'" output.60fps.mkv" [21:30:25 CET] <frendShot> (Windows PowerShell) [21:30:35 CET] <frendShot> the few lines of errors are at the bottom [21:30:40 CET] <kepstin> frendShot: and your ffmpeg command line? [21:30:50 CET] <frendShot> .\ffmpeg.exe -i .\out2.mkv -filter "minterpolate='fps=60'" output.60fps.mkv [21:31:00 CET] <frendShot> that line had my name in it, so I didn't copy it [21:31:03 CET] <kepstin> oh, the issue is that you used -filter without a stream specifier [21:31:15 CET] Action: frendShot eyes bug out [21:31:15 CET] <kepstin> either use -filter:v to apply it only to video streams, or use -vf (short option) [21:31:21 CET] <frendShot> I see [21:31:36 CET] <markweston> durandal_l1707: thanks man, it's ironic I got the link for the script on #ffmpeg and not on #mpv, where I asked too. The guy there only said "iirc there was a script to do that" but didn't say anything else [21:32:25 CET] <kepstin> frendShot: you'll want to specify some codec options, something like "-c copy -c:v libx264" will copy everything except the video, which will be re-encoded with x264. [21:32:54 CET] <frendShot> I see, and to retain lossless video I use -crf 0 with libx264 right? Even though I guess the file will be huuuuge [21:33:06 CET] <kepstin> frendShot: lossless video is a bad idea [21:33:06 CET] <frendShot> i'm not sure how lossless video will work with framerate change though [21:33:24 CET] <kepstin> use a crf value that gives no quality loss you notice, and that's good enough [21:33:32 CET] <frendShot> right, so transparent [21:33:47 CET] <kepstin> frame interpolation requires making changes to video content, so it is by definition not lossless [21:34:04 CET] <frendShot> yeah, that's what I figured ... so what exactly does -crf 0 here do then? [21:35:07 CET] <kepstin> -crf 0 in 8-bit x264 (the general option for all modes is actually -qp 0) turns on lossless mode, where when you decode the resulting video, you'll get back the exact same bits as were sent to the encoder [21:35:17 CET] <frendShot> i see [21:35:23 CET] <kepstin> this requires huge amounts of space compared to normal lossy video encoding. [21:35:36 CET] <frendShot> yeah, and in the past has given me compatibility issues, too [21:35:58 CET] <kepstin> yes, it requires the decoder support a profile that many hardware decoders and players don't do. [21:36:05 CET] <frendShot> yeah [21:37:17 CET] <kepstin> basically, the only reason to use lossless mode is for certain special archiving tasks where you need to ensure the encoder does not add any artifacts whatsoever, and as a temporary intermediate format to avoid generation loss from multiple encoding/decoding steps. [21:37:36 CET] <frendShot> sweet [21:37:44 CET] <frendShot> all right, lemme try these commands out and report back, thanks [21:50:22 CET] <frendShot> kepstin, thanks, this seems to have done the trick [21:50:38 CET] <frendShot> I guess somewhere along the muxing and demuxing steps, something got misaligned [21:51:06 CET] <aleph-> Hey is there any way at all to get multi core/parallelized encoding with av1? [21:51:48 CET] <kepstin> aleph-: are you a programmer familiar with codecs and threading? maybe you can help! :) [21:52:27 CET] <aleph-> Threading somewhat, codecs not in the slightest. [21:52:43 CET] <aleph-> Taking that as a no as well. :P [21:53:24 CET] <kepstin> av1 isn't really a codec ready for general usage yet, there's a lot more work on the encoder needed. [21:53:35 CET] <aleph-> Aye I figured. [21:53:38 CET] <frendShot> isn't it super slow at the moment? [21:54:03 CET] <aleph-> Indeed. [21:54:13 CET] <kepstin> well, iirc rav1e is only very slow rather than super slow, but iirc it's also rather less efficient? [21:54:27 CET] <kepstin> libaom is super slow, yeah [21:54:46 CET] <aleph-> How is dav1d? [21:55:02 CET] <kepstin> dav1d is a decoder, not encoder [21:55:06 CET] <aleph-> Oh doy. [21:55:33 CET] <aleph-> And I've heard rav1e is rather limited on input type right? [21:55:56 CET] <kepstin> aleph-: most standalone encoders are. Handily, most accept input piped from ffmpeg. [21:56:16 CET] <aleph-> Aye [21:56:49 CET] <kepstin> i mean, if you want to write a standalone tool that accepts arbitrary input, the way to do that is to use the ffmpeg libraries to decode the input :/ [23:08:37 CET] <benbro> [libx264 @ 0x557ffb0db440] width not divisible by 2 (329x308) [23:08:44 CET] <benbro> Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [23:08:59 CET] <benbro> I'm using 'format=yuv420p,scale={0}:-2' [23:09:15 CET] <benbro> shouldn't it handle width 329? [23:09:50 CET] <klaxa> nope [23:10:14 CET] <benbro> klaxa: any workaround? [23:10:28 CET] <pink_mist> a lot of formats require a multiple of 8 or something like that I believe [23:10:46 CET] <klaxa> *2 / 2? [23:10:52 CET] <klaxa> err... [23:10:55 CET] <benbro> ? [23:10:57 CET] <pink_mist> you could add black bars to pad it out to a multiple of 8 [23:11:02 CET] <c_14> yuv420 ist even numbers only [23:11:16 CET] <pink_mist> ah, ok, multiple of 2 for that one then [23:11:20 CET] <c_14> -t [23:11:53 CET] <benbro> no automatic way to handle it? [23:12:09 CET] <c_14> there is [23:12:13 CET] <benbro> what? [23:12:14 CET] <c_14> eeeh [23:12:43 CET] <klaxa> mathematically, integer division by 2 and multiplication by 2 should yield even numbers [23:13:02 CET] <benbro> -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" ? [23:13:12 CET] <benbro> found this here: https://stackoverflow.com/a/20848224 [23:13:15 CET] <c_14> yes, that [23:13:16 CET] <benbro> but feels dirty [23:13:18 CET] <c_14> but only for the first one [23:13:20 CET] <c_14> the second can stay -2 [23:14:46 CET] <c_14> and you can use your {0} variable for iw [23:15:29 CET] <benbro> my {0} variable is divisible by 2 [23:15:56 CET] <c_14> then that should work [23:16:18 CET] <benbro> checking [23:21:32 CET] <benbro> the error is intermittent [23:21:41 CET] <benbro> sometimes I see the error and sometimes not [23:21:56 CET] <benbro> I don't understand how it's possible [23:21:59 CET] <c_14> log your {0} value, maybe your code is bugged? [23:22:04 CET] <frendShot> then your variable sometimes isn't divisible by two [23:22:12 CET] <frendShot> have your code print out what it is at each step to debug it [23:22:56 CET] <furq> you should probably be doing scale,format and not the other way around [23:23:12 CET] <c_14> oh, yeah [23:23:23 CET] <furq> although you'd get a different error message in that case [23:23:24 CET] <c_14> if your input isn't even that would break it [23:23:32 CET] <c_14> *should [23:23:51 CET] <furq> that's just generally good practice anyway [23:26:25 CET] <benbro> furq: I'll try to switch [23:26:38 CET] <benbro> can it explain why it sometimes fail and sometimes doesn't fail? [23:27:10 CET] <furq> yuv420p resizes the chroma planes to half width/height of the luma plane [23:27:23 CET] <furq> so if the width is an odd number then it can't do that [23:28:01 CET] <benbro> so it should always fail for the same video [23:28:03 CET] <furq> i guess it could just make up a pixel but it's probably better to just get you to do it [23:28:12 CET] <benbro> ok. trying [23:28:21 CET] <furq> yeah if it's intermittently failing on the same source clip then idk what the problem would be [23:29:11 CET] <benbro> furq: ok. trying to scale before format [23:35:37 CET] <frendShot> is there a preferred order when specifying filters? like, if I wanted to upscale and interpolate in the same command [23:38:56 CET] <furq> frendShot: it depends on the filters [23:39:29 CET] <benbro> furq: I have predefined resolutions but if the video width is smaller than all variations I just use it as is [23:39:33 CET] <furq> generally you want to do stuff before scaling so it has more information to work with [23:39:42 CET] <benbro> and in this case it was uneven number [23:39:51 CET] <furq> but if it's really slow (like minterpolate) then you might want to do it afterwards [23:39:52 CET] <frendShot> furq, to be specific, minterpolate='fps=60' and scale=1080:720 [23:39:57 CET] <frendShot> I see [23:40:10 CET] <benbro> furq: should I pad with 1 pixel in this case? [23:40:19 CET] <furq> benbro: pad or scale, it's up to you [23:41:06 CET] <benbro> furq: is it better to add or remove a 1 pixel? or maybe doesn't matter? [23:41:09 CET] <furq> i would normally just crop a pixel off, but it's entirely down to preference [23:41:43 CET] <benbro> crop instead of scale? [23:41:44 CET] <furq> if you don't mind the black bar then padding is the least destructive [23:42:24 CET] <benbro> 'scale=440:-2' if the original is 339px will just stretch one of the pixels? [23:42:54 CET] <furq> if you mean 340 then yeah [23:43:13 CET] <benbro> sorry, I mean 439 [23:43:39 CET] <benbro> I want to add/remove/scale without changing much the size and least cpu overhead [23:44:03 CET] <benbro> I'll choose nicer numbers [23:44:19 CET] <pink_mist> I believe it's better to pad if it's just one single line of pixels [23:44:39 CET] <benbro> if the original video width=499, should I "scale=500:-2", or pad or crop? [23:44:52 CET] <furq> like i said, it's entirely down to preference [23:45:06 CET] <furq> any way of adding or dropping one pixel is fine [23:45:30 CET] <benbro> "scale=500:-2" won't distort a 499px video too much? [23:46:02 CET] <pink_mist> try it and compare to the other options [23:46:27 CET] <furq> you could try pad and fillborders if you want to avoid the black bar [23:46:51 CET] <benbro> 1px black bar probably won't be noticible [23:47:14 CET] <benbro> scale is easier for me in the code because I'll treat all videos the same [00:00:00 CET] --- Wed Nov 7 2018
participants (1)
-
burek