[Ffmpeg-devel-irc] ffmpeg.log.20180611
burek
burek021 at gmail.com
Tue Jun 12 03:05:02 EEST 2018
[00:13:15 CEST] <transhuman> hi! I can't quite figure this out but it looks like when I put a background on the video with a text overlay ticker and make the background so its completely opaque for better contrast that it actually sits on TOP of the letters so you can't see them is there a way to reverse this?https://paste.ubuntu.com/p/khQ2smWCDj/
[00:22:12 CEST] <Cracki> reorder the filters
[00:23:07 CEST] <Cracki> transhuman, what have you tried
[00:23:11 CEST] <transhuman> oh geez, simple as that
[00:23:37 CEST] <transhuman> changed the colors to make a larger difference in color and changed how opaque the background is
[00:40:17 CEST] <transhuman> Cracki, thanks reordering them worked and now that you said that it makes sense, thanks
[01:21:00 CEST] <nicolas17> -filter_complex '[0]setpts=PTS[s0]; [1]setpts=PTS-6/TB[t1]; [0]asetpts=PTS[ai0]; [1]asetpts=PTS-6/TB[ai1]; [t1]scale=w=1280:h=720[s1]; [s0][s1]hstack; [ai0][ai1]amerge=inputs=2' this makes ffmpeg fail with "Cannot allocate memory"
[01:21:08 CEST] <nicolas17> I couldn't manage to simplify it
[01:22:28 CEST] <nicolas17> oh, I messed too much with the audio filters, not enough with the video ones
[01:22:30 CEST] <nicolas17> -filter_complex '[0]setpts=PTS; [1]setpts=PTS-6/TB; [0]asetpts=PTS[ai0]; [1]asetpts=PTS-6/TB[ai1]; [ai0][ai1]amerge=inputs=2'
[01:25:02 CEST] <furq> setpts=PTS seems kind of pointless
[01:25:12 CEST] <furq> and by seems kind of i mean is
[01:54:10 CEST] <nicolas17> using [a0][a1]join instead of [ai0][ai1]amerge=inputs=2 results in "Assertion !s->input_frames[i] failed at src/libavfilter/af_join.c:93" instead
[05:40:14 CEST] <transhuman> hi this is my encoding line https://pastebin.com/d0XMLGAb I am getting some stuttering , is there a simple fix?
[07:09:10 CEST] <csierra_> Is there a reliable way to get the duration of a file, in seconds, if it doesn't have an entry for "duration" in its streams?
[10:53:22 CEST] <Guest28125> Hi, I'm trying to use srt with ffmpeg, I have build ffmpeg with the srt, but in ffmpeg, there's only one file called libsrt.c, there's no header file, how should I use thiese functions defined in libsrt.c?
[10:54:53 CEST] <sfan5> you don't directly call any functions from libsrt.c
[10:55:12 CEST] <sfan5> instead you use libavformat like usually and these functions will get called internally
[10:55:57 CEST] <Guest28125> I see
[10:57:28 CEST] <Guest28125> But how should I control the srt protocol, for example, I need to specify the mode, how to do it?
[10:58:09 CEST] <sfan5> you can set those as options
[10:58:50 CEST] <sfan5> alternatively it looks like appending them to the url like ?mode=caller is also supported
[10:59:21 CEST] <Guest28125> ok, I'll take a look, thanks.
[12:22:19 CEST] <Zexaron> Hello
[12:22:29 CEST] <transhuman> hi this is my encoding line https://pastebin.com/d0XMLGAb I am getting some stuttering , is there a simple fix?
[12:22:30 CEST] <Zexaron> FFmpeg doesn't have lagarith encoder yet right ?
[12:30:30 CEST] <durandal_1707> Zexaron: lagarith is bad codec
[12:31:22 CEST] <Zexaron> dunno, I used it once a few years ago, someone else was asking about it
[13:12:37 CEST] <transhuman> by the way on my stuttering problem the -r 30000/1001 makes it worse, if I drop it then it only happens in a few places, just enough to make it unusable
[13:14:55 CEST] <kepstin> transhuman: what exactly is "stutterring"? just the text scrolling?
[13:15:29 CEST] <kepstin> transhuman: you probably want to parameterize the x expression based on time rather than frame number, so it can handle variable framerate input
[13:15:46 CEST] <kepstin> transhuman: alternately, try putting an fps filter before the textfile filter
[13:15:47 CEST] <transhuman> the text scrolling yes
[13:18:19 CEST] <transhuman> kepstin so your saying move this part :reload=1:y=h-line_h-80:x=w-(mod(8*n\,w+tw)-tw/40) back before :drawbox=y=ih-210
[13:19:06 CEST] <kepstin> transhuman: no, i didn't say anything like that at all
[13:21:02 CEST] <kepstin> i mean change the expression to use the variable 't' (time) instead of 'n' (frame number)
[13:21:41 CEST] <transhuman> ah ok
[13:21:43 CEST] <transhuman> thanks
[13:22:15 CEST] <kepstin> the scrolling still might not be smooth like that, so depending what you want, adding an fps filter before the drawtext filter (I typoed and seaid 'textfile', sorry) could work too
[13:46:51 CEST] <transhuman> kepstin, I have added a -framerate 29.97 and a output frame rate -r 29.97 https://pastebin.com/qBy47RLE , it has no effect, as to your other method I am a little unclear how that works, any hints?
[13:48:07 CEST] <kepstin> Don't add any options, I said to add an fps *filter*
[13:48:29 CEST] <transhuman> ah ok I will change the way I am doing it thanks
[13:50:04 CEST] <kepstin> When you use the fps filter, you can control where the effect is applied by its placement in the filter string. You want to put it before the drawtext filter.
[13:53:14 CEST] <transhuman> thanks kepstin
[14:01:59 CEST] <dannyzb> Hey guys, a simple question: Do I need to compile FFMPEG with X265 to decode HEVC/h265?
[14:02:12 CEST] <dannyzb> or alternatively: would that increase performance for decoding or is it only for encoding?
[14:05:05 CEST] <furq> it's only for encoding
[14:05:43 CEST] <dannyzb> furq: thank you!
[14:06:01 CEST] <dannyzb> So you use OpenHEVC, is it comparable in performance to decoding with H265?
[14:06:12 CEST] <JEEB> openhevc is FFmpeg with patches
[14:06:33 CEST] <dannyzb> comparable in performance to decoding with X265 *
[14:06:35 CEST] <JEEB> they IIRC had some additional stuff that was not up to snuff wrt FFmpeg coding practices but it might have been somewhat faster (somewhere in the history)
[14:06:38 CEST] <JEEB> uhh
[14:06:40 CEST] <JEEB> x265 does not decode
[14:06:46 CEST] <JEEB> x265 is an encoder
[14:07:31 CEST] <dannyzb> cool, that answers it! I've been compiling with x265 for a while .. and that stupid CMAKE kept creating incompatible builds to ffmpeg .. really a hassle to manage
[14:07:36 CEST] <dannyzb> happy to get rid of it :D
[14:09:44 CEST] <slavanap> Hi! How do you build ffmpeg with latest cuda-9.2? I've just got ERROR: cuda requested, but not all dependencies are satisfied: ffnvcodec
[14:09:57 CEST] <slavanap> using command ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --extra-cflags=-I/usr/local/cuda-9.2/include --extra-ldflags=-L/usr/local/cuda-9.2/lib64
[14:13:08 CEST] <dannyzb> https://superuser.com/questions/1299064/error-cuvid-requested-but-not-all-dependencies-are-satisfied-cuda-ffnvcodec
[14:13:18 CEST] <dannyzb> To compile the FFmpeg NVIDIA headers ("ffnvcodec"): git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git make sudo make install
[14:13:47 CEST] <dannyzb> the tutorial you used for compiling was likely outdated
[14:18:24 CEST] <slavanap> dannyzb, Thanks a lot!
[14:18:48 CEST] <slavanap> --enable-libnpp does not work after this, unfortunately.
[14:19:39 CEST] <slavanap> ERROR: libnpp not found, although I've installed libnppc7.5 libnppi7.5 libnpps7.5
[14:24:42 CEST] <dannyzb> that is usualy a PKG_CONFIG_PATH issue with ffmpeg
[14:24:47 CEST] <dannyzb> unrelated to the previous one
[14:42:31 CEST] <slavanap> Still, have issue with hwupload:: [hwupload @ ] A hardware device reference is required to upload frames to.
[14:42:46 CEST] <slavanap> How to pick up 1 gpu if I have 2 installed on device?
[14:42:53 CEST] <slavanap> Or can I use both with ffmpeg?
[14:56:46 CEST] <slavanap> hwupload must have a parameter, I guess
[15:20:52 CEST] <slavanap> Okay, I've found hwupload_cuda filter. Now looking how to overcome "EncodePicture failed!: unsupported param (12)" error
[15:28:00 CEST] <slavanap> Finally. format=yuv444p filter before hwupload_cuda helped.
[15:28:18 CEST] <slavanap> Now I wonder is it possible to perform overlay with static image on GPU.
[15:28:21 CEST] <slavanap> with ffmpeg
[15:32:58 CEST] <ariyasu> are you sure you want 444?
[15:33:16 CEST] <ariyasu> my gues is you really want 4:2:0
[15:33:42 CEST] <ariyasu> -pix_fmt yuv420p
[15:46:11 CEST] <Accord_> hey, I need to record a stream, segment it and also view it live in a player like vlc
[15:46:28 CEST] <Accord_> so without the segment length delay
[15:46:35 CEST] <Accord_> can I do this with h264?
[15:48:53 CEST] <slavanap> ariyasu, will try, thanks. My server GPU hang because of last launch. Waiting till it reboots
[16:00:44 CEST] <slavanap> ariyasu, it fails with [h264_nvenc @ 0x3232000] EncodePicture failed!: unsupported param (12)
[16:41:47 CEST] <tadmozeltov> Hello everyone, I'm new to ffmpeg so I was going over the ffmpeg-tutorial (https://github.com/mpenkov/ffmpeg-tutorial) and as it turns out, it seems to be quite outdated because when I attempt to compile the examples I receive a host of deprecation warnings and an error (https://pastebin.com/Wazaq4XW)
[16:42:09 CEST] <JEEB> I recommend looking at the examples under doc/examples . for example the transcoding one
[16:57:00 CEST] <tadmozeltov> JEEB: Thanks, I've skimmed it briefly and it seems to be not quite as hold-your-hand as I might like it to be. Are these the only up-to-date examples?
[16:59:39 CEST] <tadmozeltov> For example, the idea of filter graphs is a little bit foreign to me and this example jumps head-first into its usage.
[17:22:23 CEST] <JEEB> tadmozeltov: you just divide the things bit by bit
[17:22:43 CEST] <JEEB> lavf for input, lavc for decoding, lavfi for filtering/conversions, lavc for encoding, lavf for output
[17:22:53 CEST] <JEEB> focus on one of those and try to replicate in your own little thing
[17:23:07 CEST] <JEEB> the first thing you generally get done is opening a file in lavf and start reading AVPackets
[18:19:23 CEST] <Hello71> also maybe learn the ffmpeg command line first
[18:38:09 CEST] <wfbarksdale> does anyone know sort of how stable the avformat_seek_file() api is? I need the functionality of seeking to a time where all streams can be successfully decoded from, but I'm not sure how to acheive this using the other av_seek_frame API. If there was some way to check the file position after av_seek_frame I could implement this using av_seek_frame, but I am not seeing a way...
[20:36:14 CEST] <kepstin> wfbarksdale: not sure what you mean by "how stable"
[20:37:04 CEST] <wfbarksdale> kepstin: there is a note in the docs: This is part of the new seek API which is still under construction. Thus do not use this yet. It may change at any time, do not expect ABI compatibility yet!"
[20:37:53 CEST] <wfbarksdale> just wondering how likely the functionality is to be completely broken
[20:38:01 CEST] <wfbarksdale> also noticed that seeking to time zero doesn't work correctly
[20:38:07 CEST] <kepstin> oh, wow, that note's been there a long time, since at least 2.8
[20:38:18 CEST] Action: kepstin has no idea on the dev status
[20:39:50 CEST] <kepstin> amusingly, the internal functionality of both is kinda weird, since it's an internal api change - in some cases (depending on the demuxer being used), one of the two seek functions might end up calling the other one :/
[20:44:48 CEST] <kepstin> wfbarksdale: it looks like the fancy functionality of avformat_seek_file() isn't actually implemented for most containers/formats, so you'd be getting the av_seek_frame behaviour anyways.
[21:10:18 CEST] <leif> Is timebase always 1/fps in ffmpeg?
[21:14:04 CEST] <Durandal> what do you mean
[21:15:15 CEST] <Mavrik> Not even close :)
[21:24:46 CEST] <kepstin> leif: no; when reading a file, you'll usually get whatever timebase the container happens to store/use (e.g. mkv always has 1/1000 timebase)
[21:24:58 CEST] <kepstin> (well *almost* always)
[21:25:25 CEST] <transhuman> ok so this is a follow up question, I am trying to get rid of flicker on a text overlay from a video from youtube that I downloaded with youtube-dl I am trying to add -vf fps=fps=1/60 but I am not sure of the values 1/60 the video is at 29.97 fps that I know of is there a way to tell this information?
[21:26:52 CEST] <leif> kepstin: Oh, interesting.
[21:27:00 CEST] <leif> So why does the docs say: https://www.ffmpeg.org/doxygen/3.1/structAVCodecContext.html#ab7bfeb9fa5840aac090e2b0bd0ef7589
[21:27:31 CEST] <leif> I guess timebase is for packets rather than, err...frames?
[21:31:06 CEST] <transhuman> this is my code https://pastebin.com/m59XVQkm
[21:31:24 CEST] <transhuman> I notice on the output it if varying the frame rate by 1 frame
[21:44:41 CEST] <kepstin> leif: you'll usually have the same timebase for packets and frames, but if you don't you'll have to convert between them.
[21:45:20 CEST] <kepstin> (note that doing this conversion is basically required when encoding/muxing, since the container is free to ignore your requested timebase and tell you to use a different one instead)
[21:47:10 CEST] <leif> kepstin: Oh interesting, thanks.
[22:09:55 CEST] <transhuman> kepstin, I think here : https://pastebin.com/FepNHr9v I have done as you suggested but it still shimmers and stutters!
[22:10:29 CEST] <transhuman> I am not sure of the 1/60 value so I have tried 1/30 1/29.97
[22:10:37 CEST] <kepstin> transhuman: uh, why have you set the framerate to 1 frame per minute?
[22:11:41 CEST] <transhuman> kepstin, thanks for replying, I know this is getting annoying I have looked here : https://superuser.com/questions/584760/whats-the-meaning-of-ffmpegs-fps-options
[22:11:57 CEST] <feliwir> anyone that can help me with my issue from last week?
[22:12:03 CEST] <transhuman> ah got it kepstin
[22:12:05 CEST] <feliwir> that av_read_frame is crashing when getting to EOF
[22:12:14 CEST] <transhuman> so it should be 29.97/60
[22:12:49 CEST] <kepstin> transhuman: fps is "frames per second", so 29.97/60 = ~0.5 frames per second
[22:13:32 CEST] <kepstin> transhuman: if you want 29.97 fps, then write 29.97 (but note that you probably want 30000/1001 instead, 29.97 is an incorrectly rounded number.
[22:13:37 CEST] <kepstin> )
[22:14:24 CEST] <transhuman> why do they use such an odd number as 29.97?
[22:14:48 CEST] <transhuman> is it actually 30 but its a rounding error
[22:15:07 CEST] <slavanap> Does anyone faced this kind of error while NVIDIA h264_nvenc encoder? :: [h264_cuvid @ 0x2696640] ctx->cudl->cuStreamSynchronize(device_hwctx->stream) failed -> CUDA_ERROR_LAUNCH_FAILED: unspecified launch failure
[22:15:17 CEST] <transhuman> or one dropped frame or something
[22:15:39 CEST] <kepstin> transhuman: the 1/1001 factor is a quirk of how colour was added to the analogue ntsc television broadcast system
[22:15:51 CEST] <kepstin> er, 1000/1001
[22:15:54 CEST] <transhuman> oh geez ok
[22:16:21 CEST] <kepstin> transhuman: old legacy stuff that we just have to live with nowadays :/
[22:16:33 CEST] <slavanap> ^ sorry that's not h264 encoder issue, it's nvidia decoder fail. Trying to restart without nvidia decoder.
[22:16:35 CEST] <transhuman> so do you just do the 30000/1000 , does it matter?
[22:17:18 CEST] <transhuman> assuming its youtube stuff?
[22:17:24 CEST] <kepstin> transhuman: basically: when they added colour to ntsc, they got some visual issues due to interference with the audio signal. To fix this, they slowed down the framerate *very* slightly to make the interference less visible.
[22:17:41 CEST] <transhuman> oh geez
[22:17:45 CEST] <transhuman> ok
[22:17:47 CEST] <kepstin> transhuman: it depends on your input video
[22:18:03 CEST] <transhuman> the input video says 29.97
[22:18:16 CEST] <kepstin> transhuman: you should keep the framerate of your input video where possible. If you don't need to do that, then use whatever you want (30 is fine on youtube)
[22:18:42 CEST] <kepstin> transhuman: the input video is probably 30000/1001 then, and you should preserve that to avoid glitches.
[22:21:49 CEST] <transhuman> I used a script to determine it (an awk script)
[22:23:10 CEST] <transhuman> ffprobe HeavySnowFall-5min.mp4 2>&1| grep ",* fps" | cut -d "," -f 5 | cut -d " " -f 2
[22:24:04 CEST] <kepstin> transhuman: you can provide additional options to ffprobe to make it print out a particular piece of info in a computer-readable way :/
[22:24:25 CEST] <kepstin> (but even then, i think it'll usually provide rounded or estimated fps, rather than exact values)
[22:25:04 CEST] <kepstin> hmm, it can print the rational value
[22:25:05 CEST] <transhuman> oh thats not good then, whats the preferred method if I can ask
[22:25:24 CEST] <transhuman> it still stutters by the way
[22:25:37 CEST] <transhuman> I read something about youtube and ffmpeg a ongoing bug
[22:25:47 CEST] <kepstin> transhuman: you'll have to better describe what you mean by 'stuttering' :/
[22:26:09 CEST] <transhuman> perhaps I could upload it to youtube and show it? would that work?
[22:26:39 CEST] <transhuman> I just worry about youtube changing it
[22:27:36 CEST] <transhuman> it doesnt happen till about 1 minute into it
[22:27:49 CEST] <transhuman> well barely happens
[22:27:50 CEST] <feliwir> Can someone please take a brief look and tell me if there is sth. wrong with this loop: https://github.com/OpenSAGE/OpenSAGE.FFmpeg/blob/master/src/OpenSage.FFmpeg/Source.cs#L104
[22:27:55 CEST] <transhuman> first part is smooth
[22:28:06 CEST] <feliwir> i get like 99% of all frames, but on the last ones i am crashing
[22:28:09 CEST] <feliwir> on that line
[22:34:45 CEST] <transhuman> kepstin, https://www.youtube.com/watch?v=oPxdWW0-uZE&feature=youtu.be
[00:00:00 CEST] --- Tue Jun 12 2018
More information about the Ffmpeg-devel-irc
mailing list