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

burek burek021 at gmail.com
Thu Sep 13 03:05:01 EEST 2018


[00:29:15 CEST] <frendShot> If I have a bunch of files with both video and audio streams, how do I strip everything from them except the one video stream, and the English audio stream?
[00:40:19 CEST] <Something1> frendShot, using mapping. https://trac.ffmpeg.org/wiki/Map
[00:41:29 CEST] <frendShot> Something1, yeah, I figured, but is there a parameter or option in -map that allows me to choose an ISO language code?
[00:41:34 CEST] <frendShot> and copy that stream?
[00:41:38 CEST] <frendShot> because I can't find that
[00:42:51 CEST] <Something1> Hm I use ffprobe to identify streams.
[00:43:00 CEST] <furq> -map 0:m:language:eng
[00:44:00 CEST] <frendShot> Something1, well yeah, I use ffmpeg -i to do that, that's not a problem
[00:44:13 CEST] <frendShot> furq, so combine that with -c:v copy?
[00:44:20 CEST] <furq> and -map 0:v
[00:44:29 CEST] <frendShot> o.o
[00:44:42 CEST] <furq> bear in mind m will map every stream that matches, there's no way to only select english audio streams
[00:44:59 CEST] <frendShot> thaaaaaat's the problem I was encountering
[00:45:33 CEST] <furq> you might be better off using mkvmerge then
[00:45:55 CEST] <frendShot> is that the program with the the dopey codenames for every release
[00:46:02 CEST] <furq> yes
[00:47:02 CEST] <frendShot> hnmmmmmm
[00:48:26 CEST] <furq> mkvmerge -o out.mkv -a eng -S in.mkv
[00:48:28 CEST] <furq> something like that
[00:49:16 CEST] <frendShot> hmmmmmmm
[00:52:02 CEST] <relaxed> ffprobe -i input.mkv 2>&1| awk '/eng.*Audio:/ {print substr($2,2,3)}'
[00:52:10 CEST] <frendShot> LOL
[00:52:12 CEST] <frendShot> Jesus
[00:52:16 CEST] <frendShot> it requires pining to awk?
[00:52:20 CEST] <frendShot> piping*
[00:52:30 CEST] <relaxed> everything requires awk
[00:52:36 CEST] <nicolas17> ffprobe has a bunch of options to get more specific fields
[00:52:56 CEST] <nicolas17> that's attempting to parse the human-readable chunk :P
[00:56:06 CEST] <furq> just use mkvmerge
[00:56:49 CEST] <furq> unsurprisingly it turns out to be better than ffmpeg at muxing mkvs
[00:57:13 CEST] <relaxed> let's hope all his input files are matroska
[00:57:53 CEST] <furq> it reads from other formats just fine
[00:58:06 CEST] <nicolas17> does it use lavf?
[00:58:11 CEST] <furq> no
[00:58:38 CEST] <frendShot> they are, they're mkv files
[00:58:58 CEST] <furq> it definitely reads mp4 and mpegts anyway
[00:58:58 CEST] <frendShot> not that it matters, they can be easily put into mkv container anyway
[00:59:03 CEST] <furq> and it's not like anyone uses anything else these days
[00:59:42 CEST] <relaxed> I try not to assume here, unless it's that everyone loves awk
[00:59:50 CEST] <frendShot> lol
[00:59:51 CEST] <furq> i do love awk
[00:59:59 CEST] <frendShot> *cough* sed is better *cough*
[01:00:11 CEST] <furq> boo this man
[01:00:16 CEST] <frendShot> pfffft :P
[02:17:31 CEST] <ariyasu> can someone help me with pipeing
[02:17:34 CEST] <ariyasu> https://pastebin.com/raw/zLbRDvDh
[02:17:51 CEST] <ariyasu> i get this error "Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[02:17:51 CEST] <ariyasu> Error initializing output stream 0:0 --"
[02:18:38 CEST] <ariyasu> trying to use ffmpeg to output audio of a file wave then ouput it to an external aac encoder
[02:24:34 CEST] <Naan> hello video enthusiasts do you know why trying to get the last frame of a video with x264 encoding might throw funny results
[02:41:35 CEST] <kepstin> ariyasu: wav has weird headers that sometimes cause issues when piping, i'd recommend you avoid it if possible
[02:42:08 CEST] <kepstin> that said, it looks like your error is that the aac encoder you're piping to is having an error, and then ffmpeg can't write to it
[02:42:21 CEST] <kepstin> that "unrecognized option `--tvbr82'" at the top maybe?
[02:44:09 CEST] <furq> it should be --tvbr 82 yeah
[02:44:16 CEST] <furq> also you can use qaac -R and pipe in s16le
[02:44:49 CEST] <furq> along with --raw-rate 48000
[17:40:53 CEST] <ahoo> is it possible that cheap webcams claim to output 30 fps (also in hardware) but only deliver (like) 15 fps and double every frame?
[17:41:33 CEST] <ahoo> my 720P cam, also cheap chinaware, provides a far more fluid picture
[17:41:50 CEST] <ahoo> it's output FPS is weirdly 33
[17:41:59 CEST] <kepstin> did you make sure to use mjpeg?
[17:42:05 CEST] <ahoo> yes.
[17:42:23 CEST] <kepstin> well, anything's possible. I haven't personally seen a camera do that.
[17:42:23 CEST] <ahoo> using YUV only framerates of 3 (yes, three) are available to select.
[17:42:46 CEST] <kepstin> most webcams are variable framerate depending on light levels tho
[17:43:02 CEST] <ahoo> which
[17:43:06 CEST] <ahoo> leads me to a question
[17:43:15 CEST] <ahoo> can i display the current FPS in the video?
[17:46:17 CEST] <ahoo> using drawtext
[17:59:44 CEST] <ahoo> to be clear: the *current, actual* fps, not the ones specified with -r
[17:59:58 CEST] <ahoo> like in quake :)
[18:01:42 CEST] <kepstin> hmm. you can display the current pts value (frame time), i'm not sure if that filter has any way to access time from previous frames to calculate a difference
[18:02:14 CEST] <ahoo> yeah i found out how to display the current frame number
[18:02:38 CEST] <ahoo> but i'd have to wait a second and subtract that from the previous one
[18:02:59 CEST] <kepstin> instantaneous fps is basically just 1 / (pts‚  pts)
[18:03:45 CEST] <kepstin> seeing the pts value on its own is probably more useful, tbh.
[18:03:50 CEST] <kepstin> and easier to print :)
[18:04:26 CEST] <ahoo> pt what?
[18:04:53 CEST] <furq> there's an mpv script that shows fps
[18:17:18 CEST] <ahoo> thank you but i don't need it in the player.
[19:06:29 CEST] <ahoo> okay.
[19:06:57 CEST] <ahoo> like i assumed, the camera isn't outputting constantly 30 fps but variying between 13 and 15 fps.
[19:07:07 CEST] <ahoo> what a shit piece of shit.
[19:11:36 CEST] <Hello71> might work if you reduce the resolution
[19:11:46 CEST] <Hello71> 720p and 30 fps
[19:11:49 CEST] <Hello71> just not at the same time
[19:14:42 CEST] <kepstin> and many cheaper cameras get faster framerate when there's more light
[19:15:33 CEST] <ChocolateArmpits> add -vf fps=30 to even out variations in framerate
[19:27:52 CEST] <ahoo> Hello71: thanks but reducing the resolution is not an option.
[19:28:03 CEST] <ahoo> kepstin: yeah, i observed that.
[19:28:19 CEST] <ahoo> ChocolateArmpits: thanks, that fixes the framerate indeed but doesn't give me a better picture
[19:28:53 CEST] <ahoo> my "HD720P" delivers clear, sharp pictures with a fluid framerate.
[19:29:09 CEST] <ahoo> the AUSDOM 1080p cam is just a shithole cam. i'll return it.
[19:29:11 CEST] <Hello71> crap cams are crap, what do you want
[19:29:54 CEST] <ahoo> the HD720P was only a few bucks cheaper than the AUSDOM 1080p
[19:30:12 CEST] <ahoo> i expected an image quality of AT LEAST the same than the 720P
[19:37:01 CEST] <ahoo> i'm seeing now that the 720P, which delivers acceptable quality, was only half the price of the AUSDOM piece of shit.
[19:37:39 CEST] <ahoo> luckily there is a 1080P available from the same manufacturer. but it has a completely different housing. i suspect that not only the housing is different.
[19:43:26 CEST] <Mindlight> Hi all... I am recoding a DTS-MA stream to AAC... and I am not understanding aac codec library quality parameter. What is the max value for "-c:a aac -q:a 300"
[20:01:19 CEST] <furq> Mindlight: 2
[20:01:36 CEST] <furq> https://trac.ffmpeg.org/wiki/Encode/AAC#NativeFFmpegAACEncoder
[20:01:59 CEST] <Mindlight> oh... hahaha... i tried 3,300,3000 and all created bigger files... that's why I was asking :-)
[20:02:19 CEST] <Mindlight> wonder what ffmpeg thought I was trying then
[20:02:21 CEST] <Mindlight> weird
[20:02:34 CEST] <furq> well it says "effective range" so i'm guessing there's no limit
[20:03:04 CEST] <furq> just that anything above 2 is presumably not going to make any audible difference
[20:03:12 CEST] <Mindlight> ah ok
[20:03:15 CEST] <Mindlight> coool
[20:03:18 CEST] <Mindlight> thanks
[20:03:18 CEST] <furq> either way it's recommended to use cbr with the builtin encoder
[20:04:06 CEST] <furq> someone should probably add the osx audiotoolbox aac encoder to this page as well
[20:04:37 CEST] <Mindlight> oh...didn't get that... thought the docs were a bit confusing (somewhere it stated that the built in aac was 2nd in quality choice and then on another place it stated that today the quality between aac built in and the other one wasn't different any more)
[20:05:44 CEST] <furq> shrug
[20:05:48 CEST] <furq> i have a build with fdk so i just use that
[20:06:10 CEST] <furq> there's no way to objectively tell which one is better and nobody's done a decent subjective listening test yet
[20:06:27 CEST] <furq> all i know for sure is that it's definitely much better than faac
[20:06:35 CEST] <furq> and it doesn't have the redistribution restrictions that fdk does
[20:08:21 CEST] <Loeb> I've got ffmpeg running on an over the air source and I'm finding that over time there will be some mild reception issues that cause the audio to fall out of sync. Is there some way to verify the audio sync on input vs output?
[20:09:49 CEST] <furq> Loeb: you can try -af aresample=async=1
[20:11:12 CEST] <Mindlight> weel..t.hanks furq
[20:16:35 CEST] <Loeb> furq, yup that's probably what I needed. Tyvm!
[20:21:31 CEST] <GuiToris> hey, I was trying to reach you a couple of hours ago but my network got disconnected. So I was wondering if this is the right filter syntax. It's either -vf or -af and filter_name=directive=value,another_directive=another_value:another_filter=yet_another_directive=and_value
[20:22:12 CEST] <durandal_1707> GuiToris: wrong
[20:22:19 CEST] <GuiToris> correct me
[20:22:27 CEST] <durandal_1707> options are separated by : filters by ,
[20:22:34 CEST] <durandal_1707> not other way around
[20:23:44 CEST] <GuiToris> ohh, thank you durandal_1707
[20:23:55 CEST] <GuiToris> should I use quotes?
[20:24:37 CEST] <durandal_1707> only if you use expr stuff for filter options
[20:24:56 CEST] <GuiToris> thank you for your hlep
[20:24:58 CEST] <GuiToris> help
[20:25:15 CEST] <durandal_1707> in such cases one needs to escape ,
[20:25:45 CEST] <durandal_1707> or shell stuff, like ()
[20:26:09 CEST] <ChocolateArmpits> some filters use pipe separators
[20:26:20 CEST] <GuiToris> -vf hflip,vflip or rather -vf "hflip,vflip"?
[20:26:23 CEST] <ChocolateArmpits> so wrapping in quotes is preferred then
[20:26:35 CEST] <johnnny22> I'm trying to capture 8 or 16 audio channels from pulseaudio but ffmpeg seems to not like doing this. Forcing ffmpeg to capture 6 channels with -ac 6 works, but -ac 8 seems to just block. Anyone seen this and is this a known problem ?
[20:27:06 CEST] <durandal_1707> johnnny22: what error you get?
[20:27:28 CEST] <johnnny22> it just stays there after opening the device sorta. 1 sec, gotta reproduce
[20:28:22 CEST] <furq> GuiToris: either is fine
[20:28:35 CEST] <furq> you generally want to quote the whole thing in case your shell wants to interpret special characters
[20:45:29 CEST] <GuiToris> furq, what do you mean by 'whole'   -vf "hflip,vflip,bwdif,etc"  or "-vf hflip,vflip,bwdif,etc"?
[20:45:36 CEST] <furq> the first one
[20:46:03 CEST] <GuiToris> thank you :)
[20:52:17 CEST] <johnnny22> durandal_1707: tells me "mysink.monitor: No such process" if i specify say... 8 channels, but if works fine if i specify 6 channels.
[20:53:23 CEST] <johnnny22> this particular source has 16 channels: "Sample Specification: s16le 16ch 48000Hz" /n "Channel Map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9"
[20:56:43 CEST] <johnnny22> durandal_1707: this particular sink was created with "load-module module-null-sink sink_name=mysink channels=16"
[20:57:28 CEST] <durandal_1707> johnnny22: pastebin ffmpeg full output
[20:59:51 CEST] <johnnny22> durandal_1707: https://pastebin.com/XiTKWByy   (don't pay attention to the ffmpeg version, it's actually the latest <master> (from yesterday).
[21:00:51 CEST] <johnnny22> I just didn't spend time upgrading my .spec file :o
[21:03:20 CEST] <durandal_1707> johnnny22: i think you need -channels 8 instead of -ac
[21:04:25 CEST] <johnnny22> same result.
[21:07:02 CEST] <durandal_1707> johnnny22: does: "pactl list sources" shows recording device with 8 channels support?
[21:07:57 CEST] <johnnny22> yup: https://pastebin.com/MjGpaVxd
[21:11:35 CEST] <johnnny22> it's something i've noticed in the past, for which reason i've switched to 'alsa' directly to support 8 channels and more, but alsa is giving me issues i think with a slight very slow shift in time stamps or something.. causing me issues when outputting to a decklink output over extended periods of time. Something I haven't experienced when using a stereo pulse source.
[21:12:20 CEST] <durandal_1707> johnnny22: maybe because rest of 10 channels are named auxX ?
[21:12:23 CEST] <johnnny22> now i just wanna try to figure out if I could maybe go back to pulseaudio in an attempt to resolve this whole issue.
[21:13:31 CEST] <johnnny22> durandal_1707: it's quite possible that it's related to that.
[21:15:58 CEST] <durandal_1707> can you control that somehow?
[21:18:46 CEST] <johnnny22> Yup, i'll try setting them in this order: FL+FR+FC+BL+BR+BC+SL+SR+TFL+TFC+TFR+TBL+TBC+TBR+WL+WR (if i find correspondants or FL+FR+FC+BL+BR+BC+SL+SR (and set it to a 8ch source)
[21:22:55 CEST] <johnnny22> durandal_1707: latest and closes match I could make was this: https://pastebin.com/ZTUvNgBD  . But still get the same issue.
[21:29:33 CEST] <durandal_1707> johnnny22: how do you create this sink? i wanna reproduce it
[21:30:50 CEST] <johnnny22> 1 sec
[21:34:32 CEST] <johnnny22> In /etc/pulse/default.pa  you could add the line:   load-module module-null-sink sink_name=mysink channels=8 channel_map="front-left,front-right,front-center,rear-left,rear-right,rear-center,side-left,side-right"
[21:35:03 CEST] <johnnny22> or you can probably prefix it with "pacmd " and run it from the command line if your pulseaudio is already running.
[21:35:37 CEST] <johnnny22> Arguments available are defined here: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index1h1 (you can see "channels" and "channel_map" possible values.
[21:37:29 CEST] <durandal_1707> johnnny22: so it will get output from it, which is null?
[21:37:51 CEST] <johnnny22> yeah, or whatever you feed to the 'mysink' sink.
[21:38:06 CEST] <johnnny22> at least, if not mistaken.
[21:38:51 CEST] <johnnny22> a bit like using a the 'snd_aloop' with alsa
[21:43:23 CEST] <durandal_1707> johnnny22: i can reproduce bug, i can use only max 6 channels
[21:46:36 CEST] <johnnny22> right
[21:49:44 CEST] <johnnny22> I prefer setting those options in the default.pa file as follow: https://pastebin.com/xFVusyUD   (notice 3 lines. The 2nd line actually makes the sink & source "active" when you play something into the sink using ffmpeg for example. And the 3rd line is kinda optional too.
[21:50:03 CEST] <johnnny22> I've put those lines at the top of the file.
[21:50:23 CEST] <johnnny22> Glad you can reproduce in a way..
[21:54:41 CEST] <johnnny22> anyways, my 3 option is to look into using JACK instead of alsa and pulse, hopefully that one doesn't give me too much headaches :P
[21:56:27 CEST] <johnnny22> 3rd option that is.
[22:00:25 CEST] <durandal_1707> johnnny22: i know why this bug happens
[22:00:50 CEST] <durandal_1707> ffmpeg does not specify channel map at all when creating new stream
[22:10:31 CEST] <durandal_1707> johnnny22: i have patch which fixes issue on my end
[22:33:05 CEST] <johnnny22> durandal_1707: interesting, where could I see or obtain that patch or is it in <master> already ?
[22:38:07 CEST] <durandal_1707> johnnny22: http://ffmpeg.org/pipermail/ffmpeg-devel/2018-September/234190.html
[22:42:08 CEST] <johnnny22> would this work for 16 & possibly 32 channels too ?
[22:45:01 CEST] <durandal_1707> johnnny22: probably
[22:45:25 CEST] <durandal_1707> if not than its pulse limitation
[22:45:55 CEST] <johnnny22> k, pulse is limitted to 32 if not mistaken in general.
[22:47:42 CEST] <johnnny22> building & will give it a try. Thanks in advance !
[23:00:42 CEST] <johnnny22> durandal_1707: it definitely is better. I'll run with it for a little in my actual workflow and see how it behaves. Thanks a bunch !
[23:02:09 CEST] <johnnny22> q2q2q2q2q2q2q2q2q2q2q2q2
[23:02:18 CEST] <johnnny22> oups. sorry, my cat jumped on my keyboard
[23:29:37 CEST] <johnnny22> back
[00:00:00 CEST] --- Thu Sep 13 2018


More information about the Ffmpeg-devel-irc mailing list