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

burek burek021 at gmail.com
Thu Jul 14 02:05:01 CEST 2016


[00:01:03 CEST] <Bray90820> jkqxz: How would I check to see what my mp4 files are currently because I thought the default was h.264
[00:01:38 CEST] <jkqxz> ffprobe will tell you.
[00:03:15 CEST] <Bray90820> jk looks like h.264 to me
[00:03:17 CEST] <Bray90820> Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 8:9 DAR 4:3], 799 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
[00:03:23 CEST] <Bray90820> jkqxz:
[00:03:45 CEST] Action: Bray90820 can't remember to hit tab
[00:05:34 CEST] <jkqxz> With the options and quality you wanted?  If that copied, it's probably fine.  Otherwise you should play some back to make sure it's sensible.
[00:07:05 CEST] <Bray90820> I already know the quality is fine. without pausing it and looking at them side by side i can't really tell a difference and it takes up a third of the space and is iPad compatible so I think i'm all good
[00:09:03 CEST] <Bray90820> jkqxz: Unless there is something else you think I should know
[00:11:38 CEST] <jkqxz> No, you should be good with that.  The output working is the thing that matters.
[00:12:43 CEST] <Bray90820> jkqxz: Thanks
[01:40:31 CEST] <Jnorthrup> does anyone have a working nnedi weights file for zaranoe?
[01:57:20 CEST] <c_14> https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
[01:57:23 CEST] <c_14> It's listed in the docs https://ffmpeg.org/ffmpeg-filters.html#nnedi
[02:01:54 CEST] <pfelt1> is hevc the only option for ffmpeg for h.265/hevc decoding?
[02:04:39 CEST] <Jnorthrup> c_14: for the zaranoe 32 bit build it says unexpected size of file nnedi3_weights.txt
[02:05:07 CEST] <Jnorthrup> s/txt/bin/
[02:10:16 CEST] <BNS> Hello.  I have just downloaded ffmpeg 3.1.1
[02:10:37 CEST] <BNS> I see in the release notes that OpenEXR support has been expanded
[02:11:28 CEST] <BNS> Are there are command line options to deal with multiple channels embedded in the EXR file?
[02:57:55 CEST] <c_14> Jnorthrup: the same file should work across all OS 32/64 bit etc
[02:59:51 CEST] <c_14> BNS: ffmpeg -h decoder=exr, don't think so though
[05:12:40 CEST] <zhrts> hello, I am trying to use a udp multicast h264 stream as an input to ffmpeg. VLC plays it perfectly, but ffplay/ffprobe/mpv all fail with inconsistent errors when I try to open it with them. Is there a way I can find the exact codec settings VLC is using and use them with ffmpeg?
[07:38:23 CEST] <strongcoffee> "Even though AAC should generally give better quality than MP3 at the same bitrates, libmp3lame should give better quality output than libfaac."
[07:38:44 CEST] <Spring> at the same settings?
[07:39:14 CEST] <Spring> so the libfaac encoder is shit? or what :p
[07:44:10 CEST] <ritsuka> yes, faac is not a good encoder
[09:06:08 CEST] <bp0> Spring, there are many better aac encoders than faac.
[09:06:09 CEST] <bp0> http://wiki.hydrogenaud.io/index.php?title=AAC_encoders
[09:06:46 CEST] <bp0> if fdk aac is available, you can use that with ffmpeg
[09:07:02 CEST] <JEEB> heck, even the internal one is now better than faac
[09:07:12 CEST] <JEEB> after atomnuker's improvements
[09:07:50 CEST] <bp0> faac is old. the developer went to work at Nero years ago, and Nero AAC is its successor
[09:07:57 CEST] <bp0> but now, even Nero is old
[09:08:51 CEST] <bp0> ffmpeg native aac is much improved
[09:13:06 CEST] <bp0> idk about that that "libvorbis >= libfdk_aac" bit in https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio
[09:17:08 CEST] <furq> seems about right to me
[09:17:38 CEST] <furq> fdk is decent but there are better aac encoders
[09:18:23 CEST] <bp0> by HA testing, only apple's
[09:18:37 CEST] <furq> i expect fhg is better as well
[09:21:01 CEST] <bp0> I don't know that the two fraunhofer encoders have been tested against each other
[09:21:10 CEST] <furq> they haven't to my knowledge
[09:21:27 CEST] <furq> but it's probably a safe bet that the closed source floating point encoder is better than the open source fixed point one
[09:23:21 CEST] <bp0> is there a way to get a recent version of it? has there been any development since last winamp?
[09:23:50 CEST] <bp0> fdk is actively developed, but you may very easily be right
[09:23:59 CEST] <furq> i've never used fhg
[09:24:15 CEST] <furq> i only ever use aac in mp4 video
[09:24:30 CEST] <bp0> ah
[09:27:12 CEST] <bp0> I've used the fhg wrapper cli utility, in wine, just to try it out
[09:27:44 CEST] <bp0> if I'm going to that trouble I would use apple's instead
[09:28:12 CEST] <bp0> i'm pleased that fdk exists, and find it appealing in different ways
[09:29:38 CEST] <bp0> I have an archive of FLACed CD's, and then a mirror of all of that as aac that gets synced to devices
[09:40:58 CEST] <bp0> i've been playing with the new hdcd filter in ffmpeg, and i realize that fdk will only accept 16-bit input
[09:41:11 CEST] <bp0> so I'll have to change to something else to take advantage of that anyway
[09:44:09 CEST] <Spring> bp0, cool so the native aac is better
[11:41:38 CEST] <k_sze[work]> What does ffmpeg do about corrupted P-frames or B-frames?
[11:43:52 CEST] <k_sze[work]> I have these .nut files with corrupted frames in them. When I decode them using ffmpeg, I see that the frame time skips when a corrupted frame occurs.
[11:44:35 CEST] <k_sze[work]> I'm not entirely sure if ffmpeg actually skipped over the corrupted frame (which means that the frame time is from the frame right after the corrupted frame)
[12:09:50 CEST] <termos> I upgraded libffmpeg and now the AVCodecContext::bit_rate is always 0 for the incoming stream, before this was set to the correct avg value of the input stream. Something deprecated?
[13:15:47 CEST] <termos> aha it's been replaced by AVStream::codecpar, no more AVCodecContext in AVStream
[13:37:25 CEST] <termos> I still get 0 bitrate when accessing the bit_rate in the new AVStream::codecpar
[14:34:21 CEST] <gener1c> hey , i am trying to open an rtp stream with ffmpeg/ffmplay and it keeps on telling me the packet is too short and that codec info couldnt be fetched
[14:34:59 CEST] <gener1c> what do i need to do to get more information? vlc autodetected the codecs and information from the rtp multicast stream
[14:37:14 CEST] <gener1c> http://paste.ubuntu.com/19268632/
[14:41:43 CEST] <gener1c> looks like its supposed to be mpegts over rtp but i want to analyze the stream to be sure but i have no clue how, ill google it
[14:42:41 CEST] <pgorley> have you tried setting -loglevel?
[14:46:33 CEST] <eaglex> I'm streaming a rtsp stream from a "DS-7216HGHI-SH / A" to youtube live; all fine and dandy until there is a lot of movement in front of the camera, then I start getting these: http://pastebin.com/znC9V2Fz and then the stream stops -- I'm pretty sure it's the shitty firmware in the Hikvision, but is there anything I can do to work-around this issue?
[15:17:04 CEST] <amanda_> Hi! I only get 50fps with ffmpeg -f x11grab at 2560x1440, is this due to slow cpu or something (i5 2500k, 3.3ghz)
[15:18:14 CEST] <c_14> hard to say without more information
[15:18:19 CEST] <c_14> What's your full commandline?
[15:19:39 CEST] <BtbN> The framebuffer has to be pulled back from your GPU, which is usualy one of the slowest things you can ask from them.
[15:19:56 CEST] <amanda_> ffmpeg -f x11grab -s 2560x1440 -r 60 -i :0.0 -f alsa -ac 2 -i hw:0 -f flv -ac 2 -ar 48000 -c:v nvenc -g 120 -keyint_min 60 -b:v 4000k -minrate 4000 k -maxrate 4000k -pix_fmt yuv420p -s 2560x1440 -tune film -acodec aac -threads 4 -strict normal -bufsize 4000k test.mkv
[15:21:35 CEST] <amanda_> in 1920x1080 it works great, is this due to bad cpu speed? i can oc to 4.6ghz
[15:21:49 CEST] <amanda_> (ffmpeg 3.1)
[15:21:50 CEST] <furq> do you get 50fps with ffmpeg -f x11grab -s 2560x1440 -r 60 -i :0.0 -c:v rawvideo -f null /dev/null
[15:22:09 CEST] <amanda_> no i dont, i get stable 60fps then
[15:22:17 CEST] <furq> presumably it's nvenc's fault then
[15:22:30 CEST] <BtbN> Is this on a Kepler card?
[15:22:35 CEST] <amanda_> it's a gtx 970
[15:22:58 CEST] <debianuser> amanda_: I _guess_ it's due to slow yuv420p conversion. Test it: `ffmpeg -f x11grab -s 2560x1440 -r 60 -i :0.0 -vf format=yuv420p -t 30 -f null -`
[15:23:01 CEST] <c_14> don't use -r, use -framerate
[15:23:25 CEST] <amanda_> debianuser: that gives me 45fps
[15:23:28 CEST] <BtbN> Maxwell should be easily fast enough for 1440p at 60fps
[15:24:14 CEST] <BtbN> also, why do you write flv to a .mkv file?
[15:24:17 CEST] <debianuser> amanda_: ffmpeg fault then? ;)
[15:24:29 CEST] <furq> i assume -f flv is because this is going out over rtmp
[15:24:37 CEST] <furq> or will be at some point
[15:24:50 CEST] <amanda_> point is to stream to twitch :-)
[15:25:10 CEST] <BtbN> your bitrate is too high then, and your keyint too low.
[15:25:21 CEST] <amanda_> what should keyint be then?
[15:25:30 CEST] <BtbN> ah, nvm. 60 fps, not 30.
[15:25:56 CEST] <BtbN> anyway, 1440p, at that low bitrate, at 60fps, encoded with nvenc... poor viewers.
[15:26:01 CEST] <furq> 4mbit seems pretty reasonable for 1440p30
[15:26:10 CEST] <furq> and by reasonable i mean not too high, not good
[15:26:15 CEST] <amanda_> :()
[15:26:23 CEST] <furq> especially with nvenc
[15:26:36 CEST] <amanda_> so i end up with 30fps?
[15:26:52 CEST] <furq> depends how compressible the source is
[15:26:53 CEST] Action: debianuser had a patch for faster yuv420p conversion somewhere...
[15:26:55 CEST] <amanda_> sure.. i can stream rawvideo to twitch, but i think they get angry of 1gbit/s
[15:27:09 CEST] <furq> zscale should do faster format conversion
[15:27:12 CEST] <BtbN> but yeah, x11grab gives you rgb I'd guess. nvenc needs yuv, ideally nv12. And that conversion has to be done on the CPU
[15:27:37 CEST] <amanda_> BtbN: so overclocking to 4.6ghz would fix it?
[15:27:49 CEST] <BtbN> is your CPU maxed out?
[15:27:50 CEST] <furq> if it's going to twitch then it'll presumably need to be yuv420p
[15:28:14 CEST] <BtbN> well, it has to be yuv420
[15:28:18 CEST] <furq> and -vf format is singlethreaded iirc so it'd just need to be one core that's maxed
[15:28:19 CEST] <BtbN> the format nvenc gets it in isn't part of h264
[15:28:28 CEST] <BtbN> It prefers nv12
[15:28:44 CEST] <amanda_> only one core maxes out
[15:28:47 CEST] <amanda_> for x11grab
[15:28:49 CEST] <furq> ^
[15:28:55 CEST] <amanda_> rest is offload on nvenc
[15:29:14 CEST] <amanda_> so if i do 4.6ghz, will it work? cpu only gets 60c with 4.6ghz
[15:29:45 CEST] <BtbN> Twitch already hates you if you go beyond 3.5Mbit/s
[15:29:59 CEST] <amanda_> oh ok
[15:30:02 CEST] <furq> amanda_: does your build have zscale
[15:30:08 CEST] <furq> that should do the format conversion faster
[15:30:10 CEST] <amanda_> furq: how do i know?
[15:30:18 CEST] <BtbN> In theory, the format conversion could be done via CUDA.
[15:30:25 CEST] <BtbN> But someone would have to write a filter for that.
[15:30:27 CEST] <furq> -vf zscale,format=yuv420p
[15:30:34 CEST] <furq> if that works then you've got zscale
[15:30:41 CEST] <furq> or you could look through your configure line but that takes longer
[15:31:13 CEST] <amanda_> where in cmdline should -vf zscale,format=yuv420p be included?
[15:31:26 CEST] <furq> replace -pix_fmt yuv420p with that
[15:31:51 CEST] <furq> also i'm pretty sure -threads 4 and -tune film have no effect with nvenc
[15:31:54 CEST] <amanda_> [AVFilterGraph @ 0x12db660] No such filter: 'zscale'
[15:31:54 CEST] <debianuser> amanda_: A few years ago I wrote this to get 60fps conversion: http://pastebin.com/QAwE7Tvs It's basically a copypaste from the ff_rgb24toyv12_c() function above with offsets adjusted. I don't think it was ever included in ffmpeg. But if you don't mind building ffmpeg yourself you can try it. :)
[15:32:09 CEST] <furq> if you're going to build ffmpeg yourself then just build it with zscale
[15:32:19 CEST] <amanda_> where do i get zscale?
[15:32:50 CEST] <furq> https://github.com/sekrit-twc/zimg/
[15:33:10 CEST] <furq> be sure to compile it with --enable-x86simd because it's disabled by default for some insane reason
[15:33:15 CEST] <furq> or it was last time i tried
[15:34:27 CEST] Action: amanda_ builds zimg
[15:35:25 CEST] <amanda_>   --enable-libzimg         enable z.lib, needed for zscale filter [no]
[15:35:30 CEST] <amanda_> that's what's needed for ffmpeg?
[15:35:34 CEST] <furq> right
[15:36:38 CEST] <amanda_> Unknown option "--enable-x86simd".
[15:36:40 CEST] <amanda_> ?
[15:36:42 CEST] <amanda_> :)
[15:36:44 CEST] <amanda_> do i need that
[15:36:56 CEST] <furq> that's in zscale's configure
[15:37:03 CEST] <furq> if it's not there any more then maybe it's the default now
[15:42:02 CEST] <amanda_> Is there any documentation regarding zimg? ffmpeg complains about ERROR: zimg not found using pkg-config
[15:42:40 CEST] <furq> tail -50 config.log
[15:43:49 CEST] <amanda_> furq: in ~/ffmpeg-3.1/config.log or ~/zimg/config.log?
[15:43:56 CEST] <furq> ffmpeg
[15:47:04 CEST] <amanda_> pkg-config --exists --print-errors zimg -> package zimg was not found in the pkg-config search path  \n Perhaps you should add the directory containing `zimg.pc' \n to the PKG_CONFIG_PATH environment variable \n No package 'zimg' found
[15:47:18 CEST] <furq> did you install zimg
[15:47:27 CEST] <amanda_> i did, it gave me a .a file
[15:47:58 CEST] <furq> make install should have installed a .pc file to your default pkg-config dir
[15:48:34 CEST] <amanda_> oh thanks for help
[15:49:29 CEST] <amanda_> ok
[15:50:41 CEST] <amanda_> furq: the .pc file was placed in /usr/lib/pkgconfig, copied to /usr/lib64/pkgconfig/, seems to work. *compiles ffmpeg-3.1*
[15:56:27 CEST] <amanda_> [Parsed_zscale_0 @ 0x26fe700] code 3074: no path between colorspaces/A speed=   0x
[15:56:31 CEST] <amanda_> ?
[15:56:31 CEST] <amanda_> :D
[15:56:56 CEST] <shincodex> ffmpeg actually uses pkg-config correctly?
[15:56:57 CEST] <shincodex> meh
[15:57:04 CEST] <amanda_> it did, because it compiled :P
[15:58:17 CEST] <amanda_> : ]
[15:58:21 CEST] <amanda_> thanks for your help!
[15:58:23 CEST] <shincodex> yasm compile?
[15:58:27 CEST] <shincodex> or debug
[15:59:43 CEST] <amanda_> shincodex: how do i know?
[15:59:59 CEST] <shincodex> in the slew of text mostly full of CC
[16:00:03 CEST] <shincodex> youll see YASM appear
[16:00:13 CEST] <shincodex> or open aterminal and type yasm.exe
[16:00:19 CEST] <shincodex> err sorry wrong os
[16:00:21 CEST] <shincodex> type yasm
[16:00:27 CEST] <amanda_> yeah i have yasm
[16:01:07 CEST] <shincodex> finally
[16:01:15 CEST] <shincodex> you have --disable-debug in your configure
[16:01:25 CEST] <shincodex> and dont have rtlo turned on
[16:02:13 CEST] <amanda_> what's rtlo?
[16:02:24 CEST] <shincodex> run time link optimizations.
[16:02:36 CEST] <shincodex> Youll know its on cause it will take like > 10 minutes to link lol
[16:03:08 CEST] <xx_pk_xx> Hey guys. I'm doing a little project, and I am trying to encode DVB subtitles. I'm trying to use png images as input format for DVB subtitles. However, maybe I'm doing something wrong - I'm not sure if I'm changing AVFrame to AVSubtitle corectly, because output is never right. Would anyone at least point me into right direction? I could use ASS subtitles as input as well, but from some sources it seems like it's impossible.
[16:03:30 CEST] <amanda_> shincodex: so i should do ./configure (100 options) --disable-debug ?
[16:04:04 CEST] <amanda_> shincodex: how do i enable rtlo?
[16:04:23 CEST] <amanda_> ./configure --help |grep rtlo <- doesnt show anything
[16:05:58 CEST] <shincodex> the tests for yasm assembled files run faster than rtlo.
[16:06:12 CEST] <shincodex> Yes 100 options --disable-debug as your last statement if you like
[16:06:40 CEST] <shincodex> but if you plan to debug ffmpeg stuff like gdb or other tool youll not want that statement
[16:07:07 CEST] <amanda_> i will try oc to 4.6ghz
[16:07:09 CEST] <amanda_> maybe it works :)
[16:07:22 CEST] Action: amanda_ recompiles ffmpeg with --disable-debug
[16:07:59 CEST] <debianuser> amanda_: If you won't succeed with zimg/zscale - you can try my patch too. :) Just apply the patch, build as usual and test if fps is any different. :)
[16:08:18 CEST] <amanda_> debianuser: zimg works, but i get errors in ffmpeg
[16:08:40 CEST] <amanda_> ffmpeg -f x11grab -s 2560x1440 -framerate 60 -i :0.0 -f alsa -ac 2 -i hw:0 -f flv -ac 2 -ar 48000 -c:v nvenc -g 120 -keyint_min 60 -b:v 4000k -minrate 4000k -maxrate 4000k -vf zscale,format=yuv420p -s 2560x1440 -tune film -acodec aac -threads 4 -strict normal -bufsize 4000k test.mkv
[16:08:51 CEST] <amanda_> [Parsed_zscale_0 @ 0x1d0b560] code 3074: no path between colorspaces
[16:10:36 CEST] <amanda_> brb
[16:10:39 CEST] <amanda_> reboot and oc to 4.6ghz
[16:10:43 CEST] Action: amanda_ crosses her fingers
[16:30:50 CEST] <Kadigan> Hey. Quick question -- I have a 2048x1536 video which contains only 1504x1504 material (from upper left corner). The rest is black. So, naturally, I attempted to "-vf 'crop=1504:1504:0:0'" to get the desired material.
[16:31:04 CEST] <Kadigan> However, for some reason (encoding to mp4) this gives me a 3008x1504 video.
[16:31:18 CEST] <Kadigan> What am I doing wrong?
[16:47:04 CEST] <Kadigan> http://pastie.org/private/b8mfgtq9lylpgecvafrzdw here You go
[16:55:02 CEST] <c_14> that should work
[16:55:06 CEST] <c_14> It lists the correct size in the output
[16:55:14 CEST] <c_14> What are you using to check the dimensions of the output?
[17:05:04 CEST] <Kadigan> QuickTime Player, OS X Preview and 360fly Director, which all show wrong sizes and 360fly incorrectly warps the video (it's supposed to be a 360 dome)
[17:05:28 CEST] <c_14> try checking with ffprobe
[17:07:22 CEST] <Kadigan> http://pastie.org/private/ul9wc0j5rttrtnyhbejahg there.
[17:08:21 CEST] <c_14> The size is correct there
[17:08:21 CEST] <Kadigan> ffprobe claims it's 1504x1504, but SAR/DAR show 2:1, with a tbc of 60000/1001
[17:08:31 CEST] <Kadigan> which is weird.
[17:08:47 CEST] <Kadigan> (it's supposed to be 30000/1001, 1:1 as in square pixels)
[17:08:52 CEST] <c_14> the sar/dar is weird
[17:09:05 CEST] <c_14> try adding ,setsar=1 after the crop in the conversion command
[17:09:08 CEST] <Kadigan> I think I know what's causing this. Can You tell me off the top of Your head
[17:09:13 CEST] <Kadigan> ah, yeah, that. Will do.
[17:10:02 CEST] <Kadigan> I believe Final Cut Pro X is doing something weird to SAR at export of 2K.
[17:10:10 CEST] <Kadigan> Okay, now it's 1504x1504 as it should be,
[17:10:17 CEST] <Kadigan> but the original material is squished to half width.
[17:10:26 CEST] <Kadigan> (ie. left half content, right half empty)
[17:10:35 CEST] <Kadigan> I think I need to tell it to treat it differently at input.
[17:10:50 CEST] <c_14> try setsar then crop
[17:10:54 CEST] <c_14> maybe also setsar,setdar,crop
[17:11:14 CEST] <Kadigan> Trying now.
[17:11:54 CEST] <Kadigan> Now I get 1128x1504 :D
[17:12:01 CEST] <Kadigan> (SAR and DAR show up as 3:4)
[17:12:27 CEST] <lilibox> hi
[17:13:51 CEST] <amanda_> OC TO 4.6ghz -> stable 60 fps
[17:13:56 CEST] <amanda_> stupid mother board
[17:13:56 CEST] <amanda_> :D
[17:14:45 CEST] <Kadigan> Okay, I can't continue dealing with this right now. I'll come back tomorrow morning. c_14 - thanks very much for Your help.
[17:15:12 CEST] <lilibox> i have got such crazy problem, i am dealing with bunch of 23.97fps footages
[17:16:01 CEST] <lilibox> when i put them to adobe premiere main project is also 23.97fps Export media option panel sets export frame rate to 24fps which is imho weird
[17:16:27 CEST] <lilibox> but i can chose 23.97fps also
[17:17:34 CEST] <lilibox> is possible to tell ffmpeg to every parameter specific frame rate, i mean if i can ad -r 23.97 for input video and audio and also for exporting format
[17:17:51 CEST] <lilibox> for output rate to be sure
[17:18:10 CEST] <lilibox> thank you for any hints
[17:40:35 CEST] <pfelt> afternoon all. i'm trying to decode a 4k multicast stream and the best i can get is about .88x (80% of realtime).  i wonder if there is *anything* i can do to get that faster?  Here's the relevant information:   http://pastebin.com/XFq3FUqh
[17:40:52 CEST] <pfelt> (this is git head on fedora 23)
[17:48:23 CEST] <furq> pfelt: not unless you have a gtx 950 or better
[17:53:11 CEST] <jkqxz> That's bounded by the CPU but not actually using all of it because there isn't enough parallelism in the decoder, presumably?  You might do better with a smaller but faster CPU.
[17:54:15 CEST] <pfelt> i hoped you guys weren't going to say that
[17:55:16 CEST] <pfelt> that's a huge bummer
[17:55:53 CEST] <pfelt> are there any tools that could do it?  perhaps gstreamer with libdbe (or whatever their hevc library was)
[17:57:25 CEST] <jkqxz> How much of the available CPU time are you actually using?
[18:00:15 CEST] <pfelt> jkqxz: http://pastebin.com/Y2ZHEUQm
[18:00:16 CEST] <jkqxz> (You might want to try setting an explicit -threads value lower than the default it comes up with (which is presumably 40).)
[18:00:28 CEST] <pfelt> *lower* than 40?
[18:00:44 CEST] <pfelt> i'm actually surprised that i'm able to use this much processor
[18:01:28 CEST] <pfelt> i also tried libx265 to see if that would do any better and it's about the same in terms of the .88x speed
[18:02:14 CEST] <pfelt> or wait, no.  that was zimg when i was still trying to scale
[18:02:20 CEST] <pfelt> libx265 is only encode.  sorry :(
[18:03:10 CEST] <jkqxz> Yeah, start at 1 or 2 and increase it until you get no gain.
[18:04:23 CEST] <pfelt> so, why would lowering the number of threads increase performance?
[18:04:56 CEST] <pfelt> one thread gets me about .33x
[18:05:05 CEST] <pfelt> (oh, but maybe that's your point.)
[18:06:24 CEST] <jkqxz> Having too many threads gains nothing if you don't have work for them to do, and can make things slower because of resource contention.
[18:07:32 CEST] <pfelt> frame= 3222 fps= 61 q=-0.0 size=N/A time=00:00:55.15 bitrate=N/A speed=1.04x
[18:07:39 CEST] <pfelt> that's at 25 threads
[18:07:52 CEST] <pfelt> i wonder if i can do the scaling now
[18:08:25 CEST] <pfelt> heh. nope.  .7
[18:09:13 CEST] <pfelt> ooh.  although i could potentially do that in another ffmpeg process
[18:28:40 CEST] <Dat> how can I convert mkv's to mp4s?
[18:47:09 CEST] <Dat> think i got it
[18:48:27 CEST] <kbarry> I thought i read somewhere that it is possible to set a delay for when an input file will "begin" to be played.
[18:48:39 CEST] <kbarry> I have a library of 100+ wave files (spoken numbers), and would like to have each file begin playing 1 second apart, so that the resultant stream is "one, two, three..." with 1 second between the beginning of each number tract.
[18:48:47 CEST] <Threads> how can i get ffmpeg to stop adding the DURATION tag to video/audio
[18:54:11 CEST] <thebombzen> kbarry: the WAV file format doesn't support pregaps. You could try something silly like this:
[18:54:36 CEST] <thebombzen> for i in list_of_wav_files; do ffplay $i; sleep 1; done
[18:56:49 CEST] <kbarry> thebombzen: That would be silly.
[18:57:03 CEST] <kbarry> I am not sure what a pregap is, but I am refering to:
[18:58:06 CEST] <kbarry> ffmpeg -i "one.wav" -i "two.wav" ...... -delayplaybackstart 0:1 -delayplaybackstart 1:2
[18:58:58 CEST] <thebombzen> a "pregap" is a tag that says "wait this long before playing this track"
[18:59:05 CEST] <thebombzen> the WAV file format doesn't support that
[18:59:58 CEST] <thebombzen> you could manually append one second of silence to each file, with ffmpeg -i sample.wav -lavfi 'anullsrc=r=48000:cl=stereo [a1], [a1] atrim=0:1 [a2], [0:a] [a2] concat=n=2:v=0:a=1 [a]' -map '[a]' sample_with_extra_second.wav
[19:08:43 CEST] <soulshock> ffmpeg -y -i videofile.mov -pix_fmt yuv420p -filter_complex "[0:v]yadif=0:-1:0,split=3[in1][in2][in3];[in1]scale=1280:720[out1];[in2]scale=854:480[out2];[in3]scale=640:360[out3]" -map [out1] -an -c:v libx264 -b:v 4000k -map [out1] videofile_4000k.mp4 -an -c:v libx264 -b:v 3000k videofile_3000k.mp4 -map [out2] -an -c:v libx264 -b:v 2000k videofile_854_2000k.mp4 -an -c:v libx264 -b:v 1500k videofile_854_1500k.mp4 -map [out3] -an -c:
[19:08:43 CEST] <soulshock> gives me
[19:08:43 CEST] <soulshock> Output with label 'out1' does not exist in any defined filter graph, or was already used elsewhere.
[19:08:52 CEST] <soulshock> isnt it possible to reuse the same output for several bitrates?
[19:10:06 CEST] <furq> you've got two -map [out1]
[19:10:19 CEST] <furq> also -pix_fmt yuv420p needs to be specified for each output
[19:10:36 CEST] <furq> or add format=yuv420p before split
[19:10:51 CEST] <soulshock> ahh format=yuv420p that's how it works in filter_complex
[19:11:18 CEST] <soulshock> but can I reuse out1?
[19:11:30 CEST] <furq> -map
[19:11:36 CEST] <furq> -map [out1] -an -c:v libx264 -b:v 4000k -map [out1] videofile_4000k.mp4
[19:11:41 CEST] <furq> get rid of one of those maps
[19:13:04 CEST] <furq> i'm not sure if you can reuse it for two different outputs but evidently you can't for the same output
[19:13:53 CEST] <furq> you could just use split again
[19:15:37 CEST] <soulshock> splitting the output of the scale?
[19:21:12 CEST] <soulshock> ah yes that does work
[19:21:13 CEST] <soulshock> cool
[19:21:26 CEST] <soulshock> I'm daily impressed by the flexibility and power of ffmpeg
[19:22:31 CEST] <kbarry> It looks like there is a switch "itsoffset" but it may only apply if the source if video.
[19:24:13 CEST] <soulshock> this works: -i videofile.mov -pix_fmt yuv420p -filter_complex "[0:v]yadif=0:-1:0,split=3[in1][in2][in3];[in1]scale=1280:720,split=2[out1_1][out1_2];[in2]scale=854:480,split=2[out2_1][out2_2];[in3]scale=640:360,split=2[out3_1][out3_2]" -map [out1_1] -an -c:v libx264 -b:v 4000k videofile_4000k.mp4 -map [out1_2] -an -c:v libx264 -b:v 3000k videofile_3000k.mp4 -map [out2_1] -an -c:v libx264 -b:v 2000k videofile_854_2000k.mp4 -map [out
[19:51:01 CEST] <Threads> dont matter manged to do it
[20:05:56 CEST] <anddam> is there a rule of thumb for bitrate for acceptable quality in spoken audio, e.g. a talk-only show like a podcast?
[20:06:04 CEST] <anddam> in AAC
[20:08:30 CEST] <Threads> anddam 128 maybe or 200 max ?
[20:09:33 CEST] <anddam> oh wow, that's what I use for music
[20:09:40 CEST] <anddam> I expected way les
[20:09:43 CEST] <anddam> less
[20:10:00 CEST] <anddam> I'll make a few test and see
[20:11:26 CEST] <Kadigan_KSB> Hi. I was in here earlier asking about why ffmpeg has issues with me cropping out a part of the video frame and re-encoding. Seems the original .mov I'm trying to process (2k, 2048x1536) has SAR and DAR set to 2:1. I'm currently doing `ffmpeg -i file -vf "crop=1504:1504:0:0" -vframes 1 -y ./test.png` trying to debug it.
[20:12:06 CEST] <kepstin> Kadigan_KSB: what's the difference between what you're expecting, and what you're getting?
[20:12:11 CEST] <Kadigan_KSB> Originally the frame came out 3008x1504 instead of 1504x1504. We tried using 'setsar=1' which made it 1504x1504, but the video is now squished.
[20:12:35 CEST] <anddam> Threads: ah found this perceptual quality comparison http://i231.photobucket.com/albums/ee166/img_f/figure_1.png
[20:12:36 CEST] <kepstin> not sure the sar will be respected properly by the png encoder or viewer
[20:12:37 CEST] <Kadigan_KSB> kepstin: I was expecting a video filling the frame (it's a video of res 2048x1536 with 1504x1504 in there, from 0,0, rest is black)
[20:12:57 CEST] <Kadigan_KSB> kepstin: I'm getting the same results as I got from encoding mp4, so I assume it's accurate.
[20:13:08 CEST] <furq> anddam: there aren't usually useful rules of thumb for bitrate
[20:13:15 CEST] <furq> but for voice i'd have thought 32k he-aac would be fine
[20:13:26 CEST] <furq> you'll need a build with fdk for he-aac
[20:13:37 CEST] <kepstin> Kadigan_KSB: you can't have both SAR and DAR set to 2:1 on a 2048x1536 video, that doesn't make sense
[20:13:42 CEST] <kepstin> Kadigan_KSB: what's the actual SAR?
[20:13:48 CEST] <furq> also opus is optimised for that use case but i assume you can't use that
[20:14:30 CEST] <Kadigan_KSB> kepstin: interesting, on Mac it said sar 2:1 dar 2:1 with tbc 60000/1001,
[20:14:35 CEST] <Kadigan_KSB> on windows I get "Stream #0:0(und): Video: prores (apcn / 0x6E637061), yuv422p10le, 2048x1536, 201508 kb/s, SAR 2:1 DAR 8:3, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)"
[20:14:35 CEST] <kepstin> Kadigan_KSB: keep in mind that the crop filter preserves SAR.
[20:14:47 CEST] <kepstin> no, that says DAR 8:3 :)
[20:14:51 CEST] <kepstin> huh, weird
[20:14:56 CEST] <Jnorthrup> do i need amerge to transcode 4 pcm tracks from one asset into 1 4channel pcm track in the output asset?
[20:15:23 CEST] <kepstin> Kadigan_KSB: the only way for sar and dar to both be 2:1 is if the input video has same number of pixels height and width
[20:15:55 CEST] <furq> Jnorthrup: i think you can use -map_channel
[20:16:02 CEST] <Kadigan_KSB> I don't quite remember what SAR and DAR meant. I remember pixel aspect ratio. Screen Aspect Ratio? And the other one?
[20:16:04 CEST] <furq> there's no reason not to use amerge if you're transcoding though
[20:16:15 CEST] <kepstin> SAR is sample aspect ratio, basically the same as pixel aspect ratio
[20:16:30 CEST] <Kadigan_KSB> Ah, so pixel and frame AR basically.
[20:16:34 CEST] <Kadigan_KSB> Or so?
[20:16:48 CEST] <anddam> furq: that's https://trac.ffmpeg.org/wiki/Encode/AAC#fdk_aac  right?
[20:16:54 CEST] <kepstin> Kadigan_KSB: if you take your 2048x1536 SAR 2:1 DAR 8:3 video and crop to 1504x1504 then you get a 1504x1504 SAR 2:1 DAR 2:1 video.
[20:16:54 CEST] <furq> yes
[20:17:06 CEST] <Kadigan_KSB> In any case, I need to get that square into a square :)
[20:17:22 CEST] <kepstin> Kadigan_KSB: sounds like you need to scale the video :)
[20:17:28 CEST] <Kadigan_KSB> f...
[20:17:34 CEST] <furq> -c:a libfdk_aac -profile:a aac_he_v2 -b:a 32k
[20:17:49 CEST] <Kadigan_KSB> The whole point of me rendering it in 2k was so that I would avoid scaling (and therefore degrading) the picture. It's already shitty as-is.
[20:18:13 CEST] <kepstin> well, you're using 2:1 sar pixels rather than square pixels. if you want square pixel output, you need to scale.
[20:18:35 CEST] <Kadigan_KSB> *sigh*
[20:18:40 CEST] <kepstin> if you want to squish the video to half the width, then you could do it with a 'setsar' filter instead.
[20:18:44 CEST] <furq> can't you just use -vf setsar
[20:18:45 CEST] <furq> yeah
[20:19:22 CEST] <Kadigan_KSB> kepstin: I'm already having it squished (the original 1504x1504 is now taking up 752x1504)
[20:19:27 CEST] <kepstin> crop=1504:1504,setsar=1:1 will give you a 1504x1504 SAR 1:1 DAR 1:1 video that's squished horizontally compared to the original
[20:19:34 CEST] <furq> https://ffmpeg.org/ffmpeg-filters.html#setdar_002c-setsar
[20:19:35 CEST] <Kadigan_KSB> I need it to expand to full frame.
[20:19:41 CEST] <Kadigan_KSB> so what, setsar=1:2?
[20:20:01 CEST] <furq> 1:1 sounds right
[20:20:51 CEST] <Kadigan_KSB> Well, using setsar=1:2 gave me 752x1504 at least, so that's something
[20:21:05 CEST] <Kadigan_KSB> (instead of 1504x1504 with left half used, right half black)
[20:21:09 CEST] <kepstin> setsar doesn't change the pixels in the video, just the display size
[20:22:15 CEST] <kepstin> so a 1504x1504 video with SAR=1:2 will be scaled during playback to display as if it was a 1504x3008 video (depending on the player)
[20:22:50 CEST] <Kadigan_KSB> Meh, so I need to output from another setting altogether.
[20:23:51 CEST] <kepstin> basically, if your original video has the correct sar (i.e. a circle displayed on screen is a circle, not an oval), then ffmpeg's "crop" filter will make sure there's no deformations
[20:24:08 CEST] <Jnorthrup> C:\Users\Jnorthrup.WOHLER\Desktop\ffmpeg-20160712-df1dc52-win32-static
[20:24:10 CEST] <Jnorthrup> >ffmpeg -i SpongeBob_TEST_Paramount.mov -map 0 -c copy -c:v prores_ks -profile:v
[20:24:11 CEST] <kepstin> if your original video does not have correct sar, you can use the 'setsar' filter to fix that
[20:24:11 CEST] <Jnorthrup>  3 -qscale:v 2  -c:a pcm_s16le  -filter_complex "[0:1][0:2][0:3][0:4]amerge"  -y
[20:24:13 CEST] <Jnorthrup>  SBTPFA2.mov
[20:24:14 CEST] <Jnorthrup> [AVFilterGraph @ 0477e2c0] Too many inputs specified for the "amerge" filter.
[20:24:16 CEST] <Jnorthrup> Error initializing complex filters.
[20:24:17 CEST] <Kadigan_KSB> My original file has correct ratios, so things must happen in Final Cut Pro X, because the resultant .mov is borked.
[20:24:17 CEST] <Jnorthrup> Invalid argument
[20:25:15 CEST] <Kadigan_KSB> At least now I know what I'm dealing with. This is probably something that some course in 2k video covers, and it's probably an "industry standard" or something. Anyway, thanks for the assist!
[20:25:32 CEST] <furq> commercial video tool in bad at video shocker
[20:25:35 CEST] <kepstin> Jnorthrup: please use a pastebin site next time, but in the mean time, you need to read the docs for the amerge filter: https://www.ffmpeg.org/ffmpeg-filters.html#amerge-1 (hint: it has a parameter that you need to set)
[20:26:09 CEST] <Kadigan_KSB> furq: I'm kind of used to having things set behind the scenes, but this was a first I actually saw non-square pixels in output. Like I said, it's probably an "industry" 2K thing.
[20:26:35 CEST] <Kadigan_KSB> (ie. I output rect pixels, I process rect pixels, I master BR rect pixels, something like that)
[20:26:36 CEST] <kepstin> Kadigan_KSB: it sounds like your original source is a movie encoded for theatrical display? IIRC, some of the 2k formats for that were anamorphic
[20:27:02 CEST] <Kadigan_KSB> kepstin: no, my original source is 1:1, it's my NLE that makes it 2:1.
[20:27:07 CEST] <Kadigan_KSB> (apparently)
[20:27:34 CEST] <Jnorthrup> kepstin thanks that's remarkably similar to a dozen prior attempts based on other docs
[20:27:36 CEST] <Kadigan_KSB> The only beef I can have is that I wasn't told this would happen. (which is probably something I'm expected to know if I'm dealing with 2k video)
[20:29:14 CEST] <Kadigan_KSB> I assume it may have something to do with stereoscopic 2k video.
[20:29:33 CEST] <Kadigan_KSB> In any case, I've a few other formats to try out tomorrow. Thanks!
[20:30:40 CEST] <Jnorthrup> now i have 4 channel audio occupying ouptut stream 0.
[20:31:02 CEST] <kepstin> Jnorthrup: yep, that's what you told the filter to do.
[20:35:34 CEST] <Jnorthrup> kepstin, for the life of me im not seeinf a google result that says reorder ffmpeg output tracks with filter_complex.  any hints?
[20:36:17 CEST] <kepstin> Jnorthrup: that's because you don't do it with filter complex.
[20:36:21 CEST] <kepstin> what's your actual goal?
[20:36:30 CEST] <kepstin> then we can work forwards to the correct solution :)
[20:37:04 CEST] <kepstin> what do you currently have as a source? what would you like to have as an output?
[20:37:16 CEST] <Jnorthrup> converting prores to prores with deinterlace and pcm channels merged 4 into 1, and video t5rack before audio track for the sake of tradition
[20:37:33 CEST] <furq> -filter_complex "[0:1][0:2][0:3][0:4]amerge=inputs=4[out]" -map 0:v -map [out]
[20:38:04 CEST] <kepstin> Jnorthrup: what exactly do you mean by "pcm channels merged 4 into 1"
[20:38:08 CEST] <Jnorthrup> technically prores uses metadata in track 0
[20:38:20 CEST] <kepstin> would you like a mono audio track with the sound from 4 input channels?
[20:38:29 CEST] <kepstin> or a single 4-channel audio track, or ... ?
[20:38:34 CEST] <Jnorthrup> no 4 channels from 4 pcm sreams
[20:39:42 CEST] <kepstin> Jnorthrup: right, then your filter_complex is fine and you just need to add some -map stuff like furq said to set the stream order correctly
[20:41:01 CEST] <Jnorthrup> i have that syntax without the [out] but im almost groking it
[20:41:32 CEST] <kepstin> in order to use -map on the output of a filter graph, you need to give a label to the output stream. That's what that does.
[20:48:20 CEST] <Jnorthrup> furk your addition to the working amerge created 1 pcm per track in addition to the amerge.  im using -c copy prior
[20:48:53 CEST] <Jnorthrup> changing to -c:d copy does not fix the amerge chaos
[20:52:08 CEST] <kepstin> if you're using '-map', only the streams explicitly indicated with the -map will be included in the output file
[21:08:20 CEST] <Jnorthrup> i got it from your example.  -map v:? -map :s? -map [ao] -map :d?
[21:21:36 CEST] <Conder> hello, i have 1920x804 video and i want resize it to 720p. what exactly resolution i should use?
[21:23:04 CEST] <thebombzen_> Conder: you can use -vf scale=-1:720, which will resize the height to 720 and the width to whatever you use to keep the aspect ratio
[21:23:37 CEST] <thebombzen_> although, 1920x804 is like a widescreen 1920x1080, so you might want to resize it to use -vf scale=1280:-1, which will make the width 1280 and the height will be less than 720
[21:24:18 CEST] <Conder> yea, second option is better. thx
[21:24:58 CEST] <thebombzen_> some video formats don't like odd numbers, so you can use 1280:-2 if that's a problem
[21:25:36 CEST] <Conder> and one more question, if input have 2 audio streams and i use -c:a copy, it will copy both?
[21:29:14 CEST] <furq> Conder: you'd need -map 0:a as well
[21:29:20 CEST] <furq> or just -map 0
[21:30:35 CEST] <Conder> alright, ty
[21:35:27 CEST] <kepstin> Conder: note that 720p is nominally exactly 1280x720; so if you use scale=1280:-1, you might also have to pad the video to add black bars top and bottom if you need full 720p size
[21:36:16 CEST] <Conder> yes i know
[21:51:08 CEST] <Conder> hm, am i doing it correct? :D reencode video and copy all audio streams
[21:51:10 CEST] <Conder>  ffmpeg -i input.mkv -map 0 -vf scale=1280:-1 -c:v libx264 -crf 20 -preset medium output.mkv
[21:52:20 CEST] <kepstin> if you want to copy audio streams, add a -c:a copy
[21:52:31 CEST] <kepstin> otherwise it'll re-encode them (probably to vorbis, in an mkv file)
[21:52:55 CEST] <Conder> but then it copy only 1 audio stream, i want copy 2
[21:54:45 CEST] <c_14> -map 0:a
[21:55:15 CEST] <c_14> though you already have -map 0, so it should work
[21:59:31 CEST] <Conder> used this
[21:59:33 CEST] <Conder> ffmpeg -i input.mkv -map 0:a -vf scale=1280:-1 -c:v libx264 -crf 20 -preset medium output.mkv
[21:59:41 CEST] <c_14> that won't have video
[21:59:42 CEST] <Conder> and output has only audio streams reencoded to vorbis
[21:59:54 CEST] <c_14> -map 0 -c:a copy
[22:01:10 CEST] <Conder> ffmpeg -i input.mkv -map 0 -c:a copy -vf scale=1280:-1 -c:v libx264 -crf 20 -preset medium output.mkv
[22:01:17 CEST] <c_14> yes
[22:01:17 CEST] <Conder> right?
[22:01:21 CEST] <Conder> finally, thanks :D
[22:01:40 CEST] <c_14> you might want -2 instead of -1 though in the scale
[22:01:47 CEST] <c_14> just in case you want to use that on different input
[22:02:01 CEST] <c_14> (assuming your video is yuv420p)
[22:02:10 CEST] <c_14> That'll make sure the height is always divisible by 2
[22:02:39 CEST] <thebombzen_> also you might also want to set the audio bitrate
[22:02:57 CEST] <thebombzen_> the default for mkv is vorbis. you might want to use -c:a opus or set -b:a somehow
[22:03:06 CEST] <c_14> thebombzen_: he's using -c:a copy
[22:03:18 CEST] <thebombzen_> ah my bad
[22:26:33 CEST] <Bray90820> Is there a way to concatenate file with ffmpeg?
[22:28:04 CEST] <__jack__> yep, check out the doc
[22:28:16 CEST] <__jack__> like that one: https://trac.ffmpeg.org/wiki/Concatenate
[00:00:00 CEST] --- Thu Jul 14 2016



More information about the Ffmpeg-devel-irc mailing list