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

burek burek021 at gmail.com
Fri Feb 9 03:05:01 EET 2018


[05:25:30 CET] <solidus-river> hey all, i built ffmpeg using msys2 and am linking it against a msvs2017 x64 project, i'm getting undefined refences to functions, is there something else to compilitaion that I should have done / might have missed?
[05:27:02 CET] <xxx_> hi, all , does ffmpeg support closed captions subtitle ?
[07:15:32 CET] <solidus-river> xxx_: closed captions are different things, i'm unsure if there is a video container format that supports subtitles, usually they are .srt files provided along side the video
[07:18:35 CET] <solidus-river> xxx_, also, http://lmgtfy.com/?q=ffmpeg+add+srt+to+mp4
[11:39:17 CET] <solidus-river> hey all, i'm trying to build the ffmpeg libs for use with an msvc based project
[11:40:12 CET] <solidus-river> i tried building through msys2 and cygwin64 from the guild using msvc as the build platform but when my app launches it requires iconv-2.dll from mingw64/bin and then once that is satisfied it "fails to start succsessfully"
[11:40:28 CET] <solidus-river> am I going about compiling dll's to link to an msvc project the wrong way?
[13:51:26 CET] <dd> Trying to remove similar frames using mpdecimate but preserve original time (pts) using setpts
[13:51:35 CET] <dd> ffmpeg removes the similar frames
[13:51:46 CET] <dd> but duplicates the same frame over and over again because of the setpts
[13:52:05 CET] <dd> If I don't use setpts then the file size is much smaller and obviously the frames are really dropped
[13:52:27 CET] <dd> I would like to have the last frame with movement "extended" in time instead of copying it over and over again
[13:53:18 CET] <dd> ffmpeg -i in.mp4 -vf "mpdecimate,setpts=N/FRAME_RATE/TB" out.mp4
[13:56:29 CET] <furq> dd: -vsync vfr
[14:02:12 CET] <solidus-river> hey all, i compiled in MSYS2 and during link time i'm getting problems with AVCODEC-56.dll not finding sws_getCachedContext entrypoints
[14:17:41 CET] <dd> furq thanks, but that doesn't work
[14:18:00 CET] <dd> I want to get the same duration as the original file while having less frames (hence smaller file size)
[14:18:06 CET] <JEEB> you have a frame rate there so that won't work
[14:18:13 CET] <JEEB> why are you using setpts to begin with?
[14:18:45 CET] <dd> JEEB how would you remove duplicate frames while preserving original times (duration)?
[14:18:56 CET] <furq> just mpdecimate and vsync vfr
[14:19:36 CET] <JEEB> dd: FFmpeg by default doesn't expect a frame rate
[14:19:39 CET] <JEEB> it deals with timestamps
[14:19:59 CET] <JEEB> (dts/pts of each packet/frame)
[14:20:21 CET] <dd> this:
[14:20:22 CET] <dd> ffmpeg -y -f avfoundation -r 30 -i "default" out.mp4 -vf mpdecimate -vsync vfr out0.mp4
[14:20:31 CET] <dd> will output out.mp4 as the original file
[14:20:38 CET] <dd> and out0.mp4 with duplicates removed
[14:20:47 CET] <dd> they both have the same duration indeed
[14:20:51 CET] <dd> but they are almost the same size
[14:21:07 CET] <dd> out0.mp4 is a little bit better as expected
[14:21:15 CET] <dd> but I would expect it to be much better
[14:21:28 CET] <dd> using setpts removed the duplicates altogether
[14:21:35 CET] <dd> resulting in much smaller file
[14:21:38 CET] <sfan5> encoders are not stupid, duplicate frames will take barely any space to encode
[14:21:39 CET] <dd> but the duration is shorter
[14:22:00 CET] <dd> sfan5 right - this is why out0 is slightly better than the original file
[14:22:08 CET] <dd> but still far away from the optimal with setpts
[14:23:20 CET] <dd> original file - 314K
[14:23:35 CET] <dd> mpdecimate with vsync vfr: 312K
[14:23:41 CET] <prelude2004c> hey guys. i'm still trying to work through a problem. I can't seem to get this to deinterlace. Any recommendations ? ${ffmpeg} -hwaccel cuvid -c:v mpeg2_cuvid -deint 2 -resize 1280x720 -hwaccel_device $gpuenc -max_alloc 100000000 -threads 1 -vsync 0 -fflags +discardcorrupt -i "$stream" .. it wont deinterlace for some reason
[14:23:45 CET] <dd> with setpts: 221K
[14:26:25 CET] <sfan5> prelude2004c: you probably shouldn't be putting the encoding options before the -i
[14:26:47 CET] <DHE> actually the mpeg2_cuvid decoder has a lot of options which he is using
[14:27:22 CET] <sfan5> nvm then
[14:28:43 CET] <prelude2004c> sfan5, i'm trying to deinterlace on the GPU
[14:28:58 CET] <prelude2004c> on decoding or whatever
[14:33:53 CET] <sfan5> works for me here
[14:35:17 CET] <sfan5> % ffmpeg -hwaccel cuvid -c:v mpeg2_cuvid -deint 2 -resize 1280x720 -i title00.mkv -c:a flac -c:v h264_nvenc -y test.mkv
[14:35:30 CET] <sfan5> ^ is what I tried, title00.mkv is from a DVD and interlaced
[14:35:46 CET] <prelude2004c> and it works for you ? that's soooo strange.
[14:36:09 CET] <prelude2004c> how much CPU on deinterlacing does it use ?
[14:36:31 CET] <prelude2004c> it doesnt' give me an error. but it just doesn't double up frames
[14:36:40 CET] <prelude2004c> you notice frame rate double from source ?
[14:36:51 CET] <sfan5> frame rate is identical
[14:36:55 CET] <DHE> when I try it with deint I get some "past duration..." errors and huge numbers of dups and drops. whereas cuvid without the interlacer is fine
[14:36:55 CET] <prelude2004c> right
[14:37:14 CET] <DHE> my source is extracted OTA 1080i video
[14:37:16 CET] <prelude2004c> so , sfan5. When you deinterlace an interlaced source.. it will double up the frame rates
[14:37:34 CET] <sfan5> not necessarily, but that's an option yes
[14:37:41 CET] <prelude2004c> how do i get that to do it
[14:37:52 CET] <prelude2004c> that is the whole thing of what i am trying to do
[14:38:09 CET] <sfan5> deinterlace certainly works https://a.uguu.se/QLK7VDpds6gX_Bildschirmfoto_2018-02-08_14-37-04.png
[14:38:15 CET] <sfan5> but frame rate is not doubled, indeed
[14:38:41 CET] <prelude2004c> isn't it normal that it would double frame rate ?
[14:42:13 CET] <sfan5> it should be https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/cuviddec.c#L317
[14:47:07 CET] <furq> prelude2004c: maybe -deint bob
[14:47:15 CET] <prelude2004c> i tried that too.. nothing changed
[14:48:07 CET] <furq> oh
[14:48:12 CET] <furq> add -drop_second_field 0
[14:49:18 CET] <sfan5> that the default though
[14:49:58 CET] <prelude2004c> ya trying
[14:49:59 CET] <DHE> I added -r 60/1.001 (for 29.97fps files)  on the input. that works and smoothens the video out, though i swear the image just looks poorer
[14:50:14 CET] <DHE> like it turns 1080i30 into 540p60 (which I think is exactly what's happening)
[14:51:13 CET] <prelude2004c> no luck :(
[14:52:38 CET] <sfan5> *** dropping frame 14 from stream 0 at ts 12
[14:52:50 CET] <sfan5> this is interesting, is it dropping all the additonal frames?
[14:54:03 CET] <prelude2004c> so -r 60/1.001 seems to have doubled up .. but my audio is out of sync... the video is all messed up like collar bars red blue yesll all across the screen
[14:54:05 CET] <prelude2004c> very odd.
[14:54:19 CET] <sfan5> [null @ 0x559ca10c90c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 7641 >= 7641
[14:54:24 CET] <sfan5> this is with -f null -
[14:54:27 CET] <sfan5> i don't understand ffmpeg
[14:54:49 CET] <DHE> sfan5: what I think is happening is ffmpeg is confused by the file specifying 30fps, but the decoder providing 60fps
[14:55:11 CET] <solidus-river> gahh, ffmpeg compilation and linking into msvc is driving my bonkers
[14:55:19 CET] <DHE> ffmpeg -r 60/1.001 -drop_second_field 0 -c:v mpeg2_cuvid -deint 2 -i $INPUT ....    # this produces a good looking video, relatively speaking
[14:55:31 CET] <DHE> content is 29.97fps over-the-air mpeg2 1080i capture
[14:56:04 CET] <sfan5> hm yeah sounds like it
[14:56:10 CET] <sfan5> -f 60000/1001 makes the warnings disappear
[14:57:31 CET] <DHE> which is a shame. I would prefer 30fps with each frame being overall high quality
[14:59:13 CET] <sfan5> not sure if that's my input but with 60fps it's pretty much just each frame duplicated once
[14:59:58 CET] <sfan5> same result with yadif=field so must've been my input
[15:01:02 CET] <DHE> hmm.. I'm getting 60 unique frames per second, though when stepping you can see the shenanigans the deinterlacer does
[15:01:40 CET] <prelude2004c> hey how is audio ?
[15:01:46 CET] <prelude2004c> so i got it going but audio is completely out of sync
[15:03:40 CET] <sfan5> try -vsync drop or something
[15:04:22 CET] <prelude2004c> i tried vsync 0
[15:04:45 CET] <prelude2004c> vsync drop gives me : Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly   [hls @ 0x32dbc40] Encoder did not produce proper pts, making some up.
[15:05:09 CET] <sfan5> yes that's expected with -vsync drop, is the output okay though?
[15:05:25 CET] <prelude2004c> error.. wont even start
[15:05:43 CET] <prelude2004c> [mpegts @ 0x488eb40] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1920 >= 1920
[15:05:43 CET] <prelude2004c> av_interleaved_write_frame(): Invalid argument
[15:07:53 CET] <JEEB> your timestamps aren't going forward
[15:08:40 CET] <prelude2004c> not sure.. if i do vsync 1 it starts but audio is messed up. One other thing i noticed is.. closed caption is not present anymore after this deinterlace thing
[15:08:44 CET] <prelude2004c> does it destroy it?
[15:09:49 CET] <sfan5> tried -vsync 2 ?
[15:09:53 CET] <prelude2004c> seems when i try -copyts it starts
[15:10:12 CET] <sfan5> JEEB: cuviddec sends out two frames when interlacing is enabled, not sure how timestamps are handeled in that case
[15:10:14 CET] <prelude2004c> still out of sync completely but..
[15:10:15 CET] <sfan5> (https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/cuviddec.c#L367)
[15:19:16 CET] <prelude2004c> any other suggestions ?
[15:27:13 CET] <prelude2004c> ${ffmpeg} -r 60/1.001 -vsync 0 -hwaccel cuvid -hwaccel_device $gpuenc -c:v mpeg2_cuvid -deint 2 -resize 1280x720 -i ....   Funny when i use deint bob it gives me colors all accross the screen. When i use deint 2 its clear.. so only issue seems audio not in sync at all
[15:32:15 CET] <sfan5> you can always do deint + resizing on the cpu (if that's viable)
[15:32:26 CET] <prelude2004c> not vailable unfortunately
[15:32:38 CET] <prelude2004c> the thing is... why would audio be out of sync ? strange.
[15:32:52 CET] <prelude2004c> im trying things like -copyts
[15:33:01 CET] <prelude2004c> still nothing.. :(
[15:33:20 CET] <prelude2004c> the video is clean and frames are 59.94
[15:36:22 CET] <prelude2004c> weird.. in VLC if i delay audio by 1 second its in sync
[15:42:50 CET] <microcolonel> Howdy folks
[15:43:26 CET] <microcolonel> Is there a list or table somewhere describing the degree of (security/robustness) scrutiny which has been applied to various codecs in FFMPEG?
[15:43:54 CET] <microcolonel> I'm trying to see which ones would be reasonably safe to enable on LBRY
[15:45:40 CET] <saml> https://lbry.io/  ?
[15:46:11 CET] <JEEB> you always want to contain as much as possible any 3rd party input
[15:46:28 CET] <JEEB> and you only want to enable most basic things you want to support first
[15:46:53 CET] <JEEB> stuff like game codecs and formats generally get close to zarro testing outside of google's closed fuzzing setup
[15:47:12 CET] <microcolonel> saml: yeah
[15:47:35 CET] <saml> wow so it makes sense to build ffmpeg yourself with tidiest setting
[15:47:43 CET] <microcolonel> JEEB: yeah, I guess a good start would be Google's Chrome OS video player whitelist
[15:48:10 CET] <microcolonel> assuming they aren't relying on some set of mitigations to make that thing less risky
[15:48:40 CET] <sfan5> well you will still want to sandbox your ffmpeg processes
[15:48:52 CET] <microcolonel> Yeah, that's in Electron/Chromium's hands
[15:48:58 CET] <JEEB> microcolonel: they have a rather limited thing (pretty much AVC and AAC?)
[15:49:14 CET] <JEEB> so if you're using FFmpeg itself for demuxing etc you probably want more
[15:49:28 CET] <microcolonel> JEEB: no, they support all the WMV formats, XVID...
[15:49:42 CET] <microcolonel> just not in the browser window
[15:49:59 CET] <microcolonel> I guess I'll take a closer look at that
[15:50:01 CET] <saml> what sandbox do you use in linux? do you run ffmpeg inside docker?
[15:50:19 CET] <microcolonel> saml: it's whatever Electron/CEF provides
[15:50:39 CET] <saml> like in python, instead of subprocess.run(['ffmpeg', ..)       subprocess.run(['docker', 'run', ...
[15:50:56 CET] <microcolonel> saml: I believe Chromium uses seccomp
[15:51:11 CET] <microcolonel> aggressive seccomp
[15:51:25 CET] <saml> oh lbry is an electron app and you can run ffmpeg inside electron?
[15:51:25 CET] <microcolonel> and they use pledge on OpenBSD
[15:51:33 CET] <sfan5> saml: docker is not a sandbox
[15:51:42 CET] <sfan5> (https://security.stackexchange.com/questions/107850/docker-as-a-sandbox-for-untrusted-code)
[15:51:48 CET] <saml> exactly
[15:53:07 CET] <microcolonel> saml: electron is mostly just an application with a Chromium instance embedded in it, Chromium uses FFMPEG for software decoding and demuxing of video formats (now, including their own VP9 format).
[15:53:39 CET] <saml> that's sort of purist. many people in practice assume running in docker is safe enough by disabling networking and host disk access.  but yeah, someone can upload elaborate video that could use linux security hole and docker won't help there
[15:54:07 CET] <microcolonel> The default Chromium build has a small whitelist of desired codecs and containers, but has facilities in the build system to whitelist more.
[15:54:26 CET] <saml> oh wow didn't know chromium came with ffmpeg
[15:56:24 CET] <saml> so you want to whitelinst more so that lybr will support more video formats but you want to be careful
[15:57:03 CET] <saml> if chromium comes with ffmpeg, i wonder if i can do client side video encoding
[15:57:35 CET] <sfan5> that's part of the WebRTC standard IIRC, so yes
[15:58:00 CET] <saml> wow nice
[16:04:48 CET] <saml> i wish there's easy to use video programming library
[16:04:58 CET] <saml> well documented for beginners
[16:11:35 CET] <dolphy> hi! in incoming stream time to time i have an warning Negative cts, previous timestamps might be wrong where can i read more about this problem and why it can happend, thanks for answer
[16:24:49 CET] <prelude2004c> sfan5, any other ideas on why audio would not be in sync with video?
[16:25:18 CET] <sfan5> nope no idea
[16:25:44 CET] <prelude2004c> :( .. i'm stuck.. and this sucks :*
[16:27:59 CET] <prelude2004c> i think the audio sync issue is because of -r 60/1.001
[16:29:06 CET] <sfan5> does it work if you output video to a temporary file and then copy the video + audio into hls with a separate ffmpeg invocation?
[16:29:12 CET] <prelude2004c> but removing that , my frame rate is back to 29.97
[16:29:58 CET] <prelude2004c> um.. wondering if i can use the mpeg2_cuvid on the output side
[16:31:18 CET] <sfan5> mpeg2_cuvid is a decoder
[16:31:32 CET] <sfan5> if you'd like to do encoding on the GPU your options are nvenc_h264 or nvenc_hevc
[16:33:37 CET] <prelude2004c> i'm doing the encoding already
[16:33:58 CET] <prelude2004c> that is working fine... and mpeg2_cuvid is also working fine .. asside from this audio problem when i introduce -r
[17:04:54 CET] <Dark-knight> could someone tell me something
[17:05:40 CET] <Dark-knight> I just wanted to see if I could rename something using ffmpeg without changing anything by using -c copy. it worked, but..
[17:05:52 CET] <Dark-knight> why did it increase the bit rate by 5?
[17:05:56 CET] <Dark-knight> lol
[17:06:17 CET] <Dark-knight> all I did was rename the file
[17:06:29 CET] <c_14> No, you remuxed the file
[17:06:36 CET] <c_14> the whole container information is potentially different
[17:08:09 CET] <Dark-knight> how would I go about changing the name for the file through ffmpeg
[17:08:26 CET] <Dark-knight> I know i could just rename the file. but I'd like to see if this works
[17:09:11 CET] <c_14> you don't
[17:09:20 CET] <Dark-knight> hmm
[17:09:22 CET] <Dark-knight> ok
[17:09:29 CET] <sfan5> what's the extension of your source file and destination file?
[17:09:36 CET] <Dark-knight> mp4
[17:09:40 CET] <DHE> ffmpeg will always at least rebuild the container. going from mkv to mp4 will result in some small file size change, for example
[17:10:14 CET] <sfan5> if the extension doesn't change why are not just renaming the file from your file mananger?
[17:10:15 CET] <Dark-knight> I was trying to use ffmpeg to rename a file instead or right clicking it and renaming it
[17:10:20 CET] <Dark-knight> of*
[17:10:39 CET] <Dark-knight> wasn't trying to change anything else
[17:10:58 CET] <Dark-knight> like I said, I just wanted to see if I coould
[17:11:07 CET] <Dark-knight> I know there are easier ways
[17:16:27 CET] <Dark-knight> ok, I've got an actual non-stupid question
[17:17:16 CET] <Dark-knight> I downloaded the same audio source twice at 2 different qualities, but I don't know which is which.
[17:17:32 CET] <Dark-knight> which one of these is better?
[17:17:42 CET] <Dark-knight> https://pastebin.com/9Pp81a0D or https://pastebin.com/NUeAd6G6
[17:25:09 CET] <sfan5> the opus one
[17:25:10 CET] <sfan5> because
[17:25:13 CET] <sfan5> 1) it has higer bitrate
[17:25:19 CET] <sfan5> 2) opus is generally a better codec than vorbis
[17:26:09 CET] <ritsuka> maybe, or maybe it was a reencode of a low quality mp3 ;)
[17:37:04 CET] <Dark-knight> sfan5: the first link or the second one?
[17:37:25 CET] <sfan5> i think you can answer that question yourself
[17:37:50 CET] <Dark-knight> they both have the word opus in it
[17:37:57 CET] <Dark-knight> doesn't help
[17:40:06 CET] <sfan5> where do you see "opus" in the second link?
[17:40:49 CET] <Dark-knight> oh
[17:40:59 CET] <Dark-knight> I was looking at the same link twice
[17:41:05 CET] <Dark-knight> lol
[18:50:14 CET] <Dark-knight> thx
[22:53:33 CET] <kool> Hey guys, I'm currently working on a little ffmpeg script, and I got my first part done quite easily (overlaying a transparent webm above a video). But now I want to create a video with 2 images. the first one is a blurred background, and the second one should fade in after 10 seconds, and fade out 20 second before the end of the video.
[22:54:26 CET] <kool> I've already figured out a filter to do the fades, but they are right now quite short, and I dont know how to time them correctly, here is the snippet: https://pastebin.com/bFJvvKe7
[23:26:03 CET] <saucecode> I'm trying to get NVENC working in OBS. I downloaded release n3.3.6 from the repo and ran ./configure, it seemed to include all the options I needed. It compiled and installed without problem, but it doesn't seem to have built ffplay D:
[23:26:52 CET] <saucecode> How do I get it to build ffplay? --enable--ffplay has no effect
[23:29:16 CET] <saucecode> Trying again with 3.4, which I probably should've been using anyway >_>
[23:32:48 CET] <DHE> saucecode: ffplay uses SDL to do its heavy lefting. install an SDL development package
[23:32:54 CET] <DHE> *lifting
[23:38:42 CET] <Faggot> erad
[23:38:44 CET] <Faggot> asdf
[23:38:45 CET] <Faggot> adsf
[23:38:45 CET] <Faggot> asdf
[23:38:46 CET] Last message repeated 1 time(s).
[23:38:46 CET] <Faggot> fd
[23:38:49 CET] <Faggot> yo
[23:38:58 CET] <Faggot> wahts up my Gs
[23:45:48 CET] <saucecode> DHE: Worked! ffplay builds, but now the programs (ffplay, ffmpeg) won't run: error while loading shared libraries: libavdevice.so.57
[23:47:23 CET] <sfan5> build with --disable-shared OR actually install ffmpeg OR use ld_library_path
[00:00:00 CET] --- Fri Feb  9 2018


More information about the Ffmpeg-devel-irc mailing list