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

burek burek at teamnet.rs
Fri Nov 29 03:05:02 EET 2019


[01:23:06 CET] <montana> i am looking for ffmpeg binary with rav1e support
[06:01:29 CET] <montana> what does  -b:v 0   do
[06:09:13 CET] <while> Hi, I am trying to get a higher framerate with ffmpeg rawvideo and bmp encoding
[06:09:31 CET] <montana> while what command are you using now
[06:10:55 CET] <while> ffmpeg -y -threads 0 -video_size 800x600 -f x11grab -i :2 -f pulse -ac 2 -i default -vcodec bmp -threads 0 -loglevel verbose -s 800x600 -pix_fmt rgb8 -strict -2 -acodec pcm_s16le -threads 0 -ar 44100 -ac 1 -q:a 32 -f mpegts -movflags faststart -tune zerolatency "udp://224.0.0.1:30000"
[06:11:59 CET] <while> if I use mpeg2video or libx264 vcodec, it seems to work at the native frame rate (30 fps)
[06:12:15 CET] <montana> and what fps do you want
[06:12:18 CET] <while> 30
[06:12:31 CET] <montana> and what fps are you getting
[06:12:38 CET] <while> about 4
[06:12:43 CET] <montana> i see
[06:15:59 CET] <furq> bmp and rawvideo aren't supported in mpegts anyway
[06:16:35 CET] <while> strangely, at least the ffmpeg from the debian repositories, seems to behave as though it is
[06:16:43 CET] <furq> yeah the muxer accepts almost anything
[06:16:51 CET] <furq> but you won't be able to demux it with anything that uses ffmpeg
[06:16:55 CET] <furq> and probably not with anything else either
[06:17:08 CET] <while> I was able to udp multicast said mpegts stream, and create GIFs from it
[06:17:37 CET] <furq> but yeah pal8 800x600 rawvideo will be about 12MB/s
[06:17:47 CET] <furq> so at a guess you're bandwidth limited
[06:18:37 CET] <furq> or 14 at 30fps, rather
[06:19:18 CET] <while> would a localhost multicast address alleviate any bandwidth issues?
[06:19:44 CET] <furq> actually nvm i didn't notice it was multicast
[06:19:47 CET] <while> and I think I tried writing to a file redirected to /dev/null, and it didn't help
[06:19:52 CET] <furq> that shouldn't be an issue then
[06:19:55 CET] <while> the cpu is also not maxed out
[06:21:22 CET] <while> what could ffmpeg be waiting on?
[06:21:26 CET] <furq> shrug
[06:21:44 CET] <furq> i get 60fps writing 800x600 bmp in mpegts to multicast
[06:22:00 CET] <furq> if x264 runs at 30fps then you're not cpu bottlenecked
[06:22:08 CET] <while> what commands did you setup the multicast address with?
[06:22:16 CET] <while> and did you use my same command?
[06:22:18 CET] <furq> ffmpeg -f lavfi -i testsrc=s=800x600:d=60 -c:v bmp -pix_fmt rgb8 -f mpegts udp://224.0.0.1:3000
[06:23:01 CET] <while> I get 18 fps with that
[06:23:23 CET] <furq> what cpu
[06:24:05 CET] <while> Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
[06:24:07 CET] <while> from lscpu
[06:24:32 CET] <furq> yeah i'm only running this on a ryzen 2600 at stock
[06:24:36 CET] <furq> so it shouldn't be that much faster
[06:29:41 CET] <while> I found that with your supplied example, making sure I am multicasting on the loopback device results in getting 100 fps from your example
[06:30:55 CET] <furq> yeah i just tried it on debian and multicast is way slower than null output
[06:31:02 CET] <furq> so i guess it's some kind of multicast throughput issue
[06:31:10 CET] <furq> which would also explain why it was fine with x264, since that's much less bandwidth
[06:31:58 CET] <furq> i have literally no experience with multicast though
[06:32:04 CET] <while> although now my command still has under 10 fps, and 31kbit/s, but your example provided over 100mbit/s, and 100 fps
[06:33:02 CET] <while> how are you doing null output? a symlink to /dev/null is still very slow for me
[06:33:09 CET] <furq> -f null -
[06:41:25 CET] <while> I found running stdout to /dev/null provides my desired 30 fps
[06:41:41 CET] <while> and through a udp multicasting netcat command, I can get 22 fps
[06:42:33 CET] <furq> you don't need to redirect stdout with -f null, it doesn't output anything
[06:42:50 CET] <while> I of course removed that part
[06:43:20 CET] <furq> it would be the same speed either way
[06:43:31 CET] <furq> since we already know the mpegts muxer isn't the bottleneck
[06:46:10 CET] <while> its stuff like this that makes me wonder if there gigabit ethernet 'really' can get a gigabit with the stock hardware you can buy online that claims to
[06:50:08 CET] <furq> fwiw i was getting 60fps on windows on the same box
[06:50:21 CET] <furq> so at a guess it's some kind of os udp buffer thing
[07:00:31 CET] <while> maybe I can multicast with raw sockets to undercut that problem
[10:14:24 CET] <lofo> Hey, any idea to monitor an udp stream i create with ffmpeg ?
[10:15:06 CET] <lofo> audio is laggy, and video almost a black screen with glitchy stuff on the upper left corner
[10:17:04 CET] <cehoyos> Please provide the command line you tested together with its complete, uncut console output.
[10:17:18 CET] <cehoyos> Problems with udp are not unusual, the way you describe them sound unusual
[10:21:35 CET] <lofo> I haven't used ffmpeg directly yet. I used OBS which uses FFmpeg
[10:21:43 CET] <lofo> but im about to try in command line
[11:09:27 CET] <lofo> Here is the command : ffmpeg -re -i output.ts -c copy -f mpegts udp://224.0.0.1:8081
[11:09:41 CET] <lofo> here is the output : https://pastebin.com/bB2YcbMz
[11:10:58 CET] <lofo> could the fact that i use a multicast address be the problem ?
[11:13:35 CET] <cehoyos> Your ffmpeg version is old. Do you see the same A/V desync if you remux to a local file?
[11:17:03 CET] <lofo> wait i got to figure out the command line for that (not fluent yet)
[11:17:21 CET] <cehoyos> Replace "udp..." with "out.ts"
[11:18:56 CET] <lofo> oh thanks. The video is the same after remuxing
[11:19:06 CET] <lofo> no desync
[11:22:42 CET] <lofo> I wonder how to figure out if its my stream emitter, my router or my stream receiver that is causing the issue
[12:36:13 CET] <th3_v0ice> lofo: Maybe your circular buffer is too small. Try increasing it and test again. "udp://224.0.0.1:8081?overrun_nonfatal=1&fifo_size=50000000"
[13:36:56 CET] <igssl> anyone know how to export a specific timeframe into a series of images? i can only find links discussing the opposite (encoding image sequences into video)
[13:41:49 CET] <hero100> igssl: ffmpeg -i foo.mp4  bar-%d.png
[13:54:08 CET] <igssl> hero100 o thx
[15:01:39 CET] <lofo> th3_v0ice, the command as you stated it doesnt seem to end on my machine
[15:01:45 CET] <lofo> never completes
[15:19:58 CET] <DHE> were you careful to escape the '&' so your shell didn't interpret it?
[15:41:48 CET] <Anderssen> Hi, I've noticed that the encoder mpeg2video has an option sc_threshold ("Scene change threshold"): is that what I think it is (i.e. ffmpeg inserts an i-frame automatically when the threshold is met)? Also, is there a way to force this on other encoders, even if the option is not listed under "ffmpeg -h encoder=..."?
[15:42:34 CET] <igssl> https://pastebin.com/ctBM09dU < wot did i do wrong
[15:50:54 CET] <DHE> Anderssen: libx264 has an internal "scenecut" option
[15:51:30 CET] <DHE> igssl: windows doesn't support wildcard syntax due to the OS not offering a glob() function
[15:51:54 CET] <DHE> even if it did, you have to add "-pattern_type glob" to the commandline
[15:52:19 CET] <igssl> i need to list every filename in quotes, then?
[15:52:30 CET] <igssl> or can i just put it in a folder and direct ffmpeg to that somehow
[15:52:55 CET] <DHE> the preferred style is to rename them to "0001.tif", "0002.tif", ... and then use the pattern "%04d.tif" as the filename
[15:53:03 CET] <DHE> correction, start at 0
[15:53:18 CET] <igssl> oh ok
[16:02:29 CET] <lofo> DHE, indeed i didnt escaped it :/
[16:02:50 CET] <lofo> tried it. command completed. But result was comparable
[16:05:35 CET] <DHE> lofo: if you want to transmit a .ts video via multicast, I recommend tsplay, a standalone application that does just that
[16:06:36 CET] <lofo> i do not care about multicast specifically, but the tutorials i was following where using it. I am not aware of the implications of using a multicast address
[16:06:58 CET] <lofo> i want to stream to a single device actually
[16:08:15 CET] <DHE> gotta be careful with streaming over UDP. the bursty nature of the traffic and lack of controls like TCP provides means that packet loss can happen even on a local LAN
[16:08:43 CET] <DHE> tsplay, and when configured correctly ffmpeg, will pace their packet and explicitly delay, say, 2 milliseconds between packets or whatever is appropriate to the bandwidth needs
[16:11:41 CET] <taliho> DHE: lofo: FYI instead of TCP you could use zmq
[16:11:42 CET] <taliho> https://ffmpeg.org/ffmpeg-all.html#zmq
[16:12:18 CET] <DHE> sadly my tv box isn't going to support that
[16:12:30 CET] <DHE> nor does my other-the-air capture box
[16:12:42 CET] <taliho> ah ok :)
[16:25:16 CET] <lofo> i'm gonna investigate what you said DHE and taliho.
[16:25:57 CET] <lofo> What protocol would you recommend me to try as an alternative then ?
[16:26:07 CET] <lofo> a TCP based protocol ?
[16:26:54 CET] <lofo> My final objective is to stream my PC screen session to a VLC running on my phone (or any other tool that reads streams)
[16:26:56 CET] <DHE> what's receiving the stream?
[16:27:12 CET] <DHE> then probably tcp in listen mode
[16:27:30 CET] <lofo> vanilla tcp ? no video-specific protocol ?
[16:27:55 CET] <DHE> -f mpegts takes care of the rest of it
[16:28:42 CET] <lofo> what do you mean by that ? (i'm trying to get the deepest understanding of whats going on)
[16:29:30 CET] <DHE> mpegts over tcp will suffice
[16:30:04 CET] <lofo> ok. gonna try that. Thank you DHE
[16:31:10 CET] <DHE> on the ffmpeg side, tcp://0.0.0.0:12345?listen=1   # I think....    then on the client side: tcp://192.168.1.23:12345 (where 192.168.1.23 is the IP of the ffmpeg server)
[16:31:31 CET] <DHE> I haven't tried this, but I think that's right
[16:32:02 CET] <lofo> ok ok.
[16:43:31 CET] <lofo> damn it worked :D
[16:43:56 CET] <lofo> gotta try with a live feed of my screen now
[16:46:45 CET] <rocktop> Hello, how can I merge two videos ( video1.mp4 and video2.mp4) into one video2.mp4 play after video1.mp4?
[16:46:58 CET] <rocktop> I am not able to achieve this
[16:53:01 CET] <friendofafriend> rocktop: Tried concat?  ffmpeg -i "concat:video1.mp4|video2.mp4" -c copy output.mp4
[16:53:26 CET] <furq> that doesn't work with mp4
[16:53:46 CET] <furq> https://www.ffmpeg.org/ffmpeg-formats.html#concat-1
[16:53:48 CET] <furq> this does
[17:11:41 CET] <rocktop> friendofafriend: I already use this but I don't know why doesn't ork
[17:11:51 CET] <rocktop> it use onle the first video
[17:12:06 CET] <rocktop> with no error in output
[17:19:40 CET] <rocktop> anyidea ?
[17:24:16 CET] <friendofafriend> rocktop: furq's link is right.  https://www.ffmpeg.org/ffmpeg-formats.html#concat-1
[17:35:40 CET] <rocktop> friendofafriend: I think it is ok now but when I concat this Two video how can I make input audio stream for the second video fade in ?
[17:37:24 CET] <friendofafriend> rocktop: The afade filter.
[17:39:45 CET] <rocktop> friendofafriend: how can I use it here : ffmpeg -f concat -i file.txt -c copy output.mp4
[17:42:23 CET] <rocktop> anyidea please ?
[17:51:30 CET] <friendofafriend> rocktop: Do you want the audio from the first video to fade out?  Are you just trying to crossfade?
[17:52:46 CET] <rocktop> how can I use afade filter for the second input stream   here : ffmpeg -f concat -i file.txt -c copy output.mp4
[17:53:08 CET] <rocktop> friendofafriend: no just fade in the second
[17:53:20 CET] <rocktop> audio
[17:53:36 CET] <rocktop> audio and video if it possible
[17:54:07 CET] <rocktop> if crossfade possible also will work for me
[18:07:02 CET] <friendofafriend> rocktop: There's an example on StackExchange.  You'd have to know the duration of the first video in seconds.  https://video.stackexchange.com/questions/19867/how-to-fade-in-out-a-video-audio-clip-with-unknown-duration/19871
[18:08:26 CET] <rocktop> friendofafriend: Ok thanks
[18:16:05 CET] <hyperisco> I am trying to convert a single png into a 10 second video. I just want the video to be the static image. How can I do that?
[18:16:15 CET] <hyperisco> I have tried ffmpeg -loop 1 -i background_hr_0d6dab.png -c:v mjpeg -q:v 2 -pix_fmt yuvj444p -r 1/5 -t 10 i1.avi
[18:16:36 CET] <hyperisco> This generates 2 frames, which makes the windows media player happy (1 frame it will not play)
[18:16:40 CET] <hyperisco> But on other video players it does not play
[18:16:48 CET] <hyperisco> I tried more frames and it still won't play
[18:16:54 CET] <hyperisco> I tried ffmpeg -loop 1 -i background_hr_0d6dab.png -c:v libx264 -profile:v high444 -crf 0 -framerate 30 -t 10 i1.mp4
[18:17:23 CET] <hyperisco> This will play in VLC but not other players I've tried
[18:18:46 CET] <stealthii> hi! I'm trying to replace rgb (with a solid color), but preserve alpha in a video file. I can overlay to do this, but overlay doesn't preserve alpha from the first input.
[18:18:51 CET] <stealthii> ffmpeg -i <video_with_alpha>.mov -i <rgb24pngsolid>.png -filter_complex "[0:v][1:v]overlay" output.webm
[18:34:59 CET] <stealthii> I found a solution! taking the alpha from the video, and applying it to a "video" of the solid color png.
[18:35:04 CET] <stealthii> ffmpeg -loop 1 -i solid.png -i vidwithalpha.mov -filter_complex "[1]alphaextract[a];[0][a]alphamerge" -c:v qtrle output.mov
[18:35:38 CET] <Hello71> qtrle?
[18:36:22 CET] <stealthii> it's the Apple QuickTime RLE. there are other formats better for export that support alpha, this was just a test
[18:48:34 CET] <rocktop> I have the problem with audio when I use this : ffmpeg -y -f concat -safe 0 -i 240p/steam.txt  -c copy output.mp4
[18:48:41 CET] <rocktop> is there anyway to resolve this issue ?
[18:52:09 CET] <rocktop> anyidea ?
[18:59:39 CET] <friendofafriend> rocktop: Are you still working on afade with concat?
[19:04:00 CET] <rocktop> friendofafriend: I am just trying to fix regular concat
[19:05:13 CET] <rocktop> but doesn't work , I see the audio for final video is playing with high speed
[19:05:30 CET] <rocktop> is not like original video
[19:05:32 CET] <rocktop> how can I fix this ?
[19:10:38 CET] <friendofafriend> rocktop: Do both videos have audio?
[19:10:55 CET] <rocktop> yes
[19:14:26 CET] <friendofafriend> rocktop: It would be helpful to see the output of an ffprobe -v verbose <filename> for each file in your concat list.  Maybe to pastebin or http://paste.debian.org ?
[19:20:24 CET] <rocktop> friendofafriend: https://bpaste.net/show/5HG2S
[19:23:49 CET] <rocktop> friendofafriend: do you get it ?
[19:25:14 CET] <klaxa> your audio tracks have different sample rate, i think you have to re-encode audio
[19:25:25 CET] <klaxa> so it has the same sample rate
[19:26:03 CET] <klaxa> it shouldn't be a "big loss" audio encoding is fairly fast and quality can be set to something good enough
[23:46:44 CET] <friendofafriend> I want to grab one window with ffmpeg with x11grab (or anything else).  Can it be done?
[23:47:05 CET] <lavalike> I haven't been able to figure this out: if I play a twitch stream in mpv on macOS (via youtube-dl) it goes fine, I go on windows, same machine, and the streams give out ffmpeg decoding errors talking about blocks, they break, I can't find anything close to that by searching, any idea what it could be?
[23:52:24 CET] <Hello71> friendofafriend: -s "$MON_WIDTH"x"$MON_HEIGHT" -i :0.0+"$MON_X","$MON_Y"
[00:00:00 CET] --- Fri Nov 29 2019


More information about the Ffmpeg-devel-irc mailing list