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

burek burek021 at gmail.com
Tue Jan 15 03:05:02 EET 2019


[00:04:22 CET] <maxrazer> It would be a lot easier if nvenc was enabled by default with ffmpeg on linux. I have to go through some custom compiling instructions.
[00:04:39 CET] <maxrazer> I want to use nvenc with obs-studio on debian sid.
[00:04:55 CET] <maxrazer> I found this: https://www.maketecheasier.com/nvidias-gpu-assisted-video-encoding-nvenc-work-ubuntu/
[00:06:28 CET] <maxrazer> Actually that may not work with Debian.
[00:08:15 CET] <scriptease> thats why i use it with windows
[00:08:19 CET] <scriptease> works out of the box
[00:09:02 CET] <scriptease> https://developer.nvidia.com/ffmpeg
[00:09:06 CET] <scriptease> does that help?
[00:14:13 CET] <scriptease> maxrazer
[00:14:15 CET] <scriptease> check this
[00:14:16 CET] <scriptease> https://obsproject.com/forum/threads/nvenc-support-for-linux.47023/
[00:15:56 CET] <maxrazer> I think those links might do it.
[00:16:25 CET] <maxrazer> The other thing though, is the video is very blurry. I don't think that should be caused by the encoder set to x264 software. In Windows and Linux Mint it looked fine I believe.
[00:19:29 CET] <maxrazer> thanks
[00:20:06 CET] <scriptease> np
[04:25:44 CET] <television> inex: hi
[04:25:52 CET] <inex> who tf named it "nut"
[04:27:03 CET] <television> you mean the container?
[04:27:07 CET] <television> https://ffmpeg.org/~michael/nut.txt
[04:30:00 CET] <inex> yes!
[04:30:33 CET] <television> i don't know... maybe michaelni knows?
[11:04:09 CET] <lg188> Hello. Trying to pull some vhs tapes on digital and I'm getting this warning: "Queue input is backward in time"
[11:04:36 CET] <lg188> and this is the command I'm using: /usr/bin/ffmpeg -thread_queue_size 1024 -i /dev/video0 -thread_queue_size 1024 -f alsa -i sysdefault:CARD=Cx231xxAudio -vf yadif=1:1,hqdn3d=4:4:3:3 -preset slow -strftime 1 2019-01-14_11:03:25.mkv
[11:05:27 CET] <lg188> (ignore the strftime, I realised I still had it in there for some reason)
[13:41:12 CET] <atbd> hi, is it possible to output to a char buffer instead of a file with an output AVFormatContext ?
[13:41:45 CET] <JEEB> write your own AVIO context
[13:41:49 CET] <JEEB> with write callback
[13:42:08 CET] <JEEB> there's at least one AVIO context example doc/examples
[13:43:46 CET] <atbd> okay thanks ! I'll look it
[13:50:51 CET] <ariyasu> hey all
[13:51:11 CET] <ariyasu> im getting this error repeated a bunch of times when demux audio (mp2) from a transport stream
[13:51:13 CET] <ariyasu> [mp2 @ 0000000002a40f40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 19610640 >= 19608482
[13:51:27 CET] <ariyasu> when i then remux it into my encode, it's out of sync
[13:51:34 CET] <ariyasu> any ideas why it's happening
[13:51:42 CET] <ariyasu> seems to only be from ntsc sources
[13:55:15 CET] <ariyasu> https://pastebin.com/raw/Vv9R8G2x
[14:00:53 CET] <ariyasu> demuxing with mkvmerge from the .ts works without error and remuxes with my encoded video fine, so it's some issue with ffmpeg :(
[16:50:59 CET] <zerodefect> I'm using Ubuntu Desktop v18.04; the desktop comes installed with version v3.4.4 of FFmpeg. Now what is the best way to build/run with a newer version of FFmpeg _without_ impacting on the older version of FFmpeg? Do I just use LD_LIBRARY_PATH? I appreciate this may not be an FFmpeg-specific question.
[16:51:33 CET] <JEEB> default build is static so you can just configure with defautls and --prefix
[16:51:45 CET] <JEEB> and then after make install it will be under your custom prefix/bin
[16:52:09 CET] <JEEB> given that your prefix is not your standard location it should do zarro things to oyur current install of libraries etc
[16:52:31 CET] <zerodefect> Ah, ok. I like that idea.
[16:52:37 CET] <JEEB> if you for some reason need shared libraries, then yes -- --enable-shared and LD_LIBRARY_PATH towards that
[16:52:47 CET] <JEEB> (the prefix/lib dir)
[16:53:27 CET] <zerodefect> Thanks. I'll give the former a try for my development purposes.
[16:53:54 CET] <JEEB> and then when developing against that FFmpeg copy, set PKG_CONFIG_PATH towards prefix/lib/pkgconfig
[16:54:08 CET] <JEEB> and pkg-config *should* pick the .pc file from there
[16:54:23 CET] <JEEB> if not, just remove the -dev package (which should not affect apps using those non-development libraries)
[16:55:25 CET] <zerodefect> Ah ok.  I'm not familiar with `PKG_CONFIG_PATH`. I'll need to read up about that.  Seen it mentioned many a time though.
[16:56:18 CET] <JEEB> it appends to the search path
[16:56:25 CET] <JEEB> for cross-compilation you generally want PKG_CONFIG_LIBDIR
[16:56:29 CET] <JEEB> which overrides the whole search path
[16:56:29 CET] <JEEB> :)
[16:56:43 CET] <JEEB> (usually you have xxx-pkg-config wrappers that do that for you, though)
[16:57:07 CET] <zerodefect> So if I `echo $PKG_CONFIG_PATH`, it's currently blank. Surprising?
[16:57:13 CET] <JEEB> nope
[16:57:15 CET] <JEEB> it's an override
[16:57:19 CET] <JEEB> as in, it appends
[16:57:23 CET] <zerodefect> Right
[16:57:26 CET] <Martchus> Browsing the livav APIs I'v noticed that there are FFT functions available. Are there any examples how to use them (or any piece of code using them)? How do those functions compare to fftw3?
[16:58:15 CET] <JEEB> yea, there's some avfft.h - never used that. at least ffplay.c seems to be utilizing them
[16:58:40 CET] <JEEB> and then multiple libavfilter filters it seems
[17:00:00 CET] <Martchus> ok, I'll have a look (but maybe have to learn a bit more about fft in general first anyways)
[17:36:45 CET] <ksk> hola.
[17:38:23 CET] <ksk> I have some video material which comes in a .ts file, and a bunch of other files with other endings. Now for one video I only have the .ts file and got issues with playback, like the video plays through, but sometimes image and/or audio is missing.
[17:38:55 CET] <ksk> vlc says its h264 - MPEG-4 HVC.
[17:39:44 CET] <ksk> can you give me a hint on a) why a video is/was split in such a way in the first place b) if I can transform the complete ones into a single file c) If I can make the somewhat broken files whole again
[17:40:48 CET] <ksk> *for example there might be 30s missing from minute 7 to minute 7:30 or so, but vlc still plays the no-content parts
[18:02:37 CET] <ariyasu> Application provided invalid, non monotonically increasing dts to muxer in stream
[18:03:04 CET] <ariyasu> anyone know how i can fix this, without creating sync issues
[18:22:28 CET] <ariyasu> [mpegts @ 0000000000368c00] Invalid DTS: 19618599 PTS: 19612594 in output stream 0:0, replacing by guess
[18:22:31 CET] <ariyasu> :(
[18:52:26 CET] <meredydd> Hi; I'm trying to record and combine live audio and video that are desynced by quite a long time (audio is 10-20s behind, and I'd like to delay the video to match). Using "-itsoffset" on the video input and/or "-ss" on the audio input appears to confuse ffmpeg - it reports a very low "speed" and ends up dropping large chunks of either audio or video, leaving only little fragments of normal speed.
[18:54:33 CET] <meredydd> In the absence of a video delay filter (I know there's one for audio delay), how should I do this in a live recording?
[18:57:11 CET] <meredydd> (I apologise for the slightly ill-formed question; it is possible that the correct answer actually involves [eg] tweaking whatever mechanism governs the frame rate of v4l capture - although I've tried -r and -framerate, and they both fail in different ways)
[18:58:08 CET] <Mavrik> meredydd, um, well
[18:58:16 CET] <Mavrik> The obvious question is - why not just use audiodelay filter?
[18:58:29 CET] <Mavrik> Since delaying video vs. audio or delaying audio vs. video should be the same thing?
[18:58:41 CET] <meredydd> Erm, does audiodelay work with negative delay?
[18:58:56 CET] <meredydd> If so, I feel like a complete idiot.
[18:59:56 CET] <meredydd> (erm, I mean -adelay)
[19:01:39 CET] <meredydd> Nope: "delay must be non negative number". Close, no cigar :(
[19:02:48 CET] <pink_mist> shouldn't that just be a matter of adding a filter which discards the first x.x seconds of the audio?
[19:04:41 CET] <durandal_1707> meredydd: there is video delay filter
[19:05:10 CET] <meredydd> durandal_1707: What's it called? I've been googling looking for one on and off for several hours!
[19:05:19 CET] <durandal_1707> meredydd: tpad
[19:05:32 CET] <meredydd> pink_mist: I've tried "-ss 15.0" on the audio, but it just gets confused and does the thing I described to start
[19:06:04 CET] <durandal_1707> you can use also atrim filter to trim audio
[19:09:11 CET] <meredydd> durandal_1707: If this works, I could kiss you...
[19:23:44 CET] <meredydd> durandal_1707: OK, so atrim doesn't work. It just produces 15s of silence with frozen video, then plays the audio at the un-shifted time (which unfreezes the video)
[19:28:59 CET] <meredydd> And tpad blocks out the first 15 seconds of video all right, but after that it runs for a few frames and freezes, and sporadically does the same (run for a few frames, freeze) for the rest of my 45-second test.
[19:29:37 CET] <durandal_1707> meredydd: what is your input and full command?
[19:31:21 CET] <Mavrik> Not supporting negative delay seems wierd tho
[19:31:38 CET] <durandal_1707> negative delay is trimming
[19:31:43 CET] <meredydd> durandal_1707: Inputs are an ALSA device and a v4l capture device.
[19:32:15 CET] <durandal_1707> so why they are out of sync?
[19:32:50 CET] <meredydd> ffmpeg -f alsa -acodec pcm_s32le -ar 48000 -ac 2 -i hw:Loopback,1,0 -f v4l2 -framerate 25 -itsoffset 17.0 -video_size 640x480 -i /dev/video0 -c:v libx264 -t 45 out.mp4
[19:32:58 CET] <meredydd> Correction: ffmpeg -f alsa -acodec pcm_s32le -ar 48000 -ac 2 -i hw:Loopback,1,0 -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -c:v libx264 -t 45 out.mp4
[19:33:18 CET] <meredydd> durandal_1707: Because the ALSA device is coming out of the other end of some processing which imposes a delay.
[19:36:08 CET] <durandal_1707> what kind of processing?
[19:37:12 CET] <meredydd> Not stuff I can talk about on a public IRC channel, I'm afraid :-/
[19:39:01 CET] <durandal_1707> meredydd: what is first timestamp from  audio and video? use (a)showinfo filters
[19:39:54 CET] <meredydd> durandal_1707: With which combination of filters in the loop? (itsoffset, tpad, atrim...?)
[19:40:03 CET] <durandal_1707> remove itsoffset
[19:40:14 CET] <durandal_1707> and all filters
[19:40:29 CET] <durandal_1707> and add (a)showinfo
[19:40:43 CET] <durandal_1707> so it reports what timestaps is received
[19:41:03 CET] <durandal_1707> -vf showinfo -af ashowinfo
[19:41:16 CET] <meredydd> [Parsed_showinfo_0 @ 0x34a5c80] n:   1 pts:1756034 pts_time:1.75603 pos:       -1 fmt:yuyv422 sar:0/1 s:640x480 i:P iskey:1 type:I checksum:CDBBED90 plane_checksum:[CDBBED90] mean:[120] stdev:[37.6]
[19:41:20 CET] <meredydd> (first line from video)
[19:41:47 CET] <meredydd> [Parsed_ashowinfo_0 @ 0x41b91c0] n:1 pts:152 pts_time:0.00316667 pos:-1 fmt:s32 channels:2 chlayout:stereo rate:48000 nb_samples:128 checksum:70675E5E plane_checksums: [ 70675E5E ]
[19:41:51 CET] <meredydd> (first line from audio)
[19:42:08 CET] <meredydd> (there are 7 lines - I assume frames - from the video before I see anything from the audio)
[19:44:23 CET] <durandal_1707> well looking into pts_time they are not delayed that much
[19:44:44 CET] <meredydd> Not according to ffmpeg, no.
[19:44:56 CET] <meredydd> But the data is about 15s out of sync
[19:45:48 CET] <durandal_1707> that would mean one need to buffer 15 seconds of video
[19:46:09 CET] <meredydd> yep
[19:46:16 CET] <meredydd> That's what I'm trying to get it to do
[19:47:41 CET] <durandal_1707> you will need to use tpad with setpts filter to increase timestamps of video by ~15 seconds
[19:48:24 CET] <durandal_1707> actually decrease
[19:48:49 CET] <durandal_1707> because tpad filter inserts frames and alters pts
[19:50:23 CET] <durandal_1707> setpts=PTS-<15s in timebase units>
[19:50:23 CET] <meredydd> aha
[19:52:18 CET] <durandal_1707> or you can add 15s to audio frames with asetpts=PTS+48000*15
[19:52:55 CET] <durandal_1707> I dunno what is strema timebase of Audio and Video
[19:54:47 CET] <meredydd> OK, adding  "-vf tpad=start=15 -vf "setpts=PTS-15/TB" produces a video that starts in the right place, and no audio.
[19:55:00 CET] <meredydd> Guess I should break out showinfo and work out what the timestamps are now...
[20:02:58 CET] <meredydd> durandal_1707: Hrm. I'm not seeing the effects of the setpts in the showinfo output. Should I be worried?
[20:05:57 CET] <durandal_1707> meredydd: 15*TB i think
[20:06:41 CET] <durandal_1707> meredydd: also you can not use -vf XXX -vf YYY
[20:06:49 CET] <durandal_1707> use -vf XXX,YYYY
[20:07:10 CET] <durandal_1707> -vf tpad=start_duration=15 for start
[20:07:32 CET] <durandal_1707> start=15 will delay by 15 black frames only
[20:15:47 CET] <meredydd> Current command: ffmpeg -f alsa -acodec pcm_s32le -ar 48000 -ac 2 -i hw:Loopback,1,0 -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -c:v libx264 -t 45 -vf tpad=start_duration=15,setpts=PTS+15/TB,showinfo out.mp4
[20:17:03 CET] <durandal_1707> 15/TB does nothing, it goes into 0
[20:17:35 CET] <durandal_1707> or not, i dunno really
[20:18:24 CET] <meredydd> Seems to be doing sensible things on the console - I see 15 seconds of video coming out very quickly (presumably the black frames), then about 15 seconds after invocation (presumable the audio catching up) it starts issuing audio frames with a PTS of 15, smoothly up to 30
[20:18:47 CET] <exile_xii> hi all, does anyone know if there is a way that I could use a filter or something to access the name of the currently active segment of a HLS stream in code?
[20:18:58 CET] <meredydd> However, the actual resulting video is black for 30 seconds (with good audio), then few-frames-at-a-time janky
[20:19:24 CET] <meredydd> durandal_1707: Thanks so much for your help. I have to go now; you have given me some excellent pointers and I will now be digging in further.
[20:19:35 CET] <durandal_1707> meredydd: try to remove setpts
[20:21:07 CET] <meredydd> durandal_1707: That results in janky-video chaos IIRC
[20:22:45 CET] <durandal_1707> janky?
[20:23:51 CET] <durandal_1707> you better encode audio and video separately and play later with it
[22:44:30 CET] <KombuchaKip> What is the meaning of an "atom" in the context of ffmpeg?
[22:52:20 CET] <JEEB> mov/mp4 has atoms/boxes
[22:52:32 CET] <JEEB> also I think MXF had atoms?
[23:19:40 CET] <KombuchaKip> JEEB: Ok, but what are they? Some kind of VM instruction, metadata, a general algorithm concept in codecs?
[00:00:00 CET] --- Tue Jan 15 2019


More information about the Ffmpeg-devel-irc mailing list