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

burek burek021 at gmail.com
Fri Jul 26 03:05:06 EEST 2019


[01:18:43 CEST] <klaxa> i once built a thing for android with jpegs and had ~100 ms latency from desktop to phone, but holy smokes the bandwidth
[01:19:16 CEST] <klaxa> was kind of fun building though
[01:19:58 CEST] <nine_milli> blb
[05:09:54 CEST] <ossifrage> klaxa, yeah 40mbps 720p doesn't look that bad. chrome annoys me that it won't show the current frame of a multipart/x-mixed-replace until it has fully received the next frame
[05:42:42 CEST] <nine_milli> blb
[13:08:44 CEST] <Beam_Inn> hey what's up guys anyone about?
[14:32:53 CEST] <Adcock> Any open source alternative to AC3 DD 5.1 ?
[14:33:30 CEST] <durandal_1707> Adcock: opus
[14:34:42 CEST] <pink_mist> flac
[14:34:47 CEST] <pink_mist> though that's not lossy
[14:35:03 CEST] <Adcock> durandal_1707:just converting to opus would work?
[14:35:43 CEST] <durandal_1707> Adcock: do not transcode
[14:35:57 CEST] <durandal_1707> keep AC3
[14:36:11 CEST] <durandal_1707> transcode lose quality
[14:37:04 CEST] <Adcock> Hmmm....
[14:37:20 CEST] <Adcock> pink_mist:just converting to flac would work?
[14:37:40 CEST] <JEEB> Adcock: also your question is weird to begin with. what do you mean with "open source alternative"
[14:38:28 CEST] <Adcock> JEEB: free opensource alternative
[14:38:28 CEST] <JEEB> AC3 is a specified format ("has a spec") and there are open source decoders and encoders for it. if your actual problem is with something else than open source, then another format having open source implementation or not really doesn't matter and the problem is somewhere else
[14:38:34 CEST] <kepstin> ffmpeg includes open source ac3 encoder+decoder even
[14:38:36 CEST] <JEEB> free as in?
[14:38:53 CEST] <JEEB> I'm just verifying because people use the free word in differnt meanings
[14:38:55 CEST] <Adcock> freedom
[14:39:20 CEST] <JEEB> right. the implementations of AC3 are open source and under libre compatible licenses
[14:39:36 CEST] <JEEB> thus your actual problem is somewhere else than the format's implementations being open source or not?
[14:40:23 CEST] <JEEB> people really like to conflate open source with "free to use" (latter is regarding patents etc), but those are actually two completely different things
[14:40:40 CEST] <JEEB> also apparently the patents on base AC3 finished some time ago, but I am not a lawyer
[14:40:48 CEST] <Adcock> is ac3 patented?
[14:40:50 CEST] <JEEB> I just know Fedora started shipping an AC3 decoder recently
[14:40:58 CEST] <xantoz> Adcock: not anymore, it seems
[14:41:00 CEST] <JEEB> Adcock: depends on your juristiction
[14:41:11 CEST] <Adcock> IS it or not?
[14:41:30 CEST] <pink_mist> JEEB: isn't AC3 with DD inside proprietary?
[14:41:48 CEST] <JEEB> I just thought he meant 5.1 AC3 by that
[14:41:49 CEST] <Adcock> any jurisdiction
[14:42:09 CEST] <durandal_1707> no, hide under rock
[14:42:46 CEST] <JEEB> Adcock: no idea. I know some US companies started shipping a decoder recently due to apparently the base set of patents getting finished.
[14:42:56 CEST] <JEEB> Adcock: but as you can understand I don't think anyone here wants to give legal advice
[14:43:01 CEST] <JEEB> we're software people, not patent licensing people
[14:43:36 CEST] <JEEB> nor are we lawyers all aroudn the world :P
[14:44:39 CEST] <pink_mist> JEEB: ah, it seems that if it's just regular DD (and not DD+) it's just the same as regular AC-3
[14:44:53 CEST] <JEEB> yes there's separately E-AC3
[14:45:01 CEST] <JEEB> if that's what you mean
[14:45:52 CEST] <pink_mist> yeah, that's DD+
[14:46:42 CEST] <JEEB> also I thought that also had a spec?
[14:46:49 CEST] <JEEB> (´4@)
[14:47:00 CEST] <JEEB> although by the way AC-4 went even if it had a spec it doesn't really mean much
[14:49:31 CEST] <Adcock> JEEB: I did not ask for legal advice. But thanks.
[14:49:33 CEST] <pink_mist> eh, I may be remembering a very old state of affairs
[14:50:00 CEST] <kepstin> Adcock: you asked if something was patented. answering that means providing legal advice :/
[14:50:11 CEST] <Adcock> My orginal question was not about legal advice.
[14:50:39 CEST] <JEEB> yea, but your original question about talking open source / libre software with formats really didn't make much sense :P
[14:50:51 CEST] <kepstin> we answered your original question too as best we could, the ffmpeg ac3 implementation is free and open source software
[14:50:51 CEST] <Adcock> xD
[14:51:07 CEST] <Adcock> Okay.
[14:51:36 CEST] <JEEB> also most often your audio format selection anyways is limited by what you want to play it with
[14:51:42 CEST] <JEEB> not by your own wishes
[14:51:49 CEST] <JEEB> like, think of those plastic boxes playing video
[14:51:53 CEST] <Adcock> Hmmm....
[14:52:10 CEST] <JEEB> (and of course there's the thing of "should I start re-encoding an already lossily compressed audio stream?"
[14:52:21 CEST] <JEEB> which with something like AC3 is "no"
[14:52:34 CEST] <JEEB> you would just be losing even more quality and not gaining much compression
[14:54:25 CEST] <pink_mist> (well, I believe there is some form of AC-3 that is lossless ... but maybe it's only with E-AC-3? I dunno... something TrueHD something)
[14:55:27 CEST] <JEEB> TrueHD is actually meridian lossless
[14:55:40 CEST] <JEEB> which is unlike DTS-HD MA (XLL extension) not an extension
[14:55:44 CEST] <JEEB> it's its own stream
[14:56:00 CEST] <JEEB> although on blu-ray you can find an AC-3 stream muxed in the same elementary stream
[14:56:03 CEST] <JEEB> :)
[14:56:12 CEST] <JEEB> but those are actually (*gasp*) completely separate
[14:57:13 CEST] <Adcock> JEEB: How can I get detailed info of codec of a file using ffmpeg?
[15:00:31 CEST] <JEEB> ffprobe -v verbose -i INPUT ?
[15:06:52 CEST] <Beam_Inn> is there a command to just trim a video from start to end?
[15:07:20 CEST] <Beam_Inn> like ffmpeg -i input.mp4 -o output.mp4 -s startTime -e endTime?
[15:07:49 CEST] <Adcock> JEEB: Thank you man.
[15:08:06 CEST] <Adcock> I apologize for misbehaving.
[15:08:18 CEST] <Adcock> I had a rough day!
[15:09:18 CEST] <Beam_Inn> jeeze....
[15:09:24 CEST] <Beam_Inn> i hope this guy doesn't actually kill his dog
[15:30:05 CEST] <Adcock> https://paste.ubuntu.com/p/ppdP4DTYRg/
[15:33:04 CEST] <Adcock> it says 5.1 side
[15:33:31 CEST] <Adcock> It doesn't say dd 5.1
[15:34:08 CEST] <JEEB> I've just interpreted "DD 5.1" as "AC3, 5.1"
[15:34:17 CEST] <JEEB> the actual channel layout is 5.1 (side) yes
[15:34:28 CEST] <JEEB> as opposed to the other 5.1 layout which is somewhat different
[15:34:46 CEST] <JEEB> since dd is "dolby digital" and that's -> AC3
[15:36:57 CEST] <machtl> Hi guys,
[15:37:49 CEST] <machtl> therefore i created a github repro for the test
[15:38:14 CEST] <machtl> second problem is that i want to be able to loop the output (in this example [videoout] ) for x times or inifnite
[15:47:44 CEST] <pink_mist> I think you may have missed some lines
[15:57:18 CEST] <machtl> pink_mist did you mean my question?
[15:57:51 CEST] <kepstin> machtl: your question is missing, perhaps you made a too-long message and it got dropped?
[15:58:05 CEST] <machtl> ok..
[15:58:28 CEST] <machtl> iam currently trying to make a playlist server (own playlist format which just builds a huge ffmpeg command) with a ui (nodejs, vue) to create a stream with ffmpeg and iam facing a few problems but it already would really help to solve 2 of them.
[15:58:36 CEST] <machtl> therefore i created a github repro for the test
[15:58:43 CEST] <machtl> https://github.com/martinlierschof/ffmpeg_test
[15:58:50 CEST] <machtl> first problem ist that the audio stream used is always started from the beginning.
[15:58:57 CEST] <machtl> second problem is that i want to be able to loop the output (in this example [videoout] ) for x times or inifnite
[15:59:50 CEST] <fpihl> Let's say I have 100 files in ray y4m format and I'd like to concatenate them into one single file. How do I do that? `ffmpeg -f concat -i mylist.txt -c copy output` returns an error.
[16:00:02 CEST] <kepstin> fpihl: what error?
[16:00:11 CEST] <kepstin> (please pastebin the complete output)
[16:00:30 CEST] <fpihl> kepstin: give me a minute...
[16:01:53 CEST] <kepstin> machtl: first thing to note is that the ffmpeg cli is designed as a batch processing tool, unless you explicitly set a start position or give it a live stream as an input it will always start at the start and go to the end.
[16:03:39 CEST] <kepstin> machtl: and ... looping is tricky. in order to loop filter output, it would have to store the filter output temporarily somewhere - the "loop" and "aloop" filters doe this, but they buffer *in ram*, which can be kinda huge as you might expect
[16:05:16 CEST] <fpihl> kepstin: [yuv4mpegpipe @ 0x56477a300380] ERROR: Codec not supported.
[16:05:16 CEST] <fpihl> Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
[16:05:39 CEST] <kepstin> fpihl: please try again but this time pastebin the complete output
[16:06:10 CEST] <kepstin> since the rest of the output contains context for that error message that will explain *why* it's not working
[16:07:10 CEST] <machtl> kepstin: is there anything i could do within the cli or should i just try to build something around the libs or build a patched version of ffmpeg
[16:07:34 CEST] <kepstin> machtl: if you want to loop the result of filtering stuff, it's probably best to run one command that saves the filtered video or audio to a file, and then use that as an input to another ffmpeg command, using the -stream_loop input option.
[16:07:59 CEST] <machtl> ok this sounds ok, i guess
[16:08:43 CEST] <machtl> kepstin: still the livestreaming audio is somewhat of a problem i guess
[16:09:17 CEST] <fpihl> kepstin: see https://pastebin.com/mnf8qHSS
[16:09:22 CEST] <machtl> is there any way i can find the length of an input (as frames or so) in a filter?
[16:11:20 CEST] <kepstin> machtl: no, filters don't know the length of the input. (what if the input to a filter is a different filter that changes the input length? etc.) They just process input one frame at a time until they're told there's no more frames.
[16:14:39 CEST] <kepstin> fpihl: for weird technical reasons, ffmpeg's y4m writer doesn't work with -c copy. It should do what you expect if you drop that from the command line.
[16:16:30 CEST] <machtl> kepstin: thats indeed a problem for my project, even when looping it by writing it in a video file i will never have "live" audio from the stream, so the same audio will be looped as well, dang it.
[16:17:00 CEST] <machtl> kepstin: do you think i could get this to work by building my own lib on top of libavutils, etc...
[16:18:09 CEST] <kepstin> machtl: i dunno why you're not getting live audio. that's an icecast stream so it doesn't even support non-live audio, and it works fine with ffplay
[16:20:48 CEST] <dimvasilk> Hello,
[16:20:49 CEST] <dimvasilk> I am  attempting to compile ffmpeg 4.1.4 for Raspbian with MMAL and OMX enabled under Ubuntu WSL. I generated a toolchain via ct-ng and am running into issues wen attempting to run the configure script (config.log: https://gist.github.com/d-v/d538ab9442bc60fc22f00f62ee6acf8f).
[16:20:49 CEST] <dimvasilk> Things I have tried to fix the issue:
[16:20:50 CEST] <dimvasilk> I cloned the userland GitHub repo and built to get the appropriate headers generated as I assume this is why config.log is complaining about interface/mmal/mmal.h. I then  attempted to include these .h  files by providing the sysinclude= and incdir= paths. This didnt work, so I poked around in configure and added directly to incdir. Alas, this a
[16:20:50 CEST] <dimvasilk> lso did not fix the issue.
[16:20:51 CEST] <dimvasilk> How can I successfully finish the configure script and get ffmpeg built?
[16:20:51 CEST] <dimvasilk> I feel like Im missing something glaringly obvious, apologies if this is a really basic question.
[16:21:01 CEST] <machtl> kepstin: the liveaudio is not the problem, the problem is that ffmpeg somehow seems to buffer the stream (starts reading the stream when reading the input) and always start from the beginning not the current position of the stream when i mix it in a video
[16:21:03 CEST] <fpihl> kepstin: That did work! Thanks!
[16:21:09 CEST] <nine_milli> blb
[16:22:32 CEST] <kepstin> machtl: ffmpeg keeps timestamps aligned when working with stuff. by default it sets each input to start at time=0. the issue is that you're doing 3 amixes in parallel starting at the start of the stream, and then concatenating the result afterwards.
[16:23:29 CEST] <kepstin> (i'd actually expect to get some internal buffer overflows if your segments were long with this setup)
[16:24:01 CEST] <machtl> kepstin: if i use the stream 3 times as input it would work?
[16:24:29 CEST] <kepstin> machtl: no, it'll still do (almost) the same thing
[16:24:57 CEST] <kepstin> machtl: you need to concatenate the three audio tracks from the p4 files *before* mixing them with the live stream
[16:25:09 CEST] <kepstin> from the mp4 files*
[16:25:46 CEST] <kepstin> this gets tricky with how you want to mute the live stream part of the time tho. :/
[16:26:45 CEST] <kepstin> what's the final result that you want from this, anyways?
[16:28:48 CEST] <machtl> i want videos in a playlist to play one after another, some have their own audio and some have webradio "live" as audio, then start loop the playlist again.
[16:29:18 CEST] <kepstin> machtl: alright, you're not going to be able to do that with the ffmpeg cli :/
[16:29:50 CEST] <machtl> ok thats good to know before i put too much time in it
[16:30:08 CEST] <machtl> i was hoping i could do that
[16:30:26 CEST] <kepstin> well, i suppose you could, but you'd have to a) programmatically generate a filter command line with video durations known in advance, and b) handle looping by restarting the ffmpeg command when it exits.
[16:31:18 CEST] <kepstin> it's not the best tool for this job (but i don't know what is)
[16:31:37 CEST] <kepstin> you're looking for more of a broadcast mixer than a batch video processing tool
[16:42:33 CEST] <machtl> hmm this sound like a good way to go
[16:47:21 CEST] <philn> hi folks, i've registered a new account on your trac in order to report a bug, but... i haven't received the confirmation email to validate my account
[16:47:40 CEST] <philn> i tried to open 2 accounts with different email addresses...
[16:49:00 CEST] <philn> oh, hi superdump ;)
[16:49:41 CEST] <durandal_1707> what kind of bug?
[16:50:21 CEST] <philn> i have an AAC LC file muxed in mp4 that plays distorted with ffplay
[16:50:49 CEST] <durandal_1707> have you checked your spam?
[16:51:05 CEST] <philn> yes
[16:51:17 CEST] <durandal_1707> gmail accounts or some others one?
[16:51:25 CEST] <machtl> kepstin: btw. i just mute the audio tracks like that so i can use duration=shortest, when i trim the livestream i dont need to do that
[16:52:24 CEST] <philn> durandal_1707: some others one
[16:52:56 CEST] <durandal_1707> note that others one tend to be banned last time i checked to fight spam
[16:54:18 CEST] <philn> banned how? ignore all users not on gmail?
[16:56:20 CEST] <durandal_1707> i dunno details, but some are indeed disabled
[16:56:53 CEST] <durandal_1707> and other non-gmail works fine...
[17:00:39 CEST] <durandal_1707> philn: you could report it to user mailing list with link to uploaded file, also you could try to contact trac admin
[17:04:18 CEST] <philn> let's hope my mail will be accepted on your mailing list then...
[17:05:03 CEST] <philn> durandal_1707: which list? -user or -devel ?
[17:07:46 CEST] <durandal_1707> try both, ignore complains from Carl
[18:34:30 CEST] <machtl> hey another question.... i restart my streaming ffmpeg now several times and iam using a buffer for it ...
[18:34:33 CEST] <machtl> https://pastebin.com/R1z3KudY
[18:35:18 CEST] <machtl> how can use the buffer as a file so i dont overflow the ffplay
[18:36:05 CEST] <machtl> currently i use ffplay udp://127.0.0.1:23000 to recieve it
[18:36:39 CEST] <machtl> or at least keep it consistent across multiple starts of ffmpeg
[18:39:22 CEST] <machtl> obviously the ffmpeg instance starts fast and slows down when the buffer size is reached, then its finished while ffplay is still playing and restarts.  Therefore ffplay keeps increasing in memory when i restart the ffmpeg 20x
[18:41:42 CEST] <kepstin> machtl: ffmpeg cli is a batch processing tool which is designed to run as fast as possible
[18:42:37 CEST] <kepstin> there's a hack builtin where you can use the "-re" input option (on specific inputs) to tell ffmpeg to pace itself to realtime when reading that input, instead of going as fast as possible
[18:42:59 CEST] <kepstin> this isn't required if the input is live (like your icecast stream), only if you're reading from something like a local file
[18:46:21 CEST] <machtl> hmm i thought its possible to slow it down via a fifo buffer and i thought i archived this with (-b:v 2300k -minrate 2300k -maxrate 2300k -bufsize 95k `)
[18:47:11 CEST] <another> machtl: this may be helpful: https://trac.ffmpeg.org/wiki/Encode/H.264#AdditionalInformationTips
[19:06:50 CEST] <kepstin> machtl: that's not what those options do - they don't add a buffer or limit encoding to realtime or anything like that, instead they configure how bitrate is allocated.
[19:10:57 CEST] <machtl> kepstin: thanks i had a look at that, hmm i have a lot to learn with ffmpeg it seems :)
[19:13:59 CEST] <machtl> is there nothing i can do to any output (udp, pipe, .. ) where iam able to just fill a fifo buffer, i dont really need to stream, its anyway playing on the same pc. when the fifo buffer is full, ffmpeg waits until there is space again
[19:21:48 CEST] <DHE> mpegts has an option -muxrate for CBR mode, and then the udp sender has an option -bitrate to throttle transmission. combined with -re for input throttling, you should get a good result. just need to select a good number and specify to both args
[21:17:07 CEST] <brx_> i want to combine an mp4 with an mp3 and keep the audio from the mp4, here is my command...
[21:17:12 CEST] <brx_> ffmpeg -y -i video.mp4 -i video.mp4 -i sunflower.mp3 -preset ultrafast -crf 30 -c:v copy -c:a copy out.mp4
[21:17:31 CEST] <brx_> problem is the mp3 audio isnt there, it only has the video and the audio from the mp4
[21:18:35 CEST] <brx_> sorry this is my command.... ffmpeg -y -i video.mp4 -i sunflower.mp3 -preset ultrafast -crf 30 -c:v copy -c:a copy out.mp4
[21:20:58 CEST] <CoreX> try mapping the streams
[21:21:22 CEST] <CoreX> https://trac.ffmpeg.org/wiki/Map
[21:28:37 CEST] <nine_milli> blb
[21:30:23 CEST] <brx_> CoreX, i tried to do that but I just end up with the mp3 audio and nother else in the output file...here was the command...
[21:30:32 CEST] <brx_> ffmpeg -y -i video.mp4 -i sunflower.mp3 -map 0:0 -map 0:1 -map 1:0 -preset ultrafast -crf 30 -c:v copy -c:a copy out.mp4
[21:31:12 CEST] <another> nine_milli: please stop spamming
[21:31:29 CEST] <brx_> -map 0:0 -map 0:1 -map 1:0.......... 0:0 = video from mp4, 0:1 = audio from mp4, 1:0 = the audio from the mp3
[21:31:32 CEST] <brx_> is that correct?
[21:31:54 CEST] <another> not exactly
[21:32:17 CEST] <another> -map 0:0 ---> map stream zero from input 0
[21:32:49 CEST] <another> that doesn't have to be the video stream
[21:36:51 CEST] <brx_> ahh i did ffmpeg -i video.mp4 and i see there are 2 streams...
[21:37:00 CEST] <brx_> Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 97 kb/s (default)
[21:37:12 CEST] <brx_> Stream #0:1(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/smpte170m), 720x1280, 2116 kb/s, SAR 1:1 DAR 9:16, 29.56 fps, 29.75 tbr, 90k tbn, 180k tbc (default)
[21:38:37 CEST] <another> brx_: ffmpeg -i video.mp4 -i sunflower.mp3 -map 0:v -map 1:a -c copy out.mp4
[21:40:02 CEST] <brx_> i tried your command, the out file only has the mp3 file audio, i dont see any video/audio from the mp4 :(
[21:40:49 CEST] <kepstin> brx_: that command if you copied it correctly will have the video from the mp4 and audio from the mp3
[21:41:11 CEST] <brx_> ok ill use pastebin sorry
[21:41:45 CEST] <kepstin> brx_: do you want to mix the audio streams? (i.e. have the audio from video.mp4 and the audio from sunflower.mp3 play back at the same time?)
[21:41:58 CEST] <brx_> yes i want both the audio streams
[21:42:12 CEST] <brx_> i tried another's command exactly but only actually got the mp3 audio
[21:42:29 CEST] <brx_> i want to mix the audio streams, yes
[21:42:52 CEST] <another> ah
[21:43:41 CEST] <kepstin> right, then to actually need to apply some filters to do the mix
[21:44:51 CEST] <brx_> here is the 2 files i am trying to mix together https://pastebin.com/AVF86p4k
[21:45:02 CEST] <brx_> 1 mp4 file and 1 mp3 file
[21:45:24 CEST] <kepstin> something to the effect of "ffmpeg -i video.mp4 -i sunflower.mp3 -map 0:v -c:v copy -filter_complex '[0:a][1:a]amix[aout]' -map '[aout]' out.mp4
[21:47:58 CEST] <brx_> ok kepstin your command kind of worked, however there was just 1 frame of video on the screen throughout
[21:48:06 CEST] <brx_> so i changed it to this....
[21:48:08 CEST] <brx_> ffmpeg -i video.mp4 -i sunflower.mp3 -map 0:v -c:v copy -filter_complex '[0:a][1:a]amix[aout]' -map '[aout]' -shortest out.mp4
[21:48:12 CEST] <brx_> (shortest)
[21:48:21 CEST] <brx_> and the video plays and its trimmed nicely to the duration of the video
[21:48:38 CEST] <brx_> this works, i can see the video and both of the audio is mixed over
[21:49:58 CEST] <brx_> thanks guys, i hope i can get some more help tomorrow from you all, very helpful indeed
[22:12:19 CEST] <nine_milli> blb
[23:39:00 CEST] Last message repeated 1 time(s).
[00:00:00 CEST] --- Fri Jul 26 2019


More information about the Ffmpeg-devel-irc mailing list