[Ffmpeg-devel-irc] ffmpeg.log.20180616
burek
burek021 at gmail.com
Sun Jun 17 03:05:01 EEST 2018
[00:00:20 CEST] <GuiToris> nicolas17, https://ptpb.pw/OQKw
[00:01:03 CEST] <nicolas17> oh bah
[00:01:17 CEST] <nicolas17> I think you need rotate=1.5*PI/180:ow=rotw(1.5*PI/180):oh=roth(1.5*PI/180)
[00:01:57 CEST] <nicolas17> but now I'm not sure if that will fix your problem :P
[00:02:31 CEST] <nicolas17> it might be the opposite of what you want, making the output video larger so that the whole input video is visible, but showing more black borders
[00:03:25 CEST] Action: nicolas17 experiments
[00:04:14 CEST] <GuiToris> yes I still have borders
[00:04:39 CEST] <GuiToris> and it got rotated clockwise
[00:04:53 CEST] <nicolas17> a negative sign fixes the clockwise part
[00:05:05 CEST] <nicolas17> let me figure out the math for the video size...
[00:05:08 CEST] <GuiToris> rotate=-1.5*PI/180
[00:05:21 CEST] <Pandela> Are there any workarounds for ffplay staying fullscreen on a second monitor? I'm on Ubuntu 16.04, other applications stay fullscreen just fine
[00:05:59 CEST] <Pandela> but anytime I focus on another window in my laptop screen ffplay goes in the background
[00:09:18 CEST] <furq> just don't use ffplay in general
[00:10:27 CEST] <Pandela> lmao
[00:10:37 CEST] <Pandela> but I Fucken love ffplay
[00:10:52 CEST] <furq> it's really not intended for anything other than debugging
[00:11:01 CEST] <furq> use mpv if you want something lightweight that uses the ffmpeg libs
[00:11:07 CEST] <Pandela> I abuse the hell out of it
[00:11:19 CEST] <furq> --fullscreen and --fs-screen=[screen] should do what you want
[00:11:28 CEST] <Pandela> is mpv have as little latency as ffplay does when you pipe data in?
[00:11:40 CEST] <furq> i'm sure you can make it
[00:12:39 CEST] <GuiToris> nicolas17, isn't cropdetect what I'm looking for?
[00:13:04 CEST] <Pandela> huh alright, will def give it a go. I just love ffplay because of how fast it decodes, I can apply filters to webcam input to see whatthe filters do in realtime, I abuse the decoders to intererept the wrong data, etc
[00:13:25 CEST] <furq> just tried it with --no-cache and it's about half a second behind
[00:13:31 CEST] <furq> you can probably tweak it further
[00:14:23 CEST] <Pandela> that's not bad :0 I'll give it a shot. I really need complete realtime for what I'm doing though
[00:14:34 CEST] <furq> i'd be surprised if you could get that with ffplay
[00:14:50 CEST] <furq> last time i looked into it ffplay was about the same latency
[00:14:55 CEST] <furq> but then i didn't try that hard
[00:15:09 CEST] <Pandela> I get full realtime in ffplay all the time without issue
[00:15:19 CEST] <Pandela> usually at 640x360 resolution
[00:15:22 CEST] <furq> piping from ffmpeg?
[00:15:33 CEST] <Pandela> yessir
[00:15:37 CEST] <furq> fun
[00:16:03 CEST] <YokoBR> hi folks
[00:16:23 CEST] <YokoBR> please, how do I export some file with ffmpy3 to mp4, but without writing the file extension?
[00:16:29 CEST] <YokoBR> like .mp4
[00:16:34 CEST] <furq> -f mp4
[00:16:44 CEST] <Pandela> ^
[00:17:09 CEST] <GuiToris> nicolas17, hmm, it didn't crop the video automatically
[00:17:18 CEST] <GuiToris> the negative value is great
[00:17:39 CEST] <nicolas17> GuiToris: it doesn't, it just tells you what size to use; and it seems to be for when the video has rectangular (not rotated) black borders
[00:17:49 CEST] <GuiToris> [Parsed_cropdetect_2 @ 0x563e45f75540] x1:0 x2:1919 y1:0 y2:1079 w:1920 h:1072 x:0 y:4 pts:482400 t:2.680000 crop=1920:1072:0:4
[00:18:29 CEST] <furq> yeah if your video is already rotated then you'll probably need to work it out yourself
[00:18:33 CEST] <furq> or ask cropdetect
[00:18:48 CEST] <nicolas17> this is just trigonometry
[00:19:02 CEST] <furq> it's not even that complicated is it
[00:19:08 CEST] <furq> it's just knowing what size the video was supposed to be
[00:19:12 CEST] <GuiToris> I guess I need to zoom a little bit to avoid borders
[00:19:19 CEST] <nicolas17> if a rectangular video is rotated by a° then how much do you need to crop it to avoid seeing the borders
[00:23:51 CEST] <nicolas17> ok, looks like there are multiple possible crop rectangles so an extra constraint is needed
[00:23:57 CEST] <nicolas17> maximize area? keep aspect ratio?
[00:27:10 CEST] <GuiToris> ahh, if it's that complicated I'd be better off using a graphical video editing software :(
[00:27:50 CEST] <nicolas17> well you can always do trial and error, scale by 1% and crop to original size and see if that takes the borders away
[00:27:50 CEST] <GuiToris> I hoped my computer can handle the ugly math
[00:28:06 CEST] <nicolas17> if it doesn't then try 2% :)
[00:28:52 CEST] <GuiToris> I'll give it a try
[00:30:36 CEST] <GuiToris> are you sure I can scale it by percents?
[00:31:49 CEST] <GuiToris> I'll try guessing
[00:31:49 CEST] <nicolas17> scale=iw*1.01:ih*1.01 is 1% bigger
[00:42:36 CEST] <GuiToris> finally, the borders are gone
[00:43:02 CEST] <GuiToris> it wasn't that easy, as I scaled the video the borders got bigger and bigger too
[00:44:17 CEST] <GuiToris> thank you for your help and patience
[00:47:10 CEST] <GuiToris> see you later :)
[05:03:15 CEST] <truedread> hi everyone, i'm trying to decode some hevc video to a raw yuv but i'm having some issues
[05:03:17 CEST] <truedread> here's the output
[05:03:18 CEST] <truedread> https://pastebin.com/raw/2DjeR9vX
[05:03:36 CEST] <truedread> i'm trying to utilize hw hevc decoding on my kabylake cpu
[05:03:41 CEST] <truedread> this is on a windows laptop with no dedicated gpu
[05:03:56 CEST] <truedread> if anyone could help it would be much appreciated
[05:24:12 CEST] <Cracki> try -f something
[05:24:30 CEST] <Cracki> not sure if ffmpeg understands what you mean when you just give it "something.yuv"
[05:24:44 CEST] <Cracki> also you should increase verbosity
[05:43:14 CEST] <truedread> Cracki, Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> rawvideo (native))
[05:43:15 CEST] <truedread> it knows
[05:43:28 CEST] <truedread> no different if i do -c:v rawvideo
[05:44:20 CEST] <truedread> Cracki, here's with -v debug
[05:44:20 CEST] <truedread> https://pastebin.com/raw/z7Y0Qd85
[06:32:46 CEST] <nico_> Hi guys! I would like to convert mpeg2 to mp4 files. It's for a job, but the mpeg2 files are captured from VHS video with EasierCap. As they are captured from VHS, the quality is not great, but nevertheless I do not want to give a product with very low qualilty. Which parameters should I use in ffmpeg to make this conversion? If you can give me the full command I would be very grateful! I am trying to develop some bash scripts with the
[06:49:39 CEST] <fengshaun> I'm trying to have ffmpeg generate a segment list using the segment muxer in m3u8 format from an mp4 file. However, I don't want an output file or the segments themselves, just the m3u8 playlist. Additionally, I want to have the m3u8 in v4 format with byteranges (which hls muxer does, but segment muxer doesn't). How can I achieve that?
[06:51:00 CEST] <fengshaun> it seems both muxers really want to output the generated segments in addition to the playlist
[06:51:22 CEST] <fengshaun> and segment muxer doesn't seem to support v4
[07:19:56 CEST] <fengshaun> hmm nvm, I guess the muxer does some stuff that's needed in order to match it with the m3u8 playlist
[12:17:09 CEST] <_Strix_> hi
[12:17:24 CEST] <_Strix_> Guys, need some help here.
[12:18:02 CEST] <_Strix_> Can someone give me some guidance on how to install ffmpeg-php on CentOS 7.1
[13:00:50 CEST] <JEEB> _Strix_: that is not an FFmpeg project and thus you should find the people developing that thing
[13:44:23 CEST] <Shibe> HI, I was wondering how I can compile this simple code? https://gist.github.com/2bf4664496a0032e6350142a775a504e
[13:44:24 CEST] <Shibe> primecorder.c:(.text+0x40): undefined reference to `av_hwdevice_ctx_alloc'
[13:44:36 CEST] <Shibe> seems like i'm not giving it the right linker options or i don't have a certain library installed?
[13:46:26 CEST] <JEEB> use pkg-config to get the right flags
[13:47:19 CEST] <JEEB> pkg-config --libs libavutil or libavcodec or so (don't remember if the libs' names had the "lib" prefix)
[13:48:09 CEST] <JEEB> if you have a custom prefix, use PKG_CONFIG_PATH to append your custom prefix/lib/pkgconfig to the search path
[14:08:01 CEST] <JEEB> Shibe: instead of randomly spamming random channels maybe actually see if anyone replied to you?
[14:09:47 CEST] <Shibe> JEEB: got it, thanks!
[17:40:25 CEST] <Yukkuri> hi, how do i control bitrate? i specify -b:v 128k -maxrate 128k -bufsize 128k -b:a 20k and still at some places bitrate goes crazy up to 180k instead of should-be-possible 148k.
[17:40:43 CEST] <Yukkuri> which flags am i missing?
[17:41:25 CEST] <Yukkuri> isn't maxrate should mean maximum tolerance?
[17:41:48 CEST] <Yukkuri> clearly something is going out of tolerated constraints
[17:58:08 CEST] <furq> Yukkuri: what encoder is that
[18:02:08 CEST] <Yukkuri> furq: -c:v libvpx-vp9 -c:a libopus -f webm
[18:03:14 CEST] <Yukkuri> i'm okay both with webm and mp4 and practically any HTML5-supported codec, but i need not file size to exceed 3mb at 2:37 length
[18:03:31 CEST] <furq> x264 generally has better ratecontrol, so maybe try that
[18:03:33 CEST] <Yukkuri> so something about 150k is very close to my limit, considering container headers
[18:03:54 CEST] <Yukkuri> furq: okay, thanks
[18:04:39 CEST] <Yukkuri> in the mean time i also found that VBV with two-pass encodings may yield better results at rate-control
[18:04:56 CEST] <Yukkuri> as explained in https://slhck.info/video/2017/03/01/rate-control.html
[18:05:29 CEST] <furq> that's true for both codecs, yeah
[18:05:31 CEST] <Yukkuri> furq: another aspect: which of VP9 and x264 do have better compression ratio with the same mean image quality?
[18:05:40 CEST] <furq> probably vp9
[18:06:01 CEST] <furq> not sure how well it performs at super low bitrates, but that's generally where newer generation codecs make big gains
[18:06:27 CEST] <Yukkuri> guess i'll have to stick with two-pass VP9 then, as at this rate, image quality already suffers greatly at some scenes
[18:06:45 CEST] <furq> https://trac.ffmpeg.org/wiki/Encode/VP9#speed
[18:06:55 CEST] <Yukkuri> also, is three a way to control scene change detection threshold when inserting keyframes?
[18:07:07 CEST] <furq> you'll probably want -deadline best -cpu-used 0
[18:07:27 CEST] <furq> i don't know if libvpx has anything like that
[18:07:29 CEST] <Yukkuri> i am already using -keyint_min 0, but at some sharp scene changes still have less keyframes then wanted to
[18:07:46 CEST] <Yukkuri> ow, this is codec-specific.
[18:07:50 CEST] <furq> yeah
[18:08:20 CEST] <Yukkuri> so i can't say have crazy stream where every frame is a keyframe or insert keyframe at my whim.
[18:08:20 CEST] <furq> you'll also want to disable multithreading if you want to squeeze every last bit of efficiency out
[18:08:27 CEST] <furq> although i think it's disabled by default for vpx
[18:09:14 CEST] <furq> Yukkuri: there is -force_key_frames but that just takes a list of frame numbers
[18:09:20 CEST] <furq> if you want to tune scenecut then that's codec-specific afaik
[18:09:50 CEST] <Yukkuri> but i can detect frames with scenecut -vf and then feed it to -force_key_frames, yes?
[18:09:57 CEST] <furq> probably
[18:10:39 CEST] <Yukkuri> i would also gain control over threshold at this point, so it worth to try
[18:10:41 CEST] <Yukkuri> thank you
[19:13:21 CEST] <Yukkuri> also, does ffmpeg supports any form of lists or arrays, to simplify expresions like this one:
[19:13:34 CEST] <Yukkuri> force_key_frames "expr:if(lte(n_forced,0),gte(t-1/60,2.067),if(lte(n_forced,1),gte(t-1/60,5.317),if(lte(n_forced,2),gte(t-1/60,7.134),0)))"
[19:14:39 CEST] <Yukkuri> it forces three keyframes at frames with timestamps directly preceeding times of 2.067, 5.317 and 7.134 seconds
[19:15:10 CEST] <Yukkuri> a bit of recursive if/then/else, uggly tjing
[19:15:12 CEST] <Yukkuri> thing*
[19:16:42 CEST] <Yukkuri> generated with
[19:16:43 CEST] <Yukkuri> -vf "select=gt(scene\,0.4),showinfo" -f null - 2>&1 | grep -Po 'pts_time:\K[0-9.]*' | awk 'function decent(i){if (i>=NR) { return "0"; } else { return "if(lte(n_forced,"i"),gte(t-1/60,"arr[i]"),"decent(i+1)")"; }}{arr[NR-1]=$1}END{print decent(0)}'
[19:17:11 CEST] <Yukkuri> 1/60 is input file framerate, btw
[19:19:04 CEST] <Yukkuri> the whole subtraction thing is needed because by default, ffmpeg chooses next frame to be keyframe and not previous, which results in imperfect keyframes
[19:19:49 CEST] <Yukkuri> ow, i was wrong when was thinking of direction. it is actually inverse, obviously.
[19:20:27 CEST] <Yukkuri> still, the problem is here -- i need frame-wide shifts from timestamps that showinfo displays
[19:21:55 CEST] <Yukkuri> with some kind of list or array, it would be a simple lookup table
[19:53:33 CEST] <slavanap> Hi! How to get audio quality loss stats after conversion from wav to lossy format?
[19:54:03 CEST] <furq> there isn't really any such thing
[19:54:06 CEST] <slavanap> With libopus & libvorbis
[19:54:30 CEST] <slavanap> I want to compare PSNR or something of output vs. original
[19:59:16 CEST] <slavanap> Does `-psnr` flag only work for video transcoding?
[19:59:40 CEST] <furq> yeah
[19:59:56 CEST] <furq> psnr is a pretty useless metric for most audio codecs though
[20:52:14 CEST] <fengshaun> I'm getting a lot of deprecation warnings when following dranger's tutorial, but the doxygen docs don't provide any alternative to deprecated functions
[20:52:23 CEST] <fengshaun> avcodec_decode_video2 is one such example
[20:52:32 CEST] <fengshaun> along with av_packet_free being another
[20:52:39 CEST] <fengshaun> how do I go about finding the alternatives in the docs
[21:01:19 CEST] <BtbN> apichanges.
[21:01:25 CEST] <BtbN> and in the doc of each function in question
[21:18:19 CEST] <fengshaun> thanks
[21:18:30 CEST] <fengshaun> the doxygen docs don't mention anything :S
[21:18:39 CEST] <fengshaun> where are apichanges?
[21:23:30 CEST] <BtbN> they do, and point you directly to the replacement.
[21:23:46 CEST] <BtbN> https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga3ac51525b7ad8bca4ced9f3446e96532
[21:23:50 CEST] <BtbN> Deprecated:
[21:23:50 CEST] <BtbN> Use avcodec_send_packet() and avcodec_receive_frame().
[21:25:43 CEST] <fengshaun> oh, thanks
[22:02:18 CEST] <slavanap> furq, jgyi https://gist.github.com/slavanap/70dd6c898877127d4e09668c9a6488f3
[22:02:22 CEST] <slavanap> *jfyi
[22:02:56 CEST] <slavanap> looks like PSNR of libvorbis is way better than libopus.
[22:03:08 CEST] <slavanap> 55dB is 22dB
[22:06:01 CEST] <BtbN> I highly doubt that
[22:07:31 CEST] <atomnuker> I believe that
[22:07:46 CEST] <atomnuker> psnr is rubbish for measuring anything, especially audio
[22:09:01 CEST] <furq> i feel like i already mentioned this
[22:09:42 CEST] <furq> you want something like PEAQ for audio, although i couldn't tell you how reliable it is
[22:09:46 CEST] <furq> for lossy audio, that is
[23:14:27 CEST] <fengshaun> just to confirm whether I understand time_base correctly. pts and dts are in factors of time_base, so to get seconds, I need to pts * time_base (in double). time_base itself is represented by an AVRational to prevent losing precision, which can be used as double using av_q2d(AVRational) or just .num/.den
[23:14:33 CEST] <fengshaun> it seems to work just right
[23:14:57 CEST] <fengshaun> and I can seek in increments of how many seconds I want just by converting from pts to seconds and back
[23:15:18 CEST] <fengshaun> and av_seek_frame seems to find the closest keyframe appropriately
[23:16:14 CEST] <JEEB> time_base is basically ticks per second, and then pts/dts are the ticks for each packet/frame
[23:21:07 CEST] <fengshaun> JEEB, oh, that's so simple!
[23:21:27 CEST] <fengshaun> thanks
[23:21:31 CEST] <fengshaun> this is exciting
[23:21:48 CEST] <JEEB> like time_base=1/90000 and pts=90000 is 1s
[23:55:30 CEST] <faLUCE> hello. How can I increase the volume of myfile.mp3 without re-encoding it? thanks
[23:57:26 CEST] <furq> replaygain tag or mp3gain
[23:58:05 CEST] <faLUCE> furq: are there part of ffmpeg ?
[23:58:09 CEST] <furq> not to my knowledge
[23:58:44 CEST] <furq> you could probably write a bsf for it but nobody has
[23:59:17 CEST] <furq> for mp3gain, i mean
[23:59:24 CEST] <furq> there is some support for reading replaygain tags but not for writing them iirc
[23:59:25 CEST] <faLUCE> I see
[23:59:33 CEST] <furq> but mp3gain is the better way of doing it
[23:59:59 CEST] <faLUCE> furq: mp3gain is not for linux
[00:00:00 CEST] --- Sun Jun 17 2018
More information about the Ffmpeg-devel-irc
mailing list