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

burek burek021 at gmail.com
Tue Mar 20 03:05:02 EET 2018


[00:20:44 CET] <keglevich> hey all...I'm desperately tring to get clean UDP multicast stream with ffmpeg...tried various different combinations with command line... I'm trying to play a simple mp4, mpg, mkv, avi files...stream them udp multicast on LAN...tried different PC's, different NIC's...I'm out of luck...each time I get some artifacts (now and then, squares, some lines at the bottom picture) when playing the stream in VLC
[00:21:06 CET] <keglevich> is there a command line that should 100% work?
[00:21:33 CET] <keglevich> that's the sample command for instance: "ffmpeg -re -i test.mkv -b:v 2500k -minrate 2500k -maxrate 2500k -f mpegts "udp://239.1.1.1:5000?ttl=64&pkt_size=1316"
[00:22:00 CET] <keglevich> and I tried various other parameters, higher bitrates, etc... the stream I need is mpegts, mpeg2video, mp2 audio
[00:22:06 CET] <keglevich> I also tried libx264, same thing...
[00:22:19 CET] <TD-Linux> furq / azarus tiles adds more threads at the expensive of more compression loss than row-mt
[00:22:19 CET] <DHE> add: -muxrate 4M -bitrate 4M  just before the output
[00:22:38 CET] <DHE> bitrate it a udp option and could be added to the URL instead
[00:22:43 CET] <TD-Linux> if you can get 100% usage with only row-mt, do that
[00:22:45 CET] <keglevich> however...all I'm asking is if someone can provide me with a complete line that should output multicast udp mpegts stream without any artifacts or hiccups
[00:22:53 CET] <DHE> keglevich: ^^
[00:23:13 CET] <keglevich> DHE, I'm trying this right away...I'll report back!
[00:23:48 CET] <DHE> if it rejects the bitrate option, upgrade ffmpeg and try again.
[00:28:24 CET] <keglevich> DHE: if I have fullhd clips, would this be ok: "ffmpeg -re -i 1.divx -b:v 15000k -minrate 15000k -maxrate 15000k -f mpegts "udp://239.1.1.1:5000?ttl=64&pkt_size=1316&bitrate=4M&muxrate=4M"
[00:30:18 CET] <DHE> no... -muxrate must exceed audio+video bitrates by around 15% and it's a normal parameter.
[00:30:30 CET] <DHE> and then bitrate goes to the same number
[00:31:06 CET] <keglevich> ok...can I pass muxrate=4M as UDP parameter above?
[00:31:19 CET] <keglevich> or should I pass the parameter to ffmpeg before output
[00:31:23 CET] <DHE> I think so...
[00:31:51 CET] <keglevich> I tried it... ffmpeg didn't complain...watching the stream now, I'll report...
[00:43:50 CET] Action: DHE is curious of the result
[00:45:29 CET] <keglevich> DHE: you won't believe but the difference is huge...it's amazing actually... I'm wathing the stream for about 10mins now, practically no issues...it's flawless...I don't know how to thank you really, but that means a lot to me!
[00:45:45 CET] <DHE> oh I believe it. I do this regularly. :)
[00:46:29 CET] <keglevich> ?ttl=64&pkt_size=1316&bitrate=4M&muxrate=4M ... that's the thing I added behing the UDP, and that's another dimension now it seems
[00:47:02 CET] <DHE> muxrate doens't belong to the udp url. it's a normal parameter. "-muxrate 4M" (or whatever is appropriate for the bitrate of what you're streaming)
[00:47:16 CET] <furq> the real question is why you have 1080p divx
[00:47:33 CET] <DHE> mpeg4 part2 hasn't been used in, what, 10 years now?
[00:47:41 CET] <furq> also that command is encoding to mpeg2video
[00:47:51 CET] <furq> and whatever the default audio codec for mpegts is, presumably mp2
[00:47:51 CET] Action: JEEB has seen mpeg-4 part 2 in internal multicasts
[00:47:55 CET] <furq> you probably want to change that
[00:48:01 CET] <JEEB> I was surprised but hey - it exists
[00:48:07 CET] <DHE> wow...
[00:48:17 CET] <JEEB> exactly what I thought as well
[00:48:41 CET] <furq> i've seen some 1080p stuff tagged as x264 which was actually mpeg4
[00:48:46 CET] <furq> but that was just idiots on line
[00:49:13 CET] <furq> i have also seen stuff tagged as x264 which was actually just output from makemkv
[00:49:15 CET] <JEEB> yea, you don't expect mpeg-4 part 2 in a broadcast environment
[00:49:22 CET] <furq> from a dvd
[00:49:26 CET] <JEEB> buut been there seen that :D
[00:49:46 CET] <JEEB> (although they do have the enterprisey profiles which kierank was poking at, so it's being used in some ways it seems)
[00:50:02 CET] <furq> i have to suspect 99% of modern uses of mpeg-4 part 2 are by mistake
[00:50:08 CET] <furq> and then 1% weird legacy shit
[00:51:25 CET] <keglevich> DHE: are there any other parameters important for a clean UDP multicast mpegts that you can think of, or are those two actually enough?
[00:52:35 CET] <DHE> keglevich: that's usually it... muxrate isn't 100% mandatory, but it will make ffmpeg generate alarms if you exceed the set bitrate and some players (especially in real TV broadcast environments) depend on it.
[00:52:52 CET] <DHE> anything else is external to ffmpeg, like high end switches kicking off storm control when doing multicast
[00:52:53 CET] <JEEB> I couldn't debug the network in which this happened, but I've had cases where just setting packet sizes and muxrate didn't help (together with maxrate/bufsize on the encoding side).
[00:53:12 CET] <JEEB> or well, it did help but the darn receiving end was so darn finicky
[00:53:20 CET] <JEEB> it went from "no image" to "losing image every now and then"
[00:53:45 CET] <keglevich> that's something I was experiencing as well...
[00:53:51 CET] <DHE> storm control?
[00:54:11 CET] <keglevich> also I tried two different switches...mikrotik I have now here has a storm control...lower firmware works bettern than the latest
[00:54:33 CET] <keglevich> but again...two PC's with direct UTP patch connection didn't make a difference
[00:55:01 CET] <JEEB> I tried pushing the same multicast back at the receiver that was coming up to that box I was poking, but there was some program-based limiting in the whole network so I couldn't just push the stream around as-is
[00:55:14 CET] <JEEB> so I couldn't see if that would fail as well :P
[00:56:26 CET] <keglevich> I'm playing with this devil for about a week now...rtmp works ok more or less, but I had huge headaches with udp multicast...I already "won" a few times...but just for a while...about 30mins, and problems appeared again...
[00:56:43 CET] <keglevich> changed switches, PC's, NIC's, drivers, ffmpeg versions, etc...
[00:57:11 CET] <keglevich> nothing really helped much...now those two settings "bitrate, muxrate 4M" make huge difference...for now
[00:57:50 CET] <DHE> the secret really is to space out packets exactly. if you're streaming at 10.528 megabits (which is exactly 1000 packets per second at 1316 bytes) then you should be sending 1 packet per millisecond, on the dot. or as close as possible.
[00:58:44 CET] <DHE> without the bitrate option, ffmpeg will just blast packets onto the network as data becomes available and the bursty nature will result in packet loss all over the place
[01:00:42 CET] <keglevich> DHE: you know much more then I do, it's clear.... for instance, if I'm using mpeg2 video bitrate 15000, audio mp2 bitrate 192kbps... what exact values should I choose then for muxrate, bitrate, video bitrate, audio bitrate?
[01:01:45 CET] <DHE> 15M is ballpark right for 1080 video at 30fps. audio in mpeg2? maybe 192k or so? muxrate=bitrate=that formula I gave you above
[01:02:18 CET] <DHE> but don't be afraid to experiment a bit. if the image looks bad compared to the original, turn the video bitrate up a notch (and recalculate)
[01:05:03 CET] <keglevich> ok, I'll play with these settings tomorrow...you'll be around tomorrow about the same time? I'll be glad to report back...
[01:05:30 CET] <DHE> I can't make promises. but there's plenty of other smart people in the chatroom.
[01:06:20 CET] <keglevich> that's true for sure...but anyway, you helped me a lot...so thank you for now
[08:39:49 CET] <Jerry007B> Hi,
[08:39:49 CET] <Jerry007B> I am using FFmpeg to capture what is happening in my app, but I ran into an issue I need help solving. The issue is that while capturing with parameter
[08:39:50 CET] <Jerry007B> -i title=MyApp, the title of the window is not visible and mouse is way off the button it's clicking. I assume it is caused by missing title of the window.
[08:39:50 CET] <Jerry007B> ffmpeg -y -rtbufsize 100M -f gdigrab -framerate 20 -probesize 10M -draw_mouse 1 -i title="Klik" -c:v libx264 -r 30 -preset ultrafast c:/video_test.mkv
[08:39:50 CET] <Jerry007B> https://www.dropbox.com/s/rdqpw88zxh4y2tq/video_test_title.mkv?dl=0
[08:39:50 CET] <Jerry007B> So how can I have title shown or mouse positioned correctly? I need to record only that one application.
[09:29:13 CET] <Jerry007B> Any help is appreciated.
[11:44:39 CET] <rk> Hi, I am muxing a vp8 stream to a webm file using libavformat. The output webm file doesn't contain duration field in the segment info. I need to have duration on the file file meta info. Why is this not updated in the file ?
[12:09:14 CET] <mischief> hi, when i encode pcm_s16le into an avi file, the fourcc code is set to 0x01 0x00 0x00 0x00. shouldn't it be something else? i see 'sowt' and 'lpcm' defined in the source
[12:24:35 CET] <th3_v0ice> Hi all! Can somebody tell me how to properly set the DAR for output stream? I am doing this with FFmpeg C API.
[13:14:54 CET] <a-l-e> i have a bit of a hard time understanding how to do different types of overlays...
[13:15:33 CET] <a-l-e> ... so before digging deeper, one question: if i want to add a png as an overlay to a webm, do i need to define it as "-filter-complex"?
[13:16:27 CET] <a-l-e> and: if i just want to add some text, i don't need a filter complex?
[13:16:44 CET] <a-l-e> and if i want to do both, then i just do a filter-complex with both?
[13:23:46 CET] <a-l-e> and if i need filter-complex, is there a good resource that explains what [0:1] & co mean?
[13:26:03 CET] <a-l-e> in [i,j] is i the video stream and j the audio stream?
[13:39:46 CET] <a-l-e> i mean, i keep on finding examples like this and no real explanation on what it really means...
[13:39:51 CET] <a-l-e> ffmpeg.exe -i vid1.mp4 -i vid2.mp4 -i vid3.mp4 -i vid4.mp4 -filter_complex "[0:0]scale=iw/2:ih/2,pad=iw*2:ih*2[a];[1:0]scale=iw/2:ih/2[b];[2:0]scale=iw/2:ih/2[c];[3:0]scale=iw/2:ih/2[d];[a][b]overlay=w[x];[x][c]overlay=0:h[y];[y][d]overlay=w:h,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid1':x=35:y=35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid2':x=(w/2)+35:y=35,drawtext=font
[13:39:51 CET] <a-l-e> size=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid3':x=35:y=(h/2)+35,drawtext=fontsize=12:fontcolor=white:fontfile=/Windows/Fonts/arial.ttf:text='vid4':x=(w/2)+35:y=(h/2)+35" 4UP_Video.mov
[13:40:36 CET] <a-l-e> https://stackoverflow.com/questions/13826652/ffmpeg-multiplexing-4-videos-into-1-and-drawtext-problems
[13:42:30 CET] <jkqxz> "[N:M]" is the Mth stream in the Nth input file.
[13:43:19 CET] <jkqxz> You want filter_complex if your graph is not a simple one-input-to-one-output setup.
[13:44:38 CET] <a-l-e> ok, i try to put something together...
[14:01:14 CET] <a-l-e> i've put a draft of what i've understood until now...
[14:01:16 CET] <a-l-e> https://hackmd.io/TN6v7oUhSYiKktohB6RlRA
[14:01:38 CET] <a-l-e> does it make sense?
[14:02:29 CET] <a-l-e> the goal is to put two PNGs and two strings on top of a webm file (some sort of subtitles)
[14:02:30 CET] <Inoue> Hi
[14:04:14 CET] <a-l-e> (the hackmd.io link above is editable... i welcome comments and fixes)
[16:01:58 CET] <a-l-e> https://stackoverflow.com/questions/41157018/add-two-images-and-two-text-in-video-using-ffmpeg
[16:02:17 CET] <a-l-e> what's the "v" in [0:v]?
[16:02:46 CET] <c_14> all the video streams in the first input
[16:02:59 CET] <a-l-e> ok, thanks
[16:03:26 CET] <c_14> https://ffmpeg.org/ffmpeg.html#Stream-selection
[16:03:30 CET] <c_14> read through section 5.1
[16:04:34 CET] Action: a-l-e is starting reading...
[16:08:53 CET] <a-l-e> what is the best option to add a png for 2 seconds at specific point of a webm?
[16:09:14 CET] <a-l-e> sorry, wrong question.
[16:09:33 CET] <a-l-e> wuaht's the best option to concatenate two webm and put a png in the middle for 2 seconds?
[16:11:36 CET] <a-l-e> ffmpeg -loop 1 -i slide.png -t 2 -c:v libvpx-vp9 -pix_fmt yuv420p slide.webm
[16:12:27 CET] Action: a-l-e has read the chapter, on stream specifier and somehow understood it...
[16:14:38 CET] <c_14> loop the png, trim it to 2s then use the concat filter
[16:14:40 CET] <c_14> probably
[16:15:13 CET] <c_14> or use the png to create a 2s webm using loop and -t and then use the concat demuxer
[16:15:34 CET] <a-l-e> ok, the concat comes later...
[16:15:55 CET] <a-l-e> is the line above a good way to create the 2 seconds webm from a png?
[16:17:12 CET] <c_14> seems fine
[16:17:26 CET] <c_14> You'll want to make sure the webms all have the same settings
[16:17:32 CET] <c_14> codec/res/etc
[16:17:39 CET] <c_14> that'll make concat easier
[16:18:20 CET] <a-l-e> yes, codec and size are all the same : - )
[16:19:34 CET] <keglevich> I'm struggling with multicast UDP stream...mpegts, mpeg2video, mp2 audio... whatever I do, whichever parameters I choose, I get artifacts on screen (squares, horizontal lines/traces) now and then.. it runs fine for a while, then becomes really distorted...tried other switches, NIC's, versions...same thing over and over
[16:19:55 CET] <keglevich> is there a full command-line ffmpeg line that would actually "work" ?
[16:21:32 CET] <c_14> What's your current command?
[16:21:51 CET] <c_14> I've used udp multicast before and it mainly just depends on the link bandwidth and hoping that nobody drops packets
[16:22:25 CET] <c_14> you'd probably want to use something like rtp that can compensate for packet losses but ffmpeg's rtp support isn't great
[16:22:46 CET] <keglevich> c_14 that last line "hoping that nobody drops packets" ... you're trying to say if someone is dropping packets in the LAN, other get issues too?
[16:23:04 CET] <keglevich> as I see the more computers play the same stream, the more issues appear
[16:23:20 CET] <c_14> if any node inbetween the sender and the receivers drops packets you're going to have issues
[16:23:36 CET] <DHE> you're still sending to multicast?
[16:24:09 CET] <keglevich> hey DHE...yes, I'm still strugling with that one...yesterday I tried to add muxrate and bitrate parameters, played a lot with them, but I was out of luck
[16:24:22 CET] <keglevich> the "thing" was working for about 30mins...then dropping packets again
[16:25:34 CET] <keglevich> c_14 by the "node" you mean any receiver that drops packets, or maybe a switch inbetween? As I only have one bigger switch, multiple PC's on it...and I tried different switches...
[16:25:50 CET] <c_14> switch or the sending nic
[16:25:58 CET] <c_14> a receiver dropping packets shouldn't do anything
[16:26:04 CET] <c_14> well, it'll mess up that receiver
[16:26:06 CET] <keglevich> ok, that's fine then
[16:26:07 CET] <c_14> but not the whole network
[16:27:49 CET] <DHE> what kind of switch?
[16:28:13 CET] <keglevich> ffmpeg -i 1.divx -vcodec mpeg2video -acodec mp2 -b:v 10M -b:a 192k -muxrate 10M -f mpegts "udp://239.1.1.1:5000?pkt_size=1316"
[16:28:37 CET] <keglevich> 1.divx is fullhd...that's the simplest command...then I added tons of params found online...nothing really lasts...
[16:28:44 CET] <DHE> there's no bitrate on this command...
[16:28:46 CET] <keglevich> switch is managed...mikrotik css326
[16:28:55 CET] <keglevich> and I tried cisco as well
[16:29:47 CET] <keglevich> I also followed that tutorial... http://www.waveguide.se/?article=creating-dvb-t-compatible-mpeg2-streams-using-ffmpeg
[16:30:04 CET] <keglevich> this command actually works ok...but the bitrate and resolution is too small and I can't use it
[16:34:27 CET] <a-l-e> ... trying hard...
[16:34:28 CET] <a-l-e> https://framabin.org/?6b57a010c6ec234d#/JqDI5Y+MmrgPGzi+p96I0/Hg6mB2sLDnzt4hOfUpH8=
[16:34:44 CET] <a-l-e> and i get "No output pad can be associated to link label 'text'."
[16:36:15 CET] <a-l-e> oh... a missing ;
[16:36:25 CET] <c_14> a-l-e: semicolon after [text] and before [text]
[16:36:30 CET] <stockstandard> could someone please help me diagnose the following ffmpeg issue I am having? https://pastebin.com/nW1Eer3P
[16:36:32 CET] <c_14> i.e. you're missing one there
[16:36:53 CET] <stockstandard> I am using the sickbeard_mp4_automator script... but think think the issues taht are being thrown are from ffmpeg
[16:37:07 CET] <keglevich> maybe one thing worth mentioning...if I play multicast locally in VLC (same computer where ffmpeg runs), I get no issues at all...the artifacts are always only visible on another computer...switch between or direct link UTP cross... same thing
[16:37:15 CET] <c_14> stockstandard: x264 [error]: not compiled with 10 bit depth support
[16:37:19 CET] <a-l-e> thanks c_14 this time i figured it out : - (
[16:37:37 CET] <stockstandard> c_14 what exactly does that mean?
[16:38:02 CET] <a-l-e> now i get an ouptut.webm... there is still an error, but it's probably in the way the text[12].webm are created!
[16:38:05 CET] <c_14> stockstandard: the copy of libx264 on your system does not have 10bit support but you're trying to force it anyway
[16:38:07 CET] <durandal_1707> sorry, torrenting is strongly prohibited here
[16:39:19 CET] <stockstandard> c_14 is there a way to get it?
[16:39:32 CET] <iive> stockstandard, color information is usually 8 bits per component sample, e.g. rgb 8+8+8. the video you are decoding is probably using higher bit depth for it. e.g. 10+10+10.
[16:39:43 CET] <stockstandard> yeah its 4k
[16:40:12 CET] <iive> stockstandard, x264 can be compiled to support these bitdepths,
[16:40:32 CET] <iive> stockstandard, or you could simply convert the image from 10 to 8 bit.
[16:40:47 CET] <stockstandard> am using   libxml2-dev \
[16:40:55 CET] <stockstandard> is there a version I can switch to that can handle it?
[16:41:24 CET] <iive> usually 10bit H264 provides better compression, but many HW decoders cannot handle it.
[16:45:57 CET] <stockstandard> Would changing from 10 to 8 significantly effect quality?
[16:46:18 CET] <keglevich> DHE you maybe have any other suggestions?
[16:46:44 CET] <iive> stockstandard, in the past, libx264 used separate builds for 8 bit and higher bit depths (10). Now there is a new version that allows combining both.
[16:46:56 CET] <durandal_1707> stockstandard: drastically, it uses 1/5 less bits
[16:47:47 CET] <stockstandard> ahh no point in having a 4k tv if converting to lose quality
[16:47:53 CET] <stockstandard> iive which version is that?
[16:48:41 CET] <durandal_1707> transcoding ruins quality anyway, so unless you use lossless mode, i fail to see what you want to accomplish
[16:49:12 CET] <Foaly> many devices can't even display more than 8 bits per channel
[16:51:02 CET] <keglevich> ffmpeg -re -i [source] -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 1000000000 -b:v 2M -minrate:v 2M -maxrate:v 2M -bufsize:v 1.4M -acodec mp2 -ac 2 -b:a 192k -f mpegts udp://239.253.253.4:1234?pkt_size=1316
[16:51:35 CET] <keglevich> this command works pretty ok for SD...is there an option to change values so it could also work ok for 1920x1080?
[16:51:49 CET] <iive> stockstandard, the commit seems to be from jan 6...
[16:51:59 CET] <a-l-e> how can i check if the webm i've created keeps the transparencies?
[16:52:03 CET] <keglevich> I tried to change the values from 2M to 20M and 1.4M to 14M, but the result is bad
[16:52:04 CET] <iive> 2017
[16:52:36 CET] <durandal_1707> a-l-e: do you have alpha plane/component in your video?
[16:52:48 CET] <a-l-e> durandal_1707, how can i check?
[16:53:11 CET] <stockstandard> iive just tweaked some settings and think I got it working... was only capturing h265...needed to also capture hevc and x265
[16:53:51 CET] <durandal_1707> a-l-e: look at ffprobe output, look for pixel format
[16:53:52 CET] <iive> H265 is HEVC.
[16:55:57 CET] <a-l-e> durandal_1707, this is the result:
[16:55:59 CET] <a-l-e> https://framabin.org/?dafa477d7eb8fb18#f7Sik2oYVi+PpaLwQJAY+tieEq3dmSRr5Q5yQPvVssM=
[16:56:39 CET] <durandal_1707> a-l-e: use less shitty pastebin
[16:57:04 CET] <durandal_1707> not gonna run javascript browser specifically for this
[16:57:17 CET] <a-l-e> euh... it needs js?
[16:57:18 CET] <a-l-e> sorry.
[16:58:01 CET] <a-l-e> durandal_1707, let's hope this one is better:
[16:58:04 CET] <a-l-e> https://paste.opensuse.org/41134884
[16:58:46 CET] <durandal_1707> a-l-e: yuv420p does not have letter "a" so no alpha is saved
[17:00:47 CET] <DHE> keglevich: I want to see your complete command-line based on my suggestion from yesterday
[17:03:16 CET] <keglevich> ffmpeg -re -i 3.mp4 -vcodec mpeg2video -s 1920x1080 -r 25 -flags cgop+ilme -sc_threshold 1000000000 -b:v 20M -minrate:v 20M -maxrate:v 20M -bitrate 22M -muxrate 22M -bufsize:v 1.4M -acodec mp2 -ac 2 -b:a 192k -f mpegts udp://239.5.5.5:5000?pkt_size=1316
[17:04:22 CET] <keglevich> probably half of these params are not ok?
[17:04:41 CET] <durandal_1707> a-l-e: hmm, i may be wrong, check with some other utillity, ffprobe + alpha in webm may be problematic
[17:06:49 CET] <keglevich> DHE... and another funny/strange thing...I have one iMac in the same LAN and about 5 PC's...on all 5 PC's there are clear issues, visible artifacts...but on iMac almost none, or completely none at all
[17:07:03 CET] <iive> keglevich, i'm not expert of ffmpeg cli, but afaik -b is short for bitrate. also the default options for mpeg2 are for realtime on Pentium3... so you might want to add things like trellis of -cmp . if we still have these.
[17:07:41 CET] <DHE> iive: -bitrate is an option for the udp:// protocol
[17:07:55 CET] <DHE> it makes packets get throttled
[17:07:56 CET] <iive> oh
[17:08:09 CET] <a-l-e> now, the command for creating the webm says:
[17:08:14 CET] <a-l-e> https://paste.opensuse.org/56666652
[17:08:23 CET] <a-l-e> ... the alpha should be there...
[17:08:50 CET] <durandal_1707> a-l-e: yup, it have "a"
[17:09:05 CET] <a-l-e> i'm overlaying it to the input.webm with:
[17:09:08 CET] <a-l-e> [text][1:v]overlay=0:0:enable='between(t,3,4)'[png1];
[17:10:16 CET] <a-l-e> the full command is:
[17:10:17 CET] <a-l-e> https://paste.opensuse.org/68498695
[17:10:37 CET] <a-l-e> it now works. but hte text1.webm and text2.webm have no transparencies.
[17:13:01 CET] <durandal_1707> a-l-e: then get transparencies into text1.webm and text2.webm?
[17:13:56 CET] <keglevich> DHE is there anything I should add/change with that command I pasted?
[17:14:05 CET] <a-l-e> durandal_1707, how?
[17:15:13 CET] <DHE> keglevich: nothing stands out...
[17:15:19 CET] <DHE> does it glitch or go out entirely?
[17:15:29 CET] <durandal_1707> a-l-e: same way you managed before, also make sure that order of inputs to overlay filter is correct
[17:15:37 CET] <a-l-e> the webm is created with:
[17:15:40 CET] <a-l-e> ffmpeg -loop 1 -i /tmp/tmp5dzzzjnh.png -t 1 -c:v libvpx-vp9 -pix_fmt yuva420p /tmp/tmpti_s7_2n.webm
[17:16:21 CET] <keglevich> just a few glitchs now and then...for a few minutes maybe almost ok, but then again it comes for a few minutes glitches over and over...and these are much more obivous on windows then on imac
[17:19:04 CET] Action: a-l-e is trying to play the webms in the browser to check for transparencies...
[17:19:56 CET] <a-l-e> yep, text1.webm has a transparency in the browser!
[17:20:11 CET] <a-l-e> so, it's the creation of the output.webm that is at fault.
[17:20:35 CET] <a-l-e> https://paste.opensuse.org/68498695
[17:20:58 CET] <durandal_1707> a-l-e: does output also needs to have alpha?
[17:21:20 CET] <a-l-e> not the final output, no.
[17:29:17 CET] <keglevich> ffmpeg -re -i [source] -vcodec mpeg2video -s 720x576 -r 25 -flags cgop+ilme -sc_threshold 1000000000 -b:v 2M -minrate:v 2M -maxrate:v 2M -bufsize:v 1.4M -acodec mp2 -ac 2 -b:a 192k -f mpegts udp://239.253.253.4:1234?pkt_size=1316
[17:29:39 CET] <keglevich> this one works quite fine...I'd just need to modify it to 1920x1080 and pass the same params to OBS...if this is even possible?
[17:30:28 CET] <durandal_1707> keglevich: yes, you want to rescale input or input is going to change?
[17:31:30 CET] <keglevich> durandal_1707 inputs will be fullhd, so I'd just like to modify that command to work as expected without any artifacts with them...
[17:31:38 CET] <keglevich> for SD content this command works quite well
[17:32:44 CET] <kepstin> well, when you go from sd to hd, you have to increase the bitrate to maintain quality - if you increase the bitrate, you're more likely to have issues with network such as dropped packets that leads to glitches.
[17:33:05 CET] <durandal_1707> and using udp...
[17:33:12 CET] <a-l-e> damned, now i understand what i was doing differently in the old example that did work with one signle file:
[17:33:21 CET] <a-l-e> i was overlaying directly the png, not a webm!
[17:33:34 CET] <keglevich> kepstin: and that's exactly what happens
[17:33:34 CET] <a-l-e> and with the png i get the transparency on top of my webm.
[17:34:47 CET] <kepstin> I'd expect that you shouldn't have any issue doing multicast hd video over udp within a single gigabit lan segment (where multicast is basically equivalent to broadcast), provided there's limited other traffic on the segment.
[17:37:13 CET] <a-l-e> problem solved for me... time by some food.
[17:37:13 CET] <a-l-e> thaks for your help!
[17:39:00 CET] Last message repeated 1 time(s).
[17:39:02 CET] <durandal_1707> great! we should celebrate now!
[17:40:35 CET] <keglevich> kepstin: it's strange, but these artifacts are much more present on PC's than on OSX inside the same gigabit LAN
[17:59:19 CET] <gloomy> Hi :)
[17:59:53 CET] <gloomy> I have the following command:
[17:59:54 CET] <gloomy> ffmpeg -i talk.mp4 -i header.mp4 -i logo_alpha.png -i end_pancarte.png -i start_pancarte.png -filter_complex "[0][2] overlay=x=15:y=15[logo],[logo][3] overlay=x=0:y=0:enable='sme(n,76)'[start], [start] [4] overlay=x=0:y=3:enable='gte(n,12390)' [end], [1:0] [1:1] [end:0] [end:1] concat=n=2:v=1:a=1" solution_total.mp4
[18:00:45 CET] <gloomy> It gives me the following error:  `Stream specifier 'end:0' in filtergraph description ... matches no streams`
[18:01:35 CET] <c_14> well yeah
[18:01:43 CET] <c_14> overlay only outputs one stream
[18:01:55 CET] <c_14> there is only an [end] no [end:0] or [end:1]
[18:02:05 CET] <gloomy> how come? my original file (talk.mp4) has streams [0:0] Video and [0:1] audio
[18:02:07 CET] <gloomy> Ah, ok
[18:02:22 CET] <gloomy> So I need to take the original audio stream as input for concat
[18:02:38 CET] <c_14> why are you trying to concat a video and audio stream anyway?
[18:02:41 CET] <c_14> that doesn't make sense
[18:02:46 CET] <c_14> you probably just want to map them
[18:03:01 CET] <gloomy> I'm not (knowingly)?
[18:03:21 CET] <c_14> oh, wait
[18:03:33 CET] <c_14> you probably want [1:0][1:1][end][3:1] or so
[18:03:51 CET] <gloomy> yup, I think :)
[18:03:51 CET] <furq> 0:1, not 3:1
[18:03:53 CET] <furq> but yeah
[18:04:05 CET] <c_14> wasn't he using [3] in the overlay?
[18:04:12 CET] <furq> 3 is a png
[18:04:20 CET] <c_14> right
[18:04:24 CET] <c_14> didn't even look at the inputs
[18:06:03 CET] <gloomy> Seems to be working, will confirm when it's done in about 10 minutes :p
[19:59:55 CET] <pos> https://pastebin.mozilla.org/9080392
[20:00:52 CET] <pos> works fine in console/fbdev with -vo fbdev2
[20:01:43 CET] <pos> trying to run it in xorg with -xo vdpau/x11, all "[swscaler @ 0x10506fa00] deprecated pixel format used, make sure you did set range correctly"
[20:04:18 CET] <pos> nvm, found a type (-xo instead of -vo)
[20:04:28 CET] <pos> typo even (not my day)
[20:16:28 CET] <philipp64> got a question... I have this trivial program https://da.gd/HbHuy/raw that opens a youtube video which I downloaded with wget.  it plays fine with QuickTime. but when I run my program to open the file and demultiplex it, it dies with "Invalid data found when processing input". also curious is the fact that I allocate a 16KB buffer, but the calls to my read_packet() function are called with...
[20:16:30 CET] <philipp64> ...various addresses and bigger sizes than my buffer.  is the buffer being realloc'd?  why the failure?
[20:21:32 CET] <kepstin> philipp64: the documentation for avio_alloc_context explicitly says that it may be freed and replaced. I suspect that particular formats or protocols update the buffer_size as well for performance reasons.
[20:22:08 CET] <philipp64> okay, so I can nail it down to a static buffer for performance reasons... okay.
[20:22:52 CET] <philipp64> is there a way to get more info on why it things that data is invalid?
[20:23:19 CET] <philipp64> we're using 3.4.2.
[20:24:24 CET] <kepstin> does it work if you let ffmpeg do the file IO itself?
[20:24:34 CET] <kepstin> rather than use your own io context?
[20:28:00 CET] <kepstin> that said, your read function is simple enough that I don't see anything obvious going wrong there :/
[20:58:04 CET] <bipin> HI, I am getting error while running script: https://pastebin.com/CQLqtj9c
[20:58:15 CET] <bipin> https://yesimroy.gitbooks.io/android-note/content/compile_ffmpeg_for_android.html
[20:58:21 CET] <bipin> following steps from here
[20:58:53 CET] <bipin> getting error in step 5. Run the build-all script for generating all platform shared library
[20:59:20 CET] <bipin> trying to fix since long, please help to fix it
[21:06:34 CET] <sfan5> it's not a good idea to rely on some guy's magic "copy this there and run this script" solution
[21:11:37 CET] <bipin> not following @sfan5
[21:12:31 CET] <sfan5> I'm suggesting you roll your own solution
[21:12:57 CET] <Fenrirthviti> Or reach out to the script maintainer for assistance
[21:25:10 CET] <bipin> humm k
[21:29:21 CET] <furq> https://github.com/WritingMinds/ffmpeg-android
[21:29:25 CET] <furq> isn't this the recommended thing to use now
[21:50:34 CET] <nyaomi> when doing (flac (native) -> opus (libopus)) without arguments other than input and output filenames, ffmpeg seems to convert from 44.1kHz to 48kHz, any idea why this might be?
[21:50:42 CET] <sfan5> furq: last commit a year ago, so maybe not
[21:50:51 CET] <furq> nyaomi: opus doesn't support 44.1khz
[21:50:58 CET] <sfan5> aside from the build scripts being a bit messy here and there, that repo is not very explicit about the resulting binary being GPL
[21:51:07 CET] <nyaomi> furq: huh, odd
[21:51:12 CET] <sfan5> which is important if you want to load it in your android app
[21:51:20 CET] <nyaomi> i would have assumed it would be arbitrary
[21:51:25 CET] <furq> https://wiki.xiph.org/OpusFAQ#How_do_I_use_44.1_kHz_or_some_other_sampling_rate_not_directly_supported_by_Opus.3F
[21:51:37 CET] <nyaomi> thanks
[21:52:30 CET] <nyaomi> so this basically does an audio version of upscaling a bitmap?
[22:11:39 CET] <pos> furq, ping
[22:23:36 CET] <matteo_> Hello All I need help in encoding a video. I need to format the video with MPEG-TS with 2 Ref frames Constant Bitrate and constant frame rate. I did the almost all the job but Now I have the ref frames at 4 and if I put at 2 my framerate change to variable
[22:25:47 CET] <matteo_> -f mpegts -muxrate 2000k -vcodec libx264 -r:v 30000/1001 -filter:v scale=720:480 -aspect 16:9 -preset slow -profile:v main -level 3.0 -refs 1 -x264opts nal-hrd=cbr:force-cfr=1 -acodec libmp3lame -b:a 128k -r:a 44100 -ac 2
[22:26:02 CET] <sfan5> -x264opts nal-hrd=cbr:force-cfr=1:ref=2
[22:26:11 CET] <sfan5> doesn't that work?
[22:30:26 CET] <matteo_> I tried with nal-hrd=cbr:force-cfr=1 but than I have a variable frame rate and not 29.97
[22:33:37 CET] <kerio> ntsc framerates D:
[22:33:44 CET] <kerio> the humanity
[22:40:31 CET] <matteo_> Format settings, ReFrames: 4 frames adding nal-hrd=cbr:force-cfr=1:ref=1
[22:41:41 CET] <matteo_> sorry ref=2
[23:01:12 CET] <matteo_> cant set ReFrames to 2 any help?
[23:07:17 CET] <matteo_> -f mpegts -muxrate 2000k -vcodec libx264 -r:v 30000/1001 -filter:v scale=720:480 -aspect 16:9 -preset slow -profile:v main -level 3.0 -refs 1 -x264opts nal-hrd=cbr:force-cfr=1:b-pyramid=0 -acodec libmp3lame -b:a 128k -r:a 44100 -ac  2
[23:07:51 CET] <matteo_> with this I have RefFrames in mediainfo to 2
[23:08:02 CET] <matteo_> Solved TKS!
[23:56:30 CET] <philipp64> kepstin: well, turns out I was not calling av_register_all() and that was my problem...  thought it loaded a default sane set of codecs on its own, but alas it didn't.
[00:00:00 CET] --- Tue Mar 20 2018


More information about the Ffmpeg-devel-irc mailing list