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

burek burek021 at gmail.com
Mon Mar 14 02:05:01 CET 2016


[01:53:26 CET] <jonga> witch codecs must i choose when i stream a webm video to icecast with ffmpeg ?
[01:54:14 CET] <J_Darnley> vp8 or vp9 (and theora) are the only ones supported in webm
[02:03:03 CET] <jonga> ok thanks
[04:28:22 CET] <dongs> how do I downmix 16 channel wav into something usable?
[04:33:27 CET] <kepstin> dongs: well, first you have to decide how to mix it, and how many output channels...
[04:34:00 CET] <kepstin> dongs: you might be best off opening it in audacity or something so you can play with the channel gains and pan and whatnot
[04:42:19 CET] <alexandre_> Good night, I'm interested in participating gsoc and work on ffmpeg. Looking out for info with a possible mentor. Thanks in advance.
[04:48:45 CET] <dongs> kepstin: does audicity even open 16ch wav
[04:48:59 CET] <dongs> i hope there's at least usable left/right stuff
[04:49:47 CET] <kepstin> where'd you get this/what's in it?
[04:49:57 CET] <kepstin> 16ch isn't normally something meant for direct playback
[04:50:10 CET] <dongs> extract from mxf
[04:50:34 CET] <kepstin> oh, fun, movie theatre sounds system stuff probably then
[04:50:38 CET] <dongs> i have written stuff to save mxf>wav, but for final downmix i'll probly just use ffmpeg native mxf reader + downmix
[04:50:41 CET] <dongs> yeah
[04:50:51 CET] <kepstin> I have no idea what the channel layout for that even looks like
[04:50:54 CET] <dongs> i guess ill download audishitty and see
[04:51:15 CET] <kepstin> you'd probably want to use the pan filter in ffmpeg so you can do a custom mix with your own coefficients
[04:51:19 CET] <dongs> would i be able to run ffmpeg to extract channel by channel?
[04:51:20 CET] <kepstin> once you figure out something useful
[04:51:27 CET] <dongs> if I cant get .wav opened
[04:52:18 CET] <kepstin> dongs: you should be able to, either using the -map_channel option or some filters
[04:53:37 CET] <dongs> hey hah, it can ope nit
[04:53:55 CET] <dongs> and yea there's stuff on al l16 channels, haha
[04:54:15 CET] <dongs> but looks like first 6 or so are strongest
[04:54:24 CET] <dongs> so maybe its the usual 5.1 mix and then other shit is extra
[05:00:33 CET] <kepstin> there's probably some documentation for the channel layout somewhere
[05:05:08 CET] <kepstin> dongs: you may find https://tech.ebu.ch/docs/r/r123.pdf interesting, it some channel mappings used in mxf
[05:06:31 CET] <kepstin> although that's more intended for tv broadcast stuff, so it might not match your file
[06:03:24 CET] <dongs> kepstin: yea, t he firs6 channels are L R C MFE LS RS
[06:03:31 CET] <dongs> er MFE=LFE
[06:03:35 CET] <dongs> good enough, i can just ignore the other stuff
[06:04:02 CET] <kepstin> dongs: should be easy enough to use the -map_channel option to turn that into a standard 5.1 layout with ffmpeg then
[06:04:10 CET] <kepstin> and drop the extra channels
[06:06:17 CET] <dongs> yep
[06:06:35 CET] <dongs> there's also what looks like a bitstream in one of the channels
[06:06:43 CET] <dongs> cuz its just high dB noise
[06:07:00 CET] <dongs> maybe thats DTS or some other junk
[06:09:48 CET] <johnnny22-afk> what are the file formats or file structures that would support a sliding window mechanism ?
[06:10:39 CET] <johnnny22-afk> technically it's not possible with a single file structure right ?
[06:11:05 CET] <dongs> sliding window of what
[06:12:09 CET] <kepstin> johnnny22-afk: it's theoretically possible to do in a single file with linux's new "hole punch" mechanism, but i've never seen that implemented for video
[06:12:33 CET] <kepstin> johnnny22-afk: usual way is to use segmented files (similar to what hls/dash do) and delete old segments while writing new ones
[06:12:50 CET] <johnnny22-afk> dongs: to do what kepstin just described :)
[06:13:22 CET] <johnnny22-afk> kepstin: "hole punch" mechanisme !? humm
[06:13:55 CET] <dongs> o
[06:14:00 CET] <kepstin> johnnny22-afk: linux has an api that lets you remove a section from the start or middle of a file, deleting it from disk
[06:14:32 CET] <johnnny22-afk> kinda just started reading on it (googled). very interesting.
[06:15:11 CET] <johnnny22-afk> I wonder how accessing such a file would be handled by a player like mplayer.
[06:16:16 CET] <kepstin> I think there's a way to do it such that it actually moves the file offset so that the kept section will start at 0. THen it should just work if you're using a format like mpeg-ts which can be cut arbitrarily.
[06:16:35 CET] <kepstin> if you don't reset the offset, it'll fail, because it'll be a sparse file starting with a long section of 0s
[06:16:50 CET] <johnnny22-afk> humm, very very interesting
[06:17:12 CET] <johnnny22-afk> I could limit a cache to be say 1 gig or so like that.
[06:17:50 CET] <johnnny22-afk> I guess I'll have to try attempting to populate such a file and see how mplayer handles it :)
[06:18:11 CET] <kepstin> you'd have to make sure you're using appending writes to the file, i'm not sure how that interacts with the hole punching.
[06:18:47 CET] <johnnny22-afk> though, i'm not sure how or what you mean exactly by moving it's file offset, but I bet i'll encounter it while reading :)
[06:20:45 CET] <kepstin> if you have a file like 'XXXAAAA', you should be able to do an fallocate hole-punch starting at byte 0 and 3 bytes long. That would normally give you a file like '000AAAA' where the 000 isn't on disk (sparse file).
[06:21:06 CET] <kepstin> but there's a "collapse" flag that would give you a file like 'AAAA' instead, i.e. move the A bits to start at byte 0
[06:21:53 CET] <kepstin> (it obviously doesn't physically move them on disk, it just edits the extent ranges in the file entry in the filesystem)
[06:22:36 CET] <dongs> can I do -ac 6 to just take fisrt 6 channels?
[06:23:44 CET] <kepstin> dongs: i'm not sure.
[06:24:11 CET] <dongs> im looking @ https://trac.ffmpeg.org/wiki/AudioChannelManipulation but i dont see anything with  >6 channels exampels ;d
[06:24:20 CET] <dongs> and id rather not extract to 6 .wavs first then re-merge
[06:25:01 CET] <kepstin> no need to do that, just specify 6 -map_channel options to pull the channels you want in the right order
[06:26:21 CET] <kepstin> might also need -ac6 in combination with that, not sure.
[06:26:30 CET] <kepstin> "-ac 6"
[06:27:30 CET] <johnnny22-afk> kepstin: So, I could append to a file periodically and when I do that remove part of the head of the file with some fallocate hole-punch trickery while I have a player like mplayer that plays a file and that player would continue playing smoothly forward for as long as it can ?
[06:27:51 CET] <johnnny22-afk> as long as it can = as long as there is more data appended to the end ?
[06:28:31 CET] <kepstin> johnnny22-afk: that's a good question. If you do the "collapse", I don't know if another program reading the file would make its next read at the same relative position, or suddenly be reading from somewhere else
[06:28:41 CET] <kepstin> without the "collapse" flag, that would definitely work fine
[06:28:53 CET] <kepstin> (but you wouldn't be able to play from the start with a new player)
[06:30:20 CET] <johnnny22-afk> I'm assuming the client would seek from the same absolute position, so it wouldn't be relative to what's been removed in the head.. if that would be the case, would it suddenly jump ?
[06:30:42 CET] <dongs> Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1, s16 (24 bit), 4608 kb/s
[06:30:45 CET] <dongs> looks like it works
[06:30:46 CET] <dongs> (ac6
[06:30:52 CET] <kepstin> the problem is that if you do a collapse, the contents of the file at the same absolute position changes
[06:31:11 CET] <johnnny22-afk> right, ok
[06:31:41 CET] <johnnny22-afk> so, I'd have to make mplayer or some player seek backward by that same offset at the moment this happen. If that's how it behaves.
[06:32:09 CET] <kepstin> yeah, i'm not sure how well you could get that to work
[06:32:19 CET] <johnnny22-afk> With collapse, an new player instance would need to start playing at a different offset than 0 then ?
[06:32:35 CET] <kepstin> this is why doing something like HLS (a playlist file and segments) is common, since it's already handled correctly by players
[06:32:37 CET] <johnnny22-afk> i mean, without collapse
[06:33:10 CET] <kepstin> yeah, you'd have to remember the most recent cut offset to somehow tell the player to seek that many bytes before reading.
[06:33:29 CET] <johnnny22-afk> which is available with -sb on mplayer for example
[06:33:49 CET] <kepstin> make sure it's using 64bit offsets :)
[06:34:09 CET] <johnnny22-afk> but without collapse would the file size stay the same ? I wouldn't want my hdd to get full.
[06:34:45 CET] <kepstin> yeah, it would actually deallocate that section of file from disc so it can be reused
[06:34:52 CET] <johnnny22-afk> i'm guessing the filesize increases without collapse :o?
[06:35:13 CET] <dongs> now if I can just figure out how to trim 192 samples from start and end
[06:35:36 CET] <kepstin> the file length increases, but the size of the data on disk won't
[06:35:50 CET] <kepstin> i.e. the number with ls -l will go up, the number with du will stay the same :)
[06:36:03 CET] <dongs> or rather, 192 frames @ 24fps, but without having video.
[06:36:03 CET] <dongs> hm
[06:36:34 CET] <johnnny22-afk> kepstin: would the OS support a file length that is bigger than the available space ?
[06:36:53 CET] <kepstin> dongs: the 'atrim' filter can take a number in exact samples
[06:37:04 CET] <kepstin> johnnny22-afk: most linux filesystems have supported that for a long time
[06:37:26 CET] <kepstin> read up on "sparse files" :)
[06:37:27 CET] <dongs> i guess ih ave to calculate it
[06:37:30 CET] <johnnny22-afk> kepstin: k k :) im quite ignorante :)
[06:38:06 CET] <johnnny22-afk> kepstin: now i gotta figure out if centos 7 supports that :o/
[06:38:51 CET] <kepstin> dongs: 48000Hz / 24Hz * 192 = 384000 samples.
[06:39:28 CET] <dongs> mkay. lets see.
[06:40:04 CET] <johnnny22-afk> seems like it's using xfs in it's /home
[06:40:06 CET] <johnnny22-afk> :)
[06:40:54 CET] <johnnny22-afk> now... I assume ffmpeg doesn't support that  ? :)
[06:41:12 CET] <johnnny22-afk> would be a very cool addition if it doesn't :D
[06:41:18 CET] <dongs> kepstin: we have a winner on start_sample
[06:41:30 CET] <dongs> i dont suppose end_sample will take a negative offset to mean end of file
[06:42:00 CET] <johnnny22-afk> dongs : it just might ! :D
[06:42:19 CET] <kepstin> dongs: nothing in the docs :)
[06:42:23 CET] <dongs> right
[06:42:43 CET] <kepstin> usually you don't have to be as exact on the end, so you could just set a time.
[06:43:06 CET] <dongs> no, it must be exact because its part of like 6 reels .mxf
[06:43:12 CET] <kepstin> or if you're muxing it with a video that's already cut, you can just use -shortest and have ffmpeg trim it for you
[06:43:14 CET] <dongs> but t here's 192 frames padding on both ends
[06:43:18 CET] <kepstin> hmm, that's annoying :/
[06:44:16 CET] <dongs> [atrim @ 000001eb9903fa60] Error setting option end_sample to value -384000.
[06:44:17 CET] <dongs> :)
[06:44:34 CET] <dongs> can I somehow get length in samples after 1st triM?
[06:44:54 CET] <kepstin> yeah, i don't think there's a good way to do that other than count the samples in the file and doing some manual math to create the command
[06:45:37 CET] <johnnny22-afk> -shortest as kepstin might do it :)
[06:45:45 CET] <johnnny22-afk> the trick. maybe
[06:45:57 CET] <dongs> yeah, except i have video already processing separately. mxf is separate video +audio packages anyway
[06:46:16 CET] <dongs> theres no relation except playlist that combines them
[06:47:07 CET] <dongs> thats ok, ill do fist step of dropping 192 samples and from start and then see about trimming the end.
[06:49:34 CET] <johnnny22-afk> kepstin : reading https://gist.github.com/CAFxX/571a1558db9a7b393579
[06:53:52 CET] <dongs> the 'sample' window in audacity is a joke
[06:53:57 CET] <dongs> they used some weird custom draw control
[06:54:03 CET] <dongs> so instead of displaying a proper number its just.. trash
[06:54:06 CET] <dongs> because too many samples
[06:54:28 CET] <kepstin> there might be some way to get the number out of ffprobe in a scriptable way
[06:54:43 CET] <dongs> i only need to do this once really (well, *6)
[06:56:05 CET] <dongs> this is so bizzare, if you zoom into audacity it allows the cursor to go betwee n samples
[06:56:12 CET] <dongs> ...
[06:56:37 CET] <dongs> i guess nobody actually uses it for anything serious
[06:56:42 CET] <dongs> time to figure out how to do this all in ffmpeg
[06:57:12 CET] <kepstin> the cursor can only ever possibly be between samples, it doesn't make sense to have it "on" a sample since samples are basically points
[06:57:54 CET] <dongs> http://i.imgur.com/ZxSNNJB.png
[06:57:59 CET] <dongs> each "dot" there is sample
[06:58:04 CET] <dongs> but it allows cursor to be between them
[06:58:20 CET] <dongs> anyway looks like end trim is only 4k samples, not 384000
[06:58:45 CET] <kepstin> weird that the selection is right on a dot, that doesn't make sense
[06:59:00 CET] <dongs> no, i seeked right to the dot
[06:59:03 CET] <kepstin> a sample has to either be in a selection or outside, it can't be "on the edge"
[06:59:59 CET] <kepstin> but yeah, i wouldn't rely on audacity for counting exact samples of something
[07:00:05 CET] <dongs> but beacuse of this i cant use it anyway http://i.imgur.com/wZyzeia.png
[07:00:19 CET] <dongs> because they used some weird customdraw counter that only shows stuff if your file is like 30 seconds long
[07:00:28 CET] <dongs> not a normal textbox
[07:00:32 CET] <kepstin> particularly with its builtin mp3 decoder, since it gets the trimming at the start/end wrong (adds silence to start, cuts a bit off the end)
[07:01:10 CET] <dongs> ffprobe is just ffmpeg symlinked right?
[07:01:23 CET] <dongs> or does it acutally do something differnt
[07:01:41 CET] <kepstin> it's actually a different tool
[07:01:58 CET] <kepstin> (obviously most of the work is done in the shared library for both)
[07:22:35 CET] <dongs> got it all trimmed and it should match up with video, thanks dudes.
[08:17:44 CET] <asm89> my google fu is failing me
[08:17:56 CET] <asm89> any good examples of setting up an hls realtime stream with ffserver?
[08:25:28 CET] <pzich> I've never done it, but here's what I'm finding for 'ffserver hls' on Google, have you been to all of these? http://stackoverflow.com/a/1098222 http://ffmpeg.gusari.org/viewtopic.php?f=12&t=914 http://www.alkannoide.com/2013/07/04/play-with-ffserver-a-quick-overview/
[08:30:35 CET] <fling> Is it fine to capture dual-angle video using two webcams?
[08:30:58 CET] <fling> Is it also fine to use them both for mastering stereo from two mono channels?
[08:51:41 CET] <asm89> pzich: nothing that really worked yet, thanks for checking along with me though
[09:49:32 CET] <osense> hello
[09:49:57 CET] <osense> is it possible to create a "live", so to speak, timelapse video with ffmpeg?
[09:50:20 CET] <osense> I.e. capture frames at a low framerate from /dev/video0, but encode them into the video at a higher framerate, e.g.
[09:50:25 CET] <osense> ffmpeg -framerate 1 -i /dev/video0 -r 60 out.mp4
[09:50:48 CET] <osense> I get some messages that the driver change the 1 fps to 30 fps
[09:51:25 CET] <osense> maybe I better use some other tool to capture stills from the camera and afterwards use ffmpeg to create the video from them?
[09:51:59 CET] <solrize> i just built from master and got a lot of compiler warnings about OOB array subscripts.... is that ok?  known?
[10:20:44 CET] <tumpysans> i need HELP, does anybody have ffmpeg binary with  shine-mp3 encoder enabled
[10:37:51 CET] <rivarun> hello. i'm trying to convert a 60fps video to 30fps (among other downconversions to save size). after the conversion, ffmpeg reports the output file as being 60fps. http://pastebin.com/KCvVzmDW
[10:46:24 CET] <rivarun> hmm, i think -r is what i wanted
[10:46:58 CET] <tumpysans> can ffplay  playback bluray ?
[14:04:57 CET] <tumi> how much ram do you need to build ffmpeg? is 128 MB definitely too much or it could work? I don't care about the speed as long as it doesn't get killed due to lack of memory
[14:05:13 CET] <tumi> *too low of course
[14:05:22 CET] <tumi> not "too much"
[14:05:32 CET] <JEEB> just have enough swap
[14:06:03 CET] <JEEB> but generally 128MiB is really limited for *building* pretty much anything
[14:06:46 CET] <tumi> enough swap as in how much? 1 GB? 4 GB?
[14:07:07 CET] <jkqxz> It will very much depend on your compiler and compile options.
[14:07:13 CET] <tumi> what I care about is x264 encoder, and maybe libopus
[14:07:25 CET] <JEEB> really depends on how many processes you do at once
[14:07:55 CET] <JEEB> and I don't think anyone really has calculated how many MiBs a single GCC/ld/whaetver process takes with the version you have
[14:07:55 CET] <tumi> the "-j n" parameter?
[14:07:59 CET] <jkqxz> (If you use an old compiler which people were using when normal machines had 128MB of RAM then you'll be just fine.)
[14:08:34 CET] <JEEB> I'm just gonna say that if you're doing this to compile on an embedded device, don't
[14:09:00 CET] <JEEB> give the build box enough RAM and a few gigs of swap just in case
[14:09:10 CET] <JEEB> like I would not go under 1GiB for any linux system now
[14:09:11 CET] <tumi> not really embedded, just a really low end vps
[14:09:49 CET] <JEEB> anyways, you'd have to measure it yourself with the stuff you're doing and the versions of things you're going to be using
[14:10:08 CET] <tumi> that makes sense I guess
[14:11:01 CET] <tumi> I also tried to build it on my android phone but the configure script kept complaining about being unable to create a temp file in /tmp
[14:11:18 CET] <tumi> even though mktemp seemingly works correctly
[15:09:59 CET] <lollisoft> Hi, I have a problem with a screen recording made with 1.16 fps and then edit that video using blender to as my tool of choice. The fps in blender is 10. Can I convert my source easily with ffmpeg?
[15:29:07 CET] <J_Darnley> I don't understand your problem.
[15:29:14 CET] <J_Darnley> Are the conversion too slow?
[15:29:25 CET] <J_Darnley> lollisoft ^
[15:31:34 CET] <lollisoft> No, just starting with a screen capture avi file I have converted to mov. But the framerate is at 1.16 fps and I need 10 fps. I just do build ffmpeg as I have read it would be possible to use this tool to convert 1 to 25 or in my case 1 to 10. (Neclecting the 1.16 fraction)...
[15:31:37 CET] <dsl42> -r 10? but the video would be ~10 times faster, or?
[15:32:26 CET] <J_Darnley> If you want to duplicate frames to reach 10 fps then just supply -r 10 when encoding
[15:32:27 CET] <lollisoft> It is if I do not convert the framerate, because I have a animation at 10 fps and blender is not capable to handle both :-(
[15:32:54 CET] <J_Darnley> if you want to speed up the video, then use one of the filters, fps maybe
[15:33:02 CET] <lollisoft> Yes, that is what I attempt to do.
[15:35:39 CET] <lollisoft> Ahh, I mean make 1 frame to 10 frames and then take the next and so forth. If that is -r 10 doing, then I will have success. Now I try, as macport has build ffmpeg.
[15:41:53 CET] <lollisoft> It is telling to be 10 fps, but I have only black screen. All images seem to get lost. My command was ffmpeg -i Product\ Installation\ Windows.avi -r 10 Product\ Installation\ Windows.mov
[15:42:48 CET] <J_Darnley> That won't work like you think
[15:42:57 CET] <lollisoft> Hmm
[15:43:02 CET] <J_Darnley> you can't have the same file as output and input
[15:43:20 CET] <J_Darnley> oh its not
[15:43:23 CET] <lollisoft> avi to mov.
[15:43:24 CET] <dsl42> :)
[15:52:34 CET] <lollisoft> It seems to work. Quicktime player can't read the file (eg. black screen), but blender shines here. The mouse movements and speed is as expected. I'll render it now and see if Quicktime then can play the rendered video.
[16:18:33 CET] <DHE> other than the main ffmpeg.c, are there code examples of "how to transcode" using libav*?
[16:19:42 CET] <furq> http://ffmpeg.org/doxygen/3.0/decoding_encoding_8c-example.html
[16:20:48 CET] <DHE> okay.. and libavformat should (hopefully) be rather straight-forward
[16:21:33 CET] <furq> http://ffmpeg.org/doxygen/3.0/transcoding_8c-example.html
[16:21:35 CET] <furq> there's that as well
[16:21:53 CET] <DHE> oh, this might be what I'm looking for
[16:21:55 CET] <DHE> thx
[16:22:05 CET] <furq> http://ffmpeg.org/doxygen/3.0/examples.html
[17:12:50 CET] <Thue> I have created the video https://thuejk.dk/output_10Mbs_quality_good.webm via the command "ffmpeg -r 60 -pattern_type glob -i '*.time.jpg' -quality good -threads 4 -b:v 10M -c:v vp9 output_10Mbs_quality_good.webm". It plays fine in VLC, but Chrome and Firefox won't play it. Firefox says "Video can't be played because the file is corrupt".
[17:13:41 CET] Action: J_Darnley guesses thet yuv444p was used
[17:13:49 CET] <furq> Thue: -pix_fmt yuv420p
[17:14:17 CET] <Thue> Fire Chrome and Firefox does not support the default VP9 format output by ffmpeg?
[17:14:28 CET] <Thue> s/fire/so/
[17:14:44 CET] <furq> the default pixel format is the same as the input
[17:14:59 CET] <Thue> Ah, thanks :)
[17:15:03 CET] <J_Darnley> Or the "best" one supported by the encoder
[17:15:08 CET] <furq> yeah
[17:15:33 CET] <Thue> Well, that was easier to debug than expected (for you, at least). Thanks :)
[17:16:03 CET] <J_Darnley> Only because people come here with the same problem every other day.
[17:16:10 CET] <furq> you generally need to specify pix_fmt whenever you convert from images
[17:16:41 CET] <J_Darnley> It would be better if browsers supported more or at least told you what the fucking problem is.
[17:16:42 CET] <Thue> The error messages (or lack of same) in the browsers are really not helpful, either
[17:17:19 CET] <furq> there are open bugs in firefox and chrome to support yuv422/444 but i can't see them going anywhere
[17:17:45 CET] <Thue> Are there open bugs in firefox and chrome to make them output better error messages?
[17:18:09 CET] <furq> that would make life far too easy
[17:18:24 CET] <Thue> Yes, that would be too obvious. What were I thinking?
[17:31:11 CET] <Thue> The chrome and firefox bugs for yuv444 support I can find both claim to be fixed: https://bugs.chromium.org/p/chromium/issues/detail?id=104711 https://bugzilla.mozilla.org/show_bug.cgi?id=497023
[19:49:30 CET] <joko> Hello, I am trying to quickly convert the AC3 audio channel of a mkv file to AAC, but w/o any luck... ffmpeg input.mkv -c:v copy -c:a libfdk_aac -vbr 3 output.mkv is what I type, "Output file #0 does not contain any stream" is the message I get
[19:50:21 CET] <relaxed> joko: -i input.mkv
[19:51:29 CET] <joko> relaxed: doh, my bad
[19:52:49 CET] <J_Darnley> I wonder if ffmpeg already overwrote it
[19:54:26 CET] <joko> J_Darnley: nope, it seems to be working ;)
[20:13:49 CET] <TD-Linux> thebombzen, firefox has fixed 4:4:4 in firefox 46 iirc
[20:13:58 CET] <TD-Linux> err that's for Thue
[20:14:31 CET] <TD-Linux> this is the bug for vp9 444 https://bugzilla.mozilla.org/show_bug.cgi?id=1190939
[00:00:00 CET] --- Mon Mar 14 2016


More information about the Ffmpeg-devel-irc mailing list