[Ffmpeg-devel-irc] ffmpeg.log.20161101
burek
burek021 at gmail.com
Wed Nov 2 03:05:01 EET 2016
[03:26:02 CET] <MrMonkey31> *pop!* hey guys. okay, so I'm trimming a video and the audio ignores the setpts thingamajig. how to fix?
[03:26:48 CET] <MrMonkey31> ie, I select a 3 min clip from somewhere in the middle of a video, and its audio ends up being the first 3 minutes of audio
[03:27:22 CET] <DHE> there's a distinct audio filter set and asetpts filter
[03:29:13 CET] <MrMonkey31> oh oh oh. geez, thanks. yesh it's now coming back to me!
[03:38:50 CET] <qmr> any hints on making movie from a bunch of jpgs? everything I try is failing
[03:53:50 CET] <MrMonkey31> dudes... maybe it's the dummy pills, but I can't figure out what I'm doing with atrim. it won't take arguments in frames (predictably I suppose). must I divide by the framerate of the video?
[03:54:17 CET] <MrMonkey31> I haD tried "INPUT -vn -c:a flac -af 'atrim=start=(4625/23.976):end=(8307/23.976),asetpts=PTS-STARTPTS' scene1-1.flac
[03:54:32 CET] <MrMonkey31> "
[04:09:41 CET] <MrMonkey31> well, it appears it just doesn't want to do arithmetic as given above which I'm really unhappy about. I will be back l8r to re-whine this
[04:11:28 CET] <MrMonkey31> qmr, have you seen this page? http://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
[04:12:00 CET] <qmr> no looking now thanks
[04:12:27 CET] <qmr> I know I tried the first command on that page from stack overflow and it did not work :(
[04:26:33 CET] <MrMonkey31> qmr, I just tested this line using a video file as source: ffmpeg -i in.mkv -vframes 280 -r 0.25 output_%02d.png && ffmpeg -i 'output_%02d.png' out.mkv
[04:26:53 CET] <MrMonkey31> that seems to do the trick
[04:27:53 CET] <MrMonkey31> if the 2nd half of that doesn't work for your images, then you might need to pre-process them somehow first
[05:10:27 CET] <madprops> hi
[05:10:52 CET] <madprops> im trying to convert an mp4 to swf with (ffmpeg -i uihuihu.mp4 mzb.swf) but im getting "ould not write header for output file #0 (incorrect codec parameters ?): Operation not permitted"
[06:58:27 CET] <t4nk842> Hi, I want to capture my screen with both StereoMix and microphone together, but I don't know how ! I use this but it doesn't work http://pastebin.com/ap4DqDam
[07:27:05 CET] <fling> How do I add an mkv thumbnail properly?
[07:28:50 CET] <fling> t4nk842: you might want to use multiple per input ffmpeg instances encoding to pipes and one ffmpeg reading from the pipes with big buffer and muxing all the streams together.
[07:29:21 CET] <fling> t4nk842: this was the only way I was able to keep multiple video and audio streams in sync kindof
[07:29:24 CET] <fling> But not reall!
[07:29:27 CET] <fling> y
[07:47:55 CET] <t4nk842> thank you guys i find the solution : just add a -filter_complex amix and that's it
[10:52:45 CET] <fling> How do I encode a thumbnail into a mkv stream?
[10:53:01 CET] <JEEB> is there a standard way of doing that :P
[10:53:22 CET] <DHE> you want to make a single image into a one-frame mkv ?
[10:53:44 CET] <JEEB> well depends on what is meant with "thumbnail"
[10:53:57 CET] <JEEB> it could be a thumbnail of a video stream in that file
[10:54:01 CET] <JEEB> in which case I have NFI
[10:54:28 CET] <JEEB> I know that some people make single-frame video stream and then the audio track with the content
[10:54:38 CET] <JEEB> *single-frame video streams
[10:54:49 CET] <furq> does ffmpeg even support thumbnails in m4a
[10:54:57 CET] <furq> i ended up using mp4box for that last time i needed it
[10:55:00 CET] <JEEB> is there a standard way of doing that?
[10:55:05 CET] <furq> no idea
[10:55:08 CET] <JEEB> mp4box is known to do random things that some random things support
[10:55:20 CET] <fling> DHE: JEEB: There I have a bunch of MP4 files and a single THM file. I'm about to merge them all into mkv and to reencode video strean to x265
[10:56:20 CET] <fling> I recently used ffmpeg to put coverart into a music file. Not sure how to proceed with a thumbnail placement in a mkv :P
[10:58:01 CET] <furq> JEEB: http://vpaste.net/lL1A6
[10:58:05 CET] <furq> it works in fb2k if nothing else
[10:58:57 CET] <furq> but yeah i'm not sure why you'd put a thumbnail image in a video file
[10:59:10 CET] <fling> JPEG image data, Exif standard: [TIFF image data, big-endian &&& frames 3
[10:59:17 CET] <fling> Looks like there are three frames in the thumbnail ^
[11:00:10 CET] <furq> probably different resolutions
[11:03:29 CET] <furq> you can attach images in mkvtoolnix but i doubt it'll do anything useful
[11:04:16 CET] <ritsuka> do you want a single cover art of a video stream that changes over time?
[11:04:29 CET] <furq> i'm guessing he wants a thumbnail image that displays in file browsers
[11:04:38 CET] <fling> ritsuka: no, I want to merge a video thumbnail into a mkv file :P
[11:04:55 CET] <ritsuka> what is exactly a video thumbnail?
[11:05:02 CET] <ritsuka> a single image?
[11:05:34 CET] <fling> ritsuka: a tiff file
[11:05:50 CET] <fling> ritsuka: thumbnail.thm with three frames in it
[11:05:56 CET] <ritsuka> ok, let's call it a cover art
[11:06:08 CET] <fling> But it is not.
[11:07:29 CET] <furq> i guess we'll never know
[11:07:38 CET] <ritsuka> see http://stackoverflow.com/questions/34137442/tagging-mkv-files-with-cover-images
[11:08:02 CET] <fling> I'm pretty sure it is not a coverart.
[11:08:37 CET] <ritsuka> well, it's an image you want to see in explorer, same thing
[11:08:58 CET] <fling> Ok, thanks I will try this.
[11:14:57 CET] <fling> How to also keep all the metadata?
[11:15:17 CET] <furq> -map_metadata 0
[11:15:29 CET] <furq> i'm not sure how that'll work with concat though
[11:15:30 CET] <fling> furq: after every input?
[11:15:54 CET] <furq> no
[11:15:58 CET] <furq> 0 refers to the input file
[11:16:23 CET] <furq> -map_metadata 0 -map_metadata 2 will get you the metadata from inputs 0 and 2
[11:16:39 CET] <furq> like i said, i have no idea how that'll work with concat
[11:29:29 CET] <fling> I'm receiving a lot of Past duration 0.999992 too large messages
[12:05:53 CET] <Nihonjin> Hello everyone
[12:06:20 CET] <Nihonjin> is this issue of ffmpeg or Xorg or intel driver?
[12:06:22 CET] <Nihonjin> I using ffmpeg to video cast on my laptpo. my laptop have only VGA it is Intel HD 4000. when I use uxa AccelMethod in 20-intel.conf , Xorg cpu usage very very high 95% and don't have any issue on output ffmpeg but i can't do anything to my laptop. if i use SNA AccelMethod Xorg cpu usage is nornal 12% but in ffmpeg output i have tearing. now I don't know this issue is for intel driver or Xorg or this is a bug or other somthing
[12:07:37 CET] <fling> furq: thanks! Looks like the mkvmerge does the same thing attaching the thumbnail
[12:07:59 CET] <fling> I put the 'thumbnail' description into metadata of the stream
[12:08:21 CET] <fling> Btw looks like map_metadata is not copying inything >
[12:08:33 CET] <fling> But there is not much to copy. I set the timestamp manually anyway
[12:18:44 CET] <fling> I'm using crf=28 with libx265. With ultrafast preset I'm getting 1.3M output but with medium preset it is 2.4M! Why?
[12:18:54 CET] Action: fling is now trying veryslow
[12:20:37 CET] <fling> Whoops it is way too slow, 1.3fps, will not wait so long
[12:21:11 CET] <furq> at least with x264 it's normal to get higher bitrates with a slower preset
[12:21:18 CET] <furq> although probably not that much higher
[12:21:31 CET] <fling> I always thought it should be lower!
[12:21:38 CET] <furq> you'll get higher quality at the same crf value with a slower preset
[12:21:51 CET] <fling> crf sets the picture quality but the preset sets the filesize!
[12:22:01 CET] <fling> furq: how? why? :D
[12:22:24 CET] <furq> the picture quality determines the filesize
[12:22:31 CET] <fling> No.
[12:22:37 CET] <furq> at least with x264 you should get roughly the same filesize with any preset
[12:22:47 CET] <fling> Omg!
[12:23:24 CET] <fling> What is the point of crf then? :D
[12:23:35 CET] <furq> it determines the filesize
[12:24:47 CET] <furq> in my experience that's true of everything between medium and veryslow
[12:24:51 CET] <TAFB2> i always use "ultraslow" and minimum of crf 16 for any not live stuff.
[12:24:53 CET] <furq> i've barely touched anything else
[12:25:01 CET] <TAFB2> veryslow, sorry :D
[12:25:11 CET] <furq> all bets are off with ultrafast
[12:25:46 CET] <TAFB2> ultrafast is only good for crf 0 :)
[12:25:56 CET] <furq> i normally use slower at crf 19-21
[12:26:01 CET] <furq> 21 for hd sources
[12:26:21 CET] <TAFB2> nice nice. how many threads?
[12:26:27 CET] <furq> the default
[12:26:28 CET] <TAFB2> I've heard you can get better quality with a single thread
[12:26:30 CET] <furq> which i guess is 12
[12:26:49 CET] <furq> are you sure that's not referring to slice threading
[12:26:51 CET] <TAFB2> nice. I was compressing stuff with 24 and noticed a bit of quality reduction (nice and fast though)
[12:27:01 CET] <furq> i don't think frame threading incurs any quality loss
[12:28:30 CET] <TAFB2> if you run the same ffmpeg command twice (on say the same 2 hour 4k movie down convert to 1080p), should the resulting files be identical?
[12:28:43 CET] <furq> depends on the encoder and the muxer
[12:29:10 CET] <TAFB2> x264, mp4
[12:29:15 CET] <furq> with x264 it depends on the options set
[12:29:22 CET] <TAFB2> same command
[12:29:24 CET] <furq> https://mailman.videolan.org/pipermail/x264-devel/2015-April/011035.html
[12:30:00 CET] <TAFB2> ahhh. so my differing files with 24 threads might not be a quality loss, just different :D
[12:30:13 CET] <furq> it should be deterministic unless the vbv is enabled
[12:30:14 CET] <TAFB2> looked a little worse to me I swear though, and file size was slightly bigger.
[12:31:16 CET] <TAFB2> good to know. it was a while ago. I'll give my 24 core monster another go and see how she does.
[12:31:30 CET] <fling> furq: crf 21 for x265?
[12:31:34 CET] <furq> x264
[12:31:45 CET] <furq> TAFB2: you should be using 36 threads with 24 cores
[12:31:51 CET] <furq> it'll default to that anyway
[12:31:55 CET] <fling> furq: What do you use for x265?
[12:32:01 CET] <furq> i don't use x265
[12:32:07 CET] <fling> Why?
[12:32:31 CET] <furq> too slow, poor support
[12:32:53 CET] <furq> and the poor support is partly because of the insane licensing
[12:33:04 CET] <furq> which means there's a good chance it'll never be well supported
[12:33:14 CET] <TAFB2> i uploaded some stuff in x265, omg the complaints :(
[12:33:27 CET] <furq> also ffmpeg's x265 decoder is incredibly slow
[12:33:30 CET] <furq> s/x/h/
[12:33:51 CET] <furq> which means mpv's decoder is equally bad
[12:34:51 CET] <fling> x264 is producing nine times bigger file at the same crf 21 :<
[12:35:02 CET] <furq> the crf values don't map between the two
[12:35:38 CET] <nonex86> i used nvidia h265 encoder from ffmpeg, it was pretty fast
[12:36:29 CET] <fling> nonex86: how good is the quality?
[12:38:07 CET] <furq> TAFB2: that non-deterministic output might be down to swscale actually
[12:38:22 CET] <fling> looks like I'm getting 'Past duration 0.999992 too large' because of the three-frame metadata stream
[12:38:29 CET] <fling> How to hide these messages? ^
[12:38:39 CET] <furq> -v error
[12:38:57 CET] <fling> But I want to see other warnings :P
[12:40:06 CET] <TAFB2> furq: yeah, looks like it. running some tests now, using 36 threads with 24 cores my media computer turned off, haven't encoded on it in a while, gotta blow the dust outa the fans I think :D
[12:41:03 CET] <nonex86> fling: honestly speaking it was just a test run, so i dont bothered about result
[12:42:14 CET] <nonex86> fling: i take h264 video and convert it to h265 without specifying any parameters
[13:32:02 CET] <m_o_d> hi,
[13:35:13 CET] <m_o_d> i want to do screen capture on linux desktop, i was using vokoscreen for fronted but yesterday it stoped working. From what i know vokoscreen use ffmpeg with command line: /usr/bin/ffmpeg -report -f x11grab -framerate 25 -video_size 3198x1798 -i :0+0,0 -f alsa -i pulse -pix_fmt yuv420p -c:v mpeg4 -c:a libmp3lame -q:v 1 -s 3200x1800 output.mkv
[13:36:47 CET] <DHE> conceptually that works. -q:v will produce a very high bitrate, and stretching for 2 pixels is a lot of cpu expended for fairly minimal benefit
[13:37:19 CET] <furq> eww, mpeg4
[13:37:26 CET] <DHE> that too
[13:37:41 CET] <furq> does mpeg4 support mod2 dimensions
[13:37:48 CET] <furq> i vaguely remember it needing mod16 but it's been a while
[13:38:06 CET] <DHE> I know for a fact h264 is fine with any non-odd dimensions (though 16x16 is optimal)
[13:38:13 CET] <furq> actually 1800 isn't mod16 is it
[13:38:17 CET] <DHE> no it isn't
[13:38:25 CET] <DHE> neither is 1080 actually
[13:40:02 CET] <m_o_d> when i run command i see that ffmpeg record between 3-15 frames, the rest is droped. Output from ffmpeg: frame= 13 fps=1.3 q=-1.0 Lsize= 127kB time=00:00:00.40 bitrate=2605.6kbits/s dup=0 drop=263 speed=0.039x
[13:40:28 CET] <DHE> you're most likely bottlenecked on CPU. that's fairly easy to check
[13:40:49 CET] <DHE> in all seriousness, try codec libx264 with -preset:v veryfast
[13:41:05 CET] <furq> yeah x264 should be both faster and better
[13:41:10 CET] <furq> and more widely compatible
[13:41:59 CET] <m_o_d> i have used ultrafast like: ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264 -qp 0 -preset ultrafast capture.mkv without any difference
[13:44:12 CET] <m_o_d> for command with -video_size 1920x1080 i changed resolution of desktop to FHD
[14:10:16 CET] <fling> What should I put as NAME and DESCRIPTION metadata tags of a thumbnail stream in a mkv file?
[14:11:56 CET] <fling> Also what does 'none' mean in "Stream #0:2: Attachment: none" ?
[14:36:29 CET] <relaxed> m_o_d: the input framerate is likeyly 60 fps
[14:36:38 CET] <relaxed> likely*
[14:48:59 CET] <m_o_d> relaxed, i used: ffmpeg -video_size 3198x1798 -framerate 60 -f x11grab -i :0.0 -c:v libx264 -qp 0 -preset ultrafast capture.mkv and the output frame= 2 fps=0.1 q=-1.0 Lsize= 2212kB time=00:00:00.01 bitrate=1006639.6kbits/s dup=0 drop=343 speed=0.0012x
[14:54:32 CET] <furq> that's 125MB/s
[14:54:35 CET] <furq> is your disk keeping up
[14:57:13 CET] <furq> m_o_d: replace `capture.mkv` with `-f null -`
[14:57:25 CET] <furq> if that runs at full speed then your disk is probably the culprit
[14:59:49 CET] <m_o_d> furq, http://pastebin.com/6d4kSRrH
[15:05:54 CET] <fling> m_o_d: atop will tell you what is actually your bottleneck
[15:06:12 CET] <fling> m_o_d: also try huffyuv instead of x264&
[15:10:01 CET] <m_o_d> to me the problem is not in the hardware because it worked before yesterday
[17:13:52 CET] <madprops> how can i control the bitrate when converting from mp4 to swf? -v:b or -b:v or -q:v have no effect
[17:14:16 CET] <madprops> oh wait i think they do
[17:15:24 CET] <BtbN> do you meán flvß
[17:40:37 CET] <[-T-]> hey
[19:06:26 CET] <ciawal> Im struggling to find a way to overlay an image onto only the last frame of an input video
[19:06:26 CET] <ciawal> I have it working fine for frame 0, but it seems theres no constant for the frame count in ffmpeg, so I have to read the frame count first with ffprobe and then do the processing but the frame count I read is not the same as what ffmpeg is using
[19:17:05 CET] <deweydb> llogan: deweydb: an appropriate scaling algorithm is probably more important. but why upscale?
[19:17:18 CET] <deweydb> because it gets scaled up on youtube anyway.
[19:17:59 CET] <deweydb> for example, if a user gives me a 240p video, it gets played back as 480p by default video player size on youtube
[19:18:19 CET] <svenxy> what does ":v" mean in this input: [0:v]pad=iw*2:ih*2[a]; ref https://trac.ffmpeg.org/wiki/FilteringGuide#multipleinputoverlayin2x2grid
[19:18:23 CET] <deweydb> but i am also adding some sections to the video, a motion graphic, etc. these i have better sources for
[19:18:27 CET] <DHE> depends on what you're doing. I've upscaled 576p to 720p because otherwise youtube only produces 480p
[19:18:38 CET] <DHE> svenxy: 0:v is the video stream of file 0
[19:18:47 CET] <deweydb> so i would prefer to scale the one low quality part of the video myself, so that not ALL of the video is scaled by youtube.
[19:18:58 CET] <svenxy> DHE: ah, so there's an corresponding :a, then?
[19:19:05 CET] <llogan> deweydb: see "flags" option in scale filter.
[19:19:15 CET] <deweydb> thanks
[19:19:21 CET] <DHE> svenxy: yes, assuming the video has an audio track
[19:19:28 CET] <svenxy> DHE: ok, thanks.
[19:19:55 CET] Action: DHE is pedantic a lot. :)
[19:21:06 CET] <llogan> svenxy: that guide is outdated. vstack and hstack is easier than pad+overlays
[19:22:06 CET] <svenxy> llogan: ok, i was just wondering about the input syntax, though; it wasn't explained anywhere that i could find
[19:22:15 CET] <DHE> ah, I remember the good old days of writing C to stack my videos' RGB32 output manually.
[19:22:37 CET] <DHE> svenxy: https://ffmpeg.org/ffmpeg-filters.html#hstack
[19:22:59 CET] <DHE> that whole page is extensive (and very long) documentation on filters. see the top for how to use filter_complex, etc
[19:24:04 CET] <svenxy> right, but it doesn't actually mention the :v and :a options, as far as i can see. but now i know :)
[19:24:56 CET] <DHE> fair enough. it's used in the examples but not explained
[19:26:28 CET] <svenxy> i've been wondering about the tblend filter: "[it] takes two consecutive frames from one single stream, and outputs the result obtained by blending [them]"
[19:26:39 CET] <svenxy> when a filter "takes" a frame, does it actually move the "current frame offset"?
[19:27:24 CET] <DHE> yes, it should cut the framerate in half
[19:27:41 CET] <DHE> if the video contained a timer, said timer would still be accurate
[19:27:47 CET] <svenxy> okay
[19:28:11 CET] <svenxy> after a filter has "taken" a frame, can i "rewind" the current frame offset somehow, so that the next filter would take the same frame?
[19:28:29 CET] <DHE> use `split` if you need two filters to see the same frame
[19:28:40 CET] <svenxy> aha, that makes sense
[19:28:52 CET] <DHE> or if said frame comes straight straight frmo the source you can just specify 0:v multiple times
[19:29:09 CET] <svenxy> so there's a per-input frame offset, not a global one that applies to all inputs
[19:30:36 CET] <DHE> frames have a timestamp on them. if it's 30fps material then each timestamp increases by about 0.033s each frame
[19:30:47 CET] <DHE> there's a setfps filter to rewrite timestamps if you're getting really tricky
[20:47:50 CET] <svenxy> ah, loving these motion blur examples: http://nico-lab.net/motion_blur_with_ffmpeg/ -- just what i was looking for
[21:41:08 CET] <zeryx> holy shit there's motion blur
[21:41:14 CET] <zeryx> thats..actually potentially incredibly useful for me
[21:41:20 CET] <zeryx> thanks for linking that svenxy
[21:43:27 CET] <BtbN> that looks horribly slow
[21:49:51 CET] <svenxy> the first approach is pretty fast and nice. it flickers on scene changes, though.
[21:50:18 CET] <svenxy> they also have an example using the minterpolate alternative: http://nico-lab.net/minterpolate_with_ffmpeg/ (minterpolate is only available since v3.2)
[00:00:00 CET] --- Wed Nov 2 2016
More information about the Ffmpeg-devel-irc
mailing list