[Ffmpeg-devel-irc] ffmpeg.log.20200102
burek
burek at teamnet.rs
Fri Jan 3 03:05:02 EET 2020
[00:20:47 CET] <barg> I have a 'video' I made it in premiere pro by importing 150MB of 128Kbps audio and adding some images. When I export it, it exports to 7GB. Let's say I want to use ffmpeg to make it a more reasonable size.. what settings should I use with ffmpeg?
[00:21:45 CET] <barg> presumably the video codec is ridiculous overkill.. is there a video codec and settings associated with it that would be appropriate for images.. like I show a different image every 5min in the video
[00:23:54 CET] <DHE> you probably want to crank the framerate way down, use qp or crf mode, and a fairly wide keyframe interval
[00:24:55 CET] <barg> how do I do that?
[00:25:06 CET] <barg> like what kind of command?
[00:25:12 CET] <barg> given blahfile.mp4
[00:25:15 CET] <DHE> keyframe interval is -g measured in frames
[00:25:18 CET] <cehoyos> You could start with "ffmpeg -i input -pix_fmt yuv420p out.mov" and check if you like the result
[00:25:41 CET] <barg> so is mp4 a bad idea?
[00:26:00 CET] <DHE> mp4 is a container. it says little about what codecs and parameters are inside it
[00:26:33 CET] <barg> is mp4 with libx264 a bad idea?
[00:26:55 CET] <cehoyos> You could start with "ffmpeg -i input -pix_fmt yuv420p out.mp4 and check if you like the result
[00:26:59 CET] <DHE> no, that's what I would expect you to use. it's just a matter of configuring it appropriately
[00:27:22 CET] <barg> i'm wary though of not specifying -vcodec as i've heard that the default codecs are bad?
[00:27:37 CET] <cehoyos> You could start with "ffmpeg -i input -pix_fmt yuv420p out.mp4 and check if you like the result
[00:28:56 CET] <furq> the default codecs for mp4 are x264 and aac
[00:29:04 CET] <furq> and the default settings for both of those are ok
[00:29:48 CET] <furq> using defaults is fine as long as you know what they are
[07:44:16 CET] <Casper> Hi there. Gentoo here, trying to emerge ffmpeg-9999 (aka git version) and I get "ERROR: ffnvcodec requested but not found" does anyone have an idea how to fix it? Or should I ask in #ffmpeg-devel?
[07:45:02 CET] <BtbN> Install/Update ffnvcodec.
[07:46:39 CET] <Casper> which appear to not be something available o.O
[07:47:01 CET] <BtbN> Well, that'd explain why it's not found.
[07:47:52 CET] <Casper> or it's included in something else...
[07:48:07 CET] <BtbN> Why would it be included in something else?
[07:50:07 CET] <Casper> dunnot
[07:50:25 CET] <while> BtbN: In my experience it is common to find git projects where some dependencies are not mentioned, in such cases, you have to go through the painful tasks of finding what they are and install them
[07:50:51 CET] <BtbN> ffnvcodec is not a new thing. It exists since at least two releases.
[07:51:34 CET] <BtbN> And looking at https://github.com/gentoo/gentoo/tree/master/media-libs/nv-codec-headers, they are simply out of date on their end.
[07:52:00 CET] <Casper> ah so it's nv-codec-headers ...
[07:53:30 CET] <BtbN> Whatever they decided to call it
[07:55:33 CET] <Casper> I'll check that tomorrow, thanks will see if I downgrade instead... I forgot why I went with the git one..
[07:56:28 CET] <BtbN> Their versions of the SDK are seriously old, and will need updated sooner or later no matter what.
[07:58:22 CET] <Casper> yeah... I think within a few years I may have to be forced to move to another distro... gentoo have some packages that need maintainers...
[07:59:01 CET] <BtbN> Just file a bug and it will probably be bumped...
[08:00:21 CET] <Casper> I just downgraded to the 'stable' package
[08:03:53 CET] <Casper> ffmpeg-4.1.3 there! yay
[08:05:23 CET] <Casper> thanks
[08:05:46 CET] <Casper> atleast now I can do a full upgrade without being painfull...
[08:06:11 CET] <Casper> time for bed, thanks again
[09:33:14 CET] <hiihiii> hi
[09:34:13 CET] <hiihiii> I have a bunch of video inputs with still frames at the end. I'm trying to use the select filter to trim off these ends
[09:34:24 CET] <hiihiii> any ideas are appreciated
[09:38:00 CET] <BtbN> Why not just use -t?
[09:39:22 CET] <hiihiii> I have lots of files and I don't know when the still for each file happens
[09:39:44 CET] <BtbN> How would the select filter help you then?
[09:39:47 CET] <hiihiii> just curious if I can play with the select filter to achive this
[09:39:57 CET] <hiihiii> currently re-readin docs
[09:40:12 CET] <BtbN> You will need to know the precise duration no matter what
[09:40:53 CET] <BtbN> In theory a filter that discards the last N frames is possible, by buffering N frames and discarding the buffer on EOF, but I don't think one exists yet.
[09:41:24 CET] <hiihiii> idk maybe something to tell ffmpeg "hey we've incounterd a long sequence of still frames maybe we should stop"
[09:41:40 CET] <hiihiii> oh ok
[09:42:22 CET] <BtbN> Does mpdecimate work for your case?
[09:45:11 CET] <hiihiii> maybe let me check
[09:52:09 CET] <hiihiii> I'm not supposed to use mpdecimate with -vsync 0
[09:52:29 CET] <hiihiii> ?
[10:26:50 CET] <hiihiii> select works just fine
[10:26:55 CET] <hiihiii> thx
[10:27:09 CET] <BtbN> How did you manage to select the last N frames?
[10:27:15 CET] <BtbN> Without knowing the duration?
[10:27:42 CET] <hiihiii> I didn't select the last N frames
[10:27:48 CET] <hiihiii> per say
[10:28:05 CET] <hiihiii> the ending of each video is a still scene
[10:28:17 CET] <hiihiii> just told it to detect that and discard it
[10:29:05 CET] <hiihiii> select=gt(scene,0.003)
[10:29:56 CET] <hiihiii> although, for some reason I can play the output in my media player
[10:30:08 CET] <hiihiii> ffplay plays it just well
[10:30:55 CET] <hiihiii> I'm on a machine with no codecs though maybe that's why
[10:31:32 CET] <hiihiii> I've also tried playing it on my phone. same problem
[10:31:41 CET] <hiihiii> have to use vlc
[10:32:36 CET] <hiihiii> is there something I need to run with select I'm not aware of
[10:32:38 CET] <hiihiii> ?
[10:33:10 CET] <hiihiii> my command is simple
[10:33:45 CET] <hiihiii> -i input -vsync 0 -an -c:v libx264 -crf 30 -vf "select=gt(scene\,0.003)" output
[10:34:34 CET] <hiihiii> without the video filter everything plays fine ?!
[10:52:23 CET] <BtbN> the filter probably makes a mess of the timestamps
[10:52:33 CET] <BtbN> try regenerating them afterwards
[10:52:37 CET] <BtbN> setpts or something
[10:53:10 CET] <BtbN> Or try getting rid of -vsync
[11:54:41 CET] <shin-ts> Why can't we add plug-ins after compilation of FFmpeg binary.
[11:56:05 CET] <pink_mist> what are plug-ins?
[11:56:14 CET] <pink_mist> in terms of ffmpeg
[11:57:00 CET] <leot> Hello folks!
[11:57:12 CET] <shin-ts> pink_mist plug-ins or format plug-ins.
[11:58:25 CET] <leot> AFAICS it seems that CVE-2019-13390 was fixed in ffmpeg-4.2.1 can it be added to https://www.ffmpeg.org/security.html the corresponding commit should be: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1529dfb73a5157dcb8762051ec4c8d8341762478
[11:58:47 CET] <shin-ts> Suppose you compiled an FFmpeg binary libaom-av1 but you wish to use rav1e in FFmpeg, you've to recompile entire binary yourself, again.
[11:59:17 CET] <shin-ts> With plug-ins you can easily add those and work with it without thinking.
[12:01:07 CET] <ritsuka> probably because it's fast enough to recompile the whole thing, and you don't have to worry about api changes breaking compiled plugins
[12:04:31 CET] <shin-ts> The '-q' scale ranges 2 to 31. Is there any reason of why range is not 0 to 100?
[12:05:36 CET] <shin-ts> the scale should be like (0 = worst quality, 100 = best quality)
[12:26:27 CET] <shin-ts> The WebP decoder implementation is incomplete, it can't iterate animated WebP frames.
[12:26:37 CET] <durandal_1707> nobody cares
[12:27:43 CET] <shin-ts> what?
[15:40:33 CET] <devinheitmueller> Good morning. Ive got a weird case where I have a filtergraph that includes crop followed by scale. However when I use the eval=frame mode for crop the scaler becomes confused. It looks like the crop filter arbitrarily changes the AVFilterLink when the crop properties change, and the scaler doesnt see the change because it expects the AVFilterLinks to never change after the pipeline is setup.
[15:40:48 CET] <devinheitmueller> Is there any policy with regards to changing AVFilterLinks after the graph is constructed and running?
[15:41:53 CET] <devinheitmueller> In principle we should probably be calling config_props() again to inform the downstream filter of the change, but there is no way for a filter to signal that back to the caller.
[16:28:04 CET] <devinheitmueller> I can either modify the crop filter to not change its output links properties, so that it uses local context data to drive its operations instead of the AVFilterLink properties. That will cause the scaler to see the frame properties dont match the filter link and reconfigure. Alternatively I can change the scale filter to watch for changes to its filter link (i.e. cache the last values in the filter contex
[16:28:04 CET] <devinheitmueller> and compare against the filterlink properties).
[16:28:12 CET] <devinheitmueller> ^ Both of these solutions are pretty ugly.
[17:02:38 CET] <ufk> hi! :) i'm trying to stream a single picture endlessly to a v4l2 device without success. i don't see errors but it stops immidiately. this is what I have so far: ffmpeg -loop 1 -framerate 10 -i binary-file.png -t 30 -pix_fmt yuv420p -f v4l2 /dev/video0
[17:02:41 CET] <ufk> what am I missing ? :)
[17:13:25 CET] <ufk> ok removed -t 30 and it works
[17:19:43 CET] <Hello71> >endlessly
[17:19:46 CET] <Hello71> >limit time
[17:19:48 CET] <Hello71> hm...
[19:14:13 CET] <voices> hey, can i reduce a flicker (shutterspeed/lighting mismatch) with ffmpeg? here's an example of the technique https://youtu.be/YyQjFuFYchg?t=91
[19:21:23 CET] <voices> they do a 50% opacity overlay of the same clip and offset it by one frame or so
[19:27:39 CET] <furq> voices: there's a deflicker filter but it doesn't do that
[19:28:45 CET] <furq> you could probably replicate that specific technique with the overlay filter though
[20:10:17 CET] <durandal11707> voices: tmix filter?
[21:01:44 CET] <irgendwer4711> hi, how to get a corrected time code when trim copy a movie?
[21:40:29 CET] <irgendwer4711> anyone?
[22:17:02 CET] <tester0815> Hi guys, I'm new at IRC, never tried this before, hope I'll do fine
[22:17:13 CET] <tester0815> I'm sure it's a stupid question, but I find no answer for this.
[22:17:22 CET] <tester0815> So would be proud if you can help me:
[22:17:33 CET] <tester0815> Tried to rewrap a .mts to mp4 using ffmpeg, with this command: ffmpeg -i test.mts -c copy -a copy test.mp4
[22:17:45 CET] <tester0815> Works fine, but after checking bitrate, the bitrate of mts ist something around 105MB/s and mp4 ist 25MB/s
[22:18:25 CET] <tester0815> Is that correct?
[22:19:35 CET] <tester0815> Thanks for your answers.
[22:20:06 CET] <klaxa> not sure -a copy is a thing?
[22:20:38 CET] <klaxa> but if you use -c copy the video streams of both files should be bit identical (save for format filters)
[22:21:42 CET] <furq> tester0815: you probably want -map 0
[22:21:50 CET] <furq> otherwise it'll only copy one of each type of stream
[22:23:15 CET] <tester0815> thanks, I'll try
[22:31:19 CET] <irgendwer4711> how to get a corrected time code when trim copy a movie?
[22:42:37 CET] <tester0815> furq I tried your suggestion but same video bitrate as before, mts 105Mbit/s, mp4 25 Mbit/s
[22:43:20 CET] <devinheitmueller> Could also be the mts is a constant bitrate stream with null pid padding, which would all be stripped in creating the MP4. Hence the video and audio are copied exactly but the resulting file is much smaller.
[22:44:00 CET] <devinheitmueller> @tester0815 Pastebin the output that shows the input, mapping, and ouput definition when running the ffmpeg command line.
[22:44:04 CET] <furq> is the mp4 actually a quarter of the size
[22:44:20 CET] <tester0815> the file size is nearly same
[22:44:32 CET] <furq> well yeah the bitrates can't possibly be that much different then
[22:44:41 CET] <furq> so whatever tool you're using is probably misreporting it
[22:45:01 CET] <tester0815> ffmpeg -i PRIVATE/AVCHD/BDMV/STREAM/00000.MTS -map 0 -vcodec copy -acodec copy -sn test2.mp4
[22:45:01 CET] <tester0815> ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
[22:45:01 CET] <tester0815> built with Apple clang version 11.0.0 (clang-1100.0.33.16)
[22:45:03 CET] <tester0815> configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.0.1.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray -
[22:45:05 CET] <tester0815> -enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr
[22:45:07 CET] <tester0815> --enable-videotoolbox --disable-libjack --disable-indev=jack
[22:45:09 CET] <tester0815> libavutil 56. 31.100 / 56. 31.100
[22:45:11 CET] <tester0815> libavcodec 58. 54.100 / 58. 54.100
[22:45:13 CET] <tester0815> libavformat 58. 29.100 / 58. 29.100
[22:45:15 CET] <tester0815> libavdevice 58. 8.100 / 58. 8.100
[22:45:17 CET] <tester0815> libavfilter 7. 57.100 / 7. 57.100
[22:45:19 CET] <tester0815> libavresample 4. 0. 0 / 4. 0. 0
[22:45:21 CET] <tester0815> libswscale 5. 5.100 / 5. 5.100
[22:45:22 CET] <devinheitmueller> tester0815: STOP
[22:45:23 CET] <furq> well this is going to take a while
[22:45:23 CET] <tester0815> libswresample 3. 5.100 / 3. 5.100
[22:45:25 CET] <tester0815> libpostproc 55. 5.100 / 55. 5.100
[22:45:27 CET] <tester0815> Input #0, mpegts, from 'PRIVATE/AVCHD/BDMV/STREAM/00000.MTS':
[22:45:29 CET] <tester0815> Duration: 00:02:46.08, start: 1.020000, bitrate: 26768 kb/s
[22:45:31 CET] <tester0815> Program 1
[22:45:33 CET] <tester0815> Stream #0:0[0x1011]: Video: h264 (High) (HDPR / 0x52504448), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
[22:45:35 CET] <devinheitmueller> please do not paste console output directly into the IRC window. Please use pastebin.
[22:45:35 CET] <tester0815> Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
[22:45:37 CET] <tester0815> Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
[22:45:39 CET] <tester0815> File 'test2.mp4' already exists. Overwrite ? [y/N] y
[22:45:41 CET] <tester0815> [mp4 @ 0x7fa085009c00] track 1: codec frame size is not set
[22:45:43 CET] <tester0815> Output #0, mp4, to 'test2.mp4':
[22:45:45 CET] <tester0815> Metadata:
[22:45:47 CET] <tester0815> encoder : Lavf58.29.100
[22:45:49 CET] <tester0815> Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 50 fps, 50 tbr, 90k tbn, 90k tbc
[22:45:51 CET] <tester0815> Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
[22:45:53 CET] <tester0815> Stream mapping:
[22:45:55 CET] <tester0815> Stream #0:0 -> #0:0 (copy)
[22:45:57 CET] <tester0815> Stream #0:1 -> #0:1 (copy)
[22:45:59 CET] <tester0815> Press [q] to stop, [?] for help
[22:46:01 CET] <tester0815> frame= 8304 fps=6788 q=-1.0 Lsize= 516022kB time=00:02:46.04 bitrate=25458.0kbits/s speed= 136x
[22:46:03 CET] <tester0815> video:506815kB audio:9082kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024099%
[22:46:05 CET] <tester0815> oh sorry,
[22:46:09 CET] <tester0815> that's too much.
[22:46:11 CET] <tester0815> Sorry, for that
[22:46:15 CET] <tester0815> newb as its best
[22:47:07 CET] <furq> anyway ffmpeg is reporting the input bitrate there as 25mbps
[22:47:24 CET] <furq> so probably-mediainfo is misreporting it
[22:47:41 CET] <devinheitmueller> Yeah, if the filesize is nearly the same and the output youve provided shows the content isnt being reencoded then its probably a reporting issue.
[22:47:46 CET] <devinheitmueller> Yeah, what furq said. :_)
[22:48:10 CET] <tester0815> okay, didn't find that message.
[22:51:04 CET] <tester0815> Thanks guys, that's what i thought, so it's a losless rewrap. Thanks a lot.
[22:51:40 CET] <tester0815> This is the summary of the input file, right:
[22:52:18 CET] <tester0815> Input #0, mpegts, from 'PRIVATE/AVCHD/BDMV/STREAM/00000.MTS': Duration: 00:02:46.08, start: 1.020000, bitrate: 26768 kb/s
[22:56:32 CET] <tester0815> Kay Guys thanks a lot for your answers and your time, bye cu next time
[23:15:55 CET] <LFSVeteran> I want to implement "ffmpeg -f s32le -ac 2 -ar <samplerate> -i http://ip:port/stream -acodec pcm_s32le -ac 2 -ar <samplerate> output.wav" in c
[23:16:05 CET] <LFSVeteran> but where to start? checked the examples
[23:25:57 CET] <furq> LFSVeteran: probably transcode_aac.c
[23:26:17 CET] <furq> you don't need -ac or -ar as output options, they'll be kept the same as the input by default
[23:26:31 CET] <LFSVeteran> ah ok
[23:26:35 CET] <furq> so you don't need to filter or resample
[23:27:12 CET] <LFSVeteran> little confused about the streaming part
[23:27:23 CET] <LFSVeteran> checking transcode_aac.c once more
[23:32:33 CET] <furq> it's more or less the same but you'll need av_find_input_format("s32le") and an avdictionary containing the sample rate and channels as the third and fourth args to avformat_open_input
[00:00:00 CET] --- Fri Jan 3 2020
More information about the Ffmpeg-devel-irc
mailing list