[Ffmpeg-devel-irc] ffmpeg.log.20180528
burek
burek021 at gmail.com
Tue May 29 03:05:01 EEST 2018
[00:00:37 CEST] <durandal_1707> but with noise, it could be very hard if noise is very big
[00:00:49 CEST] <slavanap> durandal_1707, got it. Will try. I've already forgot this "cross-correlation" word after couple years of work as a programmer. Thanks.
[00:01:48 CEST] <slavanap> Similar to Block-based motion estimation algorithm I'm already familiar with though. Better to start over with simple method.
[00:02:59 CEST] <slavanap> durandal_1707, I've just found Fourier-based solution, but it's not noise resistant https://github.com/allisonnicoledeal/VideoSync/blob/master/alignment_by_row_channels.py
[00:13:26 CEST] <johnnny22> JEEB: think it's not liking the option since the source is an hls (but it's content is fmp4/mp4)
[00:15:13 CEST] <JEEB> right, it's a meta demuxer so you'd have to find the option on how to pass the options to the sub-demuxer
[00:15:28 CEST] <JEEB> (these things seem to be a pet peeve at this point because people started making more and more of those)
[00:16:05 CEST] <johnnny22> is there such a generic way of passing options to one of the streams demuxers ?
[00:16:13 CEST] <JEEB> guess twice
[00:16:41 CEST] <johnnny22> or compile it in as false :P lol
[00:17:07 CEST] <JEEB> basically initially nobody envisioned that you'd be calling a demuxer from a demuxer and that the demuxer would have its own libavformat context
[00:17:17 CEST] <JEEB> and then those got added with not too much thought given into it
[00:17:29 CEST] <JEEB> and now we're having fun with it y'all
[00:17:40 CEST] <JEEB> anyways, have you posted the issues you have with the sample on trac.ffmpeg.org?
[00:17:59 CEST] <JEEB> so that someone with time could maybe take a look at it
[00:18:59 CEST] <johnnny22> not yet, but it's strange, still trying to grasp the issue. I just just realized that when #EXT-X-END is present the start_time seems right, but if it's not, then thats when it's off.
[00:19:26 CEST] <johnnny22> start_time on the video stream that is.. the audio stream seems to always report a right time.
[00:20:09 CEST] <JEEB> shfil: and yes, I was afraid cehoyos would just glance over your ticket and just notice the mp3 stuff that is actually not your issue :P
[00:20:44 CEST] <JEEB> because your actual issue is that you have some samples of PCM data, and then using swresample is seemingly adding artifacts
[00:23:23 CEST] <shfil> Yeah, I wanted add "introduction" what caused me to use libresampler, but still I think breaking api without mentioning there is a issue. https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges
[00:23:31 CEST] <shfil> *an
[00:24:12 CEST] <shfil> and *libswresampler
[00:32:08 CEST] <ePirat> Good evening
[00:36:31 CEST] <JEEB> shfil: I agree that it could have been mentioned either there or in the general change log if it wasn't, but cehoyos is really correct there in saying that we don't promise that you get a certain decoder or pix_fmt/sample_fmt by default
[00:38:07 CEST] <JEEB> yeh, not mentioned in the general change log
[00:39:53 CEST] <shfil> just I added it extra, because I think it can cause problems for another people. but yeah I should more concentrate on swresampler.
[00:42:59 CEST] <JEEB> basically give a small sample and a piece of code that focuses on that part
[00:43:08 CEST] <JEEB> so that it is self-contained
[00:44:12 CEST] <shfil> add comment or open new issue?
[00:44:56 CEST] <JEEB> feel free to just use that issue
[00:45:09 CEST] <JEEB> modify description + comment, I guess?
[01:02:31 CEST] <absence> i'm having some trouble with converting dvd with subtitles to mkv. i'm using "copy" for all codecs, including subtitle, but the subtitles are completely black. i've tried -ifo_palette, but nothing happens (apparently it doesn't even care if the filename exists or not), and i've tried -palette and set all sixteen colours to white. still the subtitles are black
[01:05:04 CEST] <absence> command line is ffmpeg -fflags +genpts -ifo_palette VTS_01_0.IFO -i "concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB|VTS_01_5.VOB|VTS_01_6.VOB|VTS_01_7.VOB|VTS_01_8.VOB" -map 0:1 -map 0:4 -map 0:6 -vcodec copy -acodec copy -scodec copy test.mkv
[01:09:57 CEST] <johnnny22> JEEB: when creating a ticket, and attaching a file on the videolan file uploader.. Do i create the ticket 1st so that I have a "Trac ticket" to assign to the file being uploaded ?
[01:10:49 CEST] <JEEB> I've never actually utilized any mentioned (bigger) file uploader relevant. but yes, that's one way of doing it
[01:11:01 CEST] <furq> absence: it's generally better to use something like tccat to deal with dvd titles
[01:14:35 CEST] <absence> furq: hmm, why?
[01:15:11 CEST] <furq> mostly for cases where the title doesn't exactly line up with the vobs
[01:15:17 CEST] <furq> but i find it just does a better job in general
[01:15:33 CEST] <furq> there's also tcdemux if you just want to extract the subtitle stream and mux it in separately
[01:18:23 CEST] <absence> i see.. can't seem to find a windows build of it though
[01:21:08 CEST] <furq> oh fun
[01:21:28 CEST] <furq> maybe try pgcdemux on windows
[01:27:25 CEST] <johnnny22> JEEB: http://trac.ffmpeg.org/ticket/7235 ¯\_(Ä)_/¯
[01:28:04 CEST] <JEEB> cheers
[01:29:42 CEST] <johnnny22> I'm mostly wondering if the source is the issue or if there's an issue in ffmpeg :) It could be that the source has a major problem.
[01:29:58 CEST] <johnnny22> But it plays in VLC & Quicktime :)
[01:42:32 CEST] <bemeurer> Hey there, since av_register_all() has been deprecated, what replaced it?
[01:43:25 CEST] <JEEB> nothing
[01:43:47 CEST] <JEEB> unless you have to support older versions, don't call it and that's it
[01:43:57 CEST] <bemeurer> Got it
[01:44:04 CEST] <bemeurer> I'm trying to follow this: http://dranger.com/ffmpeg/tutorial01.html
[01:44:16 CEST] <bemeurer> Does anyone have an updated similar tutorial/article?
[01:44:35 CEST] <JEEB> there are various things, such as the transcoding example under doc/examples in the repo
[01:46:25 CEST] <bemeurer> JEEB: Awesome, thank you!
[01:59:11 CEST] <TiZ_> Hi there. I'm having trouble getting ffmpeg to record from the desktop and consistently keep video and audio in sync. Here is output from the last time the script I made to generate a command line was run: https://pastebin.com/HCtrz3BH It doesn't seem to matter if I use .mp4 or .ts. It doesn't seem to matter if I add setpts filters. It doesn't seem to matter if I have wallclock_as_timestamps. Very inconsistently, it will sometimes desyn
[02:01:22 CEST] <TiZ_> The one thing I have a handle on is that when it does go out of sync, "queue input backwards in time" and "non-monotonous DTS" messages will frequently appear. Is there something I should be configuring in the pulse device? One thing I have noticed about pulse is that it tanks performance; my max FPS is way lower with it, and if I have two pulse devices I can't capture 30FPS at all. That's why one is ALSA.
[02:03:43 CEST] <furq> TiZ_: use_wallclock_as_timestamps is an input option, you probably want to specify it once per input
[02:05:02 CEST] <TiZ_> furq: Okay, that's good to know. I will try adding that. Is the fact that I am mixing pulse and alsa potentially part of my woes here? I'd like to be able to get both the system audio and the mic.
[02:05:32 CEST] <furq> no idea but it's probably better to use alsa for both
[02:06:05 CEST] <furq> also you might want to use scale_vaapi instead of scale
[02:06:24 CEST] <absence> furq: so i found something called dvdsubedit that appears to have exported the subtitles in sup format.. i tried searching for info about that, but i just get a lot of hits for some bluray tool
[02:06:51 CEST] <furq> absence: pgcdemux can do that
[02:07:19 CEST] <furq> i would generally use that if you're working with dvds on windows
[02:09:14 CEST] <absence> furq: humm, pgcdemux appears to produce sup files as well
[02:09:57 CEST] <absence> furq: so i still need to find a way to convert them
[02:10:14 CEST] <furq> ffmpeg will read sup iirc
[02:14:36 CEST] <absence> furq: it tries, but "Invalid data found when processing input", "could not find codec parameters"
[02:14:52 CEST] <absence> furq: would probably be better if i could convert it to idx/sub
[02:16:12 CEST] <furq> oh right yeah there's some weird incompatibility between hdmv sup and dvd sup
[02:16:28 CEST] <furq> you can do it with pgcdemux though
[02:16:54 CEST] <furq> uncheck everything in the bottom left except "create a pgc vob", then in the customize file menu, uncheck everything except "write subpicture packs"
[02:17:04 CEST] <furq> that'll give you a .vob with just the subtitles that ffmpeg will read
[02:18:06 CEST] <furq> with that said, you might as well just create a normal pgc vob with the video and audio and then work with that
[02:18:24 CEST] <furq> that just puts the entire title into one vob with no splitting
[03:18:44 CEST] <TiZ_> furq: I'm sure it would be better to use as much as I can within vaapi, but I want this script to be able to overlay a webcam, and create padding for 4:3 games, and all that jazz. I'd have to do a lot of hwupload/hwdownload if I'm going between filters that can use vaapi and ones that can't, right?
[03:19:39 CEST] <TiZ_> furq: Also, the main reason I can't use alsa for both is because I have a HDMI/VGA adapter that uses USB for audio, and pulse automatically switches to it. The guide for setting up system audio capture for alsa kind of makes it seem like I'd have to hardcode just one audio device for output.
[09:59:53 CEST] <d-safinaskar> where is full documentation of options to "ffmpeg -vcodec ffv1"? My local copy of "man ffmpeg-all" and "man ffmpeg-codecs" say nothing about ffv1 (i have ffmpeg 3.2.10 installed) (in fact, they mention ffv1 in example code, but still they don't document ffv1). online copies of this manuals at https://www.ffmpeg.org/ffmpeg-all.html and https://www.ffmpeg.org/ffmpeg-codecs.html don't say anything, too.
[09:59:59 CEST] <d-safinaskar> https://trac.ffmpeg.org/wiki/Encode/FFV1 contains some info, but it doesn't say, what actually is -coder, -context and -g. They simply say that -coder is coder, -context is context and -g is GOP (what is GOP?!). Esentially, this docs say nothing about this 3 parameters. so, where is real documentation?
[10:01:24 CEST] <durandal_1707> d-safinaskar: you are supposed to know all this by your own
[10:04:32 CEST] <durandal_1707> d-safinaskar: look at this: https://www.ffmpeg.org/~michael/ffv1.html
[10:12:22 CEST] <furq> sar_den specifies the sample aspect ratio numerator. Inferred to be 0 if not present. MUST be 0 if sample aspect ratio is unknown.
[10:12:25 CEST] <furq> this seems correct
[10:24:27 CEST] <d-safina1kar> i am here again
[10:24:46 CEST] <d-safina1kar> dustfinger: very first sentense of your link is awfully outdated
[10:26:22 CEST] <d-safina1kar> dustfinger: it says: "intra-frame only codec". but, as well as i know ffv1 version 1 and ffv1 version 3 are not neccessary intra-frame only
[11:03:41 CEST] <d-safina1kar> let's consider intra-frame variant of ffv1. does it have any benefits over PNG or GIF? here I want to note that both PNG and GIF support animation, so, they essentially support storing of video
[11:05:31 CEST] <JEEB> GIF is paletted and PNG is a) RGB and b) much simpler than ffv1
[11:05:42 CEST] <JEEB> we've come quite a bit further since those simple zlib-like things
[11:05:53 CEST] <JEEB> I mean, their simplicity is not a bad thing
[11:06:05 CEST] <JEEB> it's just that you need to understand the pros and cons of each format
[11:14:15 CEST] <d-safina1kar> JEEB: thanks
[11:14:48 CEST] <JEEB> and for example if you have a YCbCr source, you don't want to use a format that cannot save YCbCr in it
[11:23:53 CEST] <Guest86998> I am trying to compile ffmpeg with opus for Android but I am getting a opus not found error, even when all the files were compiled
[11:24:03 CEST] <Guest86998> here's my build log: https://pastebin.com/NBjD3CyV
[11:24:06 CEST] <Guest86998> anyone know what's wrong?
[11:33:34 CEST] <JEEB> have you had your PKG_CONFIG_LIBDIR correctly configured?
[11:33:47 CEST] <JEEB> see ffbuild/config.log in your build dir regarding where the configure script failed
[11:34:33 CEST] <Guest86998> JEEB, i fixed it now with -lm flag
[11:34:37 CEST] <Guest86998> seems like a hack though
[11:36:37 CEST] <JEEB> was it a static library?
[11:37:07 CEST] <Guest86998> yes
[11:37:14 CEST] <JEEB> if yes, you might have needed --pkg-config-flags="--static"
[11:37:29 CEST] <JEEB> check the libopus .pc file, it should have had Libs.private or so
[11:37:34 CEST] <JEEB> that might have contained -lm
[11:37:47 CEST] <JEEB> and --static then adds Libs.private into linker flags
[11:38:00 CEST] <Guest86998> set --pk-config-flags when configuring ffmpeg?
[11:38:21 CEST] <Guest86998> pkg*
[11:38:24 CEST] <JEEB> yes
[11:38:54 CEST] <JEEB> at times I wonder if those could be set per-component somehow because sometims you have some system libraries for which you don't have static, and some of your own stuff
[11:39:02 CEST] <Guest86998> okay i'll try that since i have issues now with libvorbis
[11:41:41 CEST] <Guest86998> weird that I get random for some libs while other libs just compile fine like x264
[11:54:20 CEST] <d-safina1kar> is this possible to specify "-vcodec ffv1 -level 3 -slices 1"?
[11:54:31 CEST] <d-safina1kar> or valid value for -slices starts from 4?
[12:42:26 CEST] <intrac> can ffplay be made to decode only I frames?
[12:42:47 CEST] <intrac> I've tried -discard nokey, but it doesn't recognise it
[13:55:07 CEST] <paveldimow> Hi guys, I have a question about manipulating video size and orientation. The thing is that I have video with resolution 720x1280, I would like to rotate this video by 90 degrees and make it hmmm a "cube" resolution like 480x480 or 720x720 but to keep the proportion, is this possible without cropping?
[13:58:48 CEST] <Mavrik> Well, yes, but I'm not sure what you're trying to achieve.
[14:06:17 CEST] <d-safina1kar> what pixel formats using by ffv1?
[14:06:36 CEST] <Blacker47> "change the proportion without cropping to keep the proportion" don't make sense IMHO.
[14:07:22 CEST] <paveldimow> Mavrik: I am trying to keep to proportions of the videos, what I am actually doing is that I am mixing more videos with different resolutions ie 720x1280 and 480x640. When I do that then first video with greater resolution looks fine however the second videos has black bars on top and bottom
[14:07:37 CEST] <d-safina1kar> again, documentation doesn't say this anywhere. even spec itself says nothing about it. (strictly speaking, spec says that ffv1 uses YUV and JPEG2000, but doesn't say exact count of bits per pixel)
[14:08:32 CEST] <Mavrik> d-safina1kar: ffvenc.c or something similar in ffmpeg source should list supported pixel formats
[14:09:02 CEST] <paveldimow> Blacker47: maybe, that's the reason why I ask :)
[14:09:04 CEST] <Mavrik> paveldimow: yeah, what you're trying to do won't really work well
[14:09:07 CEST] <Mavrik> :)
[14:09:43 CEST] <paveldimow> Mavrik: ok, so cropping is the only option then I guess?
[14:09:43 CEST] <d-safina1kar> Mavrik: so, i am supposed to look sourse?
[14:09:47 CEST] <d-safina1kar> Mavrik: this is bad
[14:10:30 CEST] <Mavrik> d-safina1kar: well you can always try looking in documentation if there's a command that lists that
[14:10:31 CEST] <Mavrik> :P
[14:10:52 CEST] <Mavrik> paveldimow: well videos pretty much can't be of different resolutions in a single stream
[14:10:58 CEST] <Mavrik> So you kinda need to do *something*
[14:11:05 CEST] <Mavrik> Anamorphic video does exist for legacy reasons
[14:11:22 CEST] <Mavrik> But most modern formats and players don't handle that well
[14:11:40 CEST] <Mavrik> And even ones that do, kinda really just want to switch between 4:3 and 16:9, not your mobile portrait stuff
[14:13:35 CEST] <paveldimow> Mavrik: ok, thanks for you help, highly appreciated!
[14:14:11 CEST] <Mavrik> paveldimow: if you've seen what people mostly do - they choose one aspect ratio, then stretch rest of videos to that size and add blurry bands
[14:15:19 CEST] <paveldimow> Mavrik: yes, I saw that, but I think it's not the best option in my case or to say for my client :)
[14:18:06 CEST] <Mavrik> Well your client will just have to fund a new video format then :P
[14:24:50 CEST] <paveldimow> Mavrik: :D
[14:27:32 CEST] <intrac> so I've tried to use the first example given in the answer here: https://video.stackexchange.com/questions/21970/speed-up-a-video-30x-using-only-key-frames-with-ffmpeg
[14:27:39 CEST] <intrac> but ffmpeg returns:
[14:27:44 CEST] <intrac> "Failed to set value 'nokey' for option 'discard': Option not found"
[14:27:59 CEST] <intrac> aah. nvm.
[14:28:07 CEST] <intrac> I'm being dumb this morning.
[14:29:04 CEST] <intrac> ffmpeg works. ffplay doesn't. so back where I started
[16:58:15 CEST] <zevarito> how bad is call av_alloc_frame on each frame resampling iteration ?
[16:58:24 CEST] <zevarito> or each other context
[17:14:57 CEST] <ozette> browsers can't play mpeg-1, is that correct?
[17:25:35 CEST] <kepstin> ozette: in general, you should only expect browsers to play h.264 + aac (or sometimes mp3) in mp4 container, or vp8/vp9 + vorbis/opus in webm container.
[17:26:27 CEST] <kepstin> (or same codecs in HLS or Dash streaming, depending on browser and javascript player capabilities)
[17:40:24 CEST] <ozette> kepstin: thanks, i found out the hard way
[17:40:35 CEST] <ozette> but it's fine :) TY
[18:40:18 CEST] <bemeurer> How do I get the codec type of a stream, since doing `stream->codec->codec_type` seems to be deprecated
[18:41:36 CEST] <klaxa> stream->codecpar->codec_type
[18:44:11 CEST] <bemeurer> klaxa: Aha, thank you :)
[18:47:27 CEST] <bemeurer> klaxa: Has AVCodecContext just been replaced by AVCodecParameters?
[18:53:13 CEST] <klaxa> for remuxing yes, for encoding no (afaict)
[18:53:39 CEST] <klaxa> that way you don't have to allocate a codec context to get the parameters needed for muxing
[18:56:16 CEST] <bemeurer> klaxa: Got it, thanks!
[21:27:01 CEST] <allizom> Hi, I've got a mp4 file (h264+aac) which has sync issues between audio and video. I tracked it down to the video being played at 23.976 fps in place of the correct 24 fps. So I'd like to speed up the video without encoding it again (-codec:a copy -codec:v copy). I still can't find a way to do this with ffmpeg. I've tried the setpts, -r and -framerate options, but either they can't be used with copy or they have no effect
[21:36:17 CEST] <furq> allizom: you can do it with ffmpeg but it's better to do it with a proper mp4 muxer like l-smash
[21:36:40 CEST] <furq> with l-smash it'd be `muxer -i foo.mp4?fps=24 -o bar.mp4`
[21:38:13 CEST] <furq> with ffmpeg you'd need to do something like `ffmpeg -i foo.mp4 -c copy -map 0:v -f h264 - | ffmpeg -f h264 -r 24 -i - -i foo.mp4 -map 0:v -map 1:a -c copy bar.mp4`
[21:38:20 CEST] <furq> which as you can tell is a bit hacky
[21:38:45 CEST] <allizom> hm, let me parse that a bit...
[21:39:49 CEST] <furq> you need to demux the h264 stream in order to be able to apply the framerate input option to it
[21:40:25 CEST] <furq> like i said, i'd rather use l-smash to do it
[21:40:34 CEST] <allizom> so you extract the video stream, apply the framerate then mux them back?
[21:40:40 CEST] <furq> something like that
[21:40:42 CEST] <allizom> seems doable
[21:41:09 CEST] <allizom> why would you recommend another software then? any other advantages?
[21:41:12 CEST] <BtbN> that can make the sync even worse though
[21:41:38 CEST] <furq> doing it with ffmpeg has always worked ok for me but smarter people than me have told me not to rely on it
[21:41:47 CEST] <durandal_1707> garbage in -> garbage out
[21:41:53 CEST] <furq> l-smash is generally worth having anyway
[21:41:56 CEST] <BtbN> If the audio has a late or early start, it can easily give you even more trouble
[21:42:14 CEST] <furq> or mkvmerge will do it if you don't mind switching containers
[21:42:17 CEST] <allizom> BtbN: audio and video are correcly in sync at the start
[21:42:29 CEST] <BtbN> that doesn't mean it might not start late.
[21:42:49 CEST] <furq> yeah if one stream is delayed then that method probably won't preserve it
[21:43:34 CEST] <allizom> in that case I could just add an offset right? But I think in my case they are correctly aligned when the media starts
[21:43:47 CEST] <allizom> I'm going to make sure
[21:44:10 CEST] <BtbN> Why insist on ffmpeg when there is clearly a better tool for the job?
[21:44:47 CEST] <durandal_1707> is there l-smash irc channel?
[21:45:22 CEST] <allizom> BtbN: nothing in particular, I just thought it was adequate doing this with ffmpeg
[22:31:36 CEST] <Zexaron> Hello
[22:32:03 CEST] <Cracki> ave
[22:32:36 CEST] <fa0> Hello...
[22:33:18 CEST] <fa0> Off to another ffmpeg adventure, I'm trying to trim off a few seconds on the start of a video, but it's not working;
[22:33:24 CEST] <fa0> ffmpeg -i input.mkv -c copy -ss 00:00:05 -to 01:00:00 out.mkv
[22:34:06 CEST] <fa0> This has been working on a lot of my videos but for some reason this one, does cut it in the right place, the section where it's starting is like 9 seconds into the video, not 5
[22:34:09 CEST] <Cracki> do you want to transcode using standard bitrate?
[22:34:20 CEST] <fa0> no just mux/copy it
[22:34:30 CEST] <Cracki> do you know what a Group of Frames is?
[22:34:42 CEST] <iive> when you use copy it can only start from a keyframe
[22:34:45 CEST] <Cracki> ^
[22:34:51 CEST] <fa0> a wee bit, can't say I remember much...
[22:34:53 CEST] <Zexaron> I'm wondering on a few pointers anyone could give about how well can ffmpeg integrate with a high performance 3D C++ program, in this case Dolphin Emulator, I'm not the developer of the existing implementation but the problem is that currently AVIDump and FFV1 that's used do not produce good results, either that's a problem on the implementation or the codecs themselfs, basically it's about recording the game screen into a movie, in
[22:34:53 CEST] <Zexaron> real time, but variable framerate doesn't play good and the resulting video isn't perfect
[22:35:25 CEST] <Cracki> Zexaron, bitrate can be a problem
[22:35:32 CEST] <fa0> Cracki: yeah been wondering that... So might need to be transcoded, to get it where I want?
[22:35:44 CEST] <Cracki> Zexaron, you can use hw encode acceleration for H.264
[22:35:49 CEST] <iive> ffv1 is supposed to be lossless,
[22:35:49 CEST] <Cracki> fa0, likely.
[22:35:58 CEST] <Cracki> lossless means huge data rate
[22:36:09 CEST] <fa0> ok thanks
[22:36:10 CEST] <iive> it's also quite slow.
[22:36:12 CEST] <Cracki> depending on content, incompressible
[22:36:14 CEST] <Zexaron> The wish is, that this would work without lagging the system, and create a near lossless movie, but that the variable framerate that all 3D games have to be accurately showin in the ffmpeg movie, but something like X264 so it's not that big as FFV1
[22:36:25 CEST] <Cracki> slow because you gotta write that stuff to somewhere
[22:36:52 CEST] <iive> x264 does have lossless mode, and gives quite good results
[22:36:52 CEST] <Cracki> ask ffmpeg for h264_qsv, h264_nvenc, ...
[22:36:55 CEST] <Zexaron> Slow on the disk, not necessairly CPU, but anyone that does movies would have another disk just for writing that so that shouldn't be an issue
[22:37:02 CEST] <Cracki> do you *NEED* it lossless?
[22:37:09 CEST] <iive> you have to use quant parameter of 0
[22:37:09 CEST] <Cracki> or do you need it fast?
[22:37:14 CEST] <Zexaron> No not me personally, some people
[22:37:15 CEST] <Cracki> lossless doesn't mean fast
[22:37:25 CEST] <Cracki> do these people *understand* what they are asking?
[22:37:40 CEST] <kepstin> Zexaron: if you don't actually need *lossless*, you'd want to use x264 or even hardware h264 at high bitrate/quality.
[22:37:46 CEST] <Cracki> ^
[22:38:15 CEST] <Zexaron> I'm not too sure what all the downsides they want are, I'll ask more, but I heard they mentioned variable framerate just not working right, the implementation doesn't deal with the video good when FPS is variating, so the video looks wrong or what
[22:38:28 CEST] <Cracki> use hw encoders if you can. recent generations are quite ok, quality-wise, if you give them leeway with bitrate
[22:38:33 CEST] <kepstin> if you do need lossless, i'd recommend using a faster (less compression) codec than ffv1 - but that means you need faster disks
[22:38:37 CEST] <Cracki> variable frame rate, eh?
[22:38:42 CEST] <iive> ffmpeg should not have problem with variable framerate
[22:38:47 CEST] <Cracki> that's nonsense. vfr should work just fine.
[22:38:58 CEST] <kepstin> Zexaron: if you're having issues with vfr stuff, it might just be a bug in how your software is providing frame timestamps to ffmpeg
[22:38:58 CEST] <Cracki> give the frame the right PTS, it's good
[22:39:18 CEST] <Zexaron> It's not that about quality, I think, it's more about video integrity, it doesn't make the video look right
[22:39:33 CEST] <iive> Zexaron, what do you mean by "look right" ?
[22:39:40 CEST] <Cracki> show, don't tell
[22:39:41 CEST] <Zexaron> variating the fps breaks it and it looks crap, or something ... I'll try it my self now and see
[22:39:50 CEST] <Zexaron> yeah sorry I got a bit ahead of myself
[22:40:26 CEST] <Zexaron> they call this feature "framedumping" ... I hope I didn't mix it up with "movies"
[22:40:32 CEST] <Cracki> imagine the infinite possibilities that something can look like and still be called "breaking"
[22:45:40 CEST] <fa0> This is odd, I did one video and it cuts out the time, another and it won't hmm
[22:45:57 CEST] <Cracki> variable gop length
[22:46:34 CEST] <Cracki> even if it "does" something, it won't be exactly the time
[22:47:00 CEST] <Cracki> encode something with fixed gop length, 5 seconds (times frame rate) or so, then you'll see the granularity
[22:47:03 CEST] <fa0> hmm
[22:47:41 CEST] <Zexaron> I would have to make a movie myself, in the meantime here's an example of the code on current repo https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/VideoCommon/AVIDump.cpp
[22:47:43 CEST] <Cracki> if you wanted to deal with this right, you'd have to either re-encode *everything*, or split at gop boundaries, reencode the affected area, and concatenate back together
[22:47:57 CEST] <Cracki> Zexaron, make them drop avi
[22:49:08 CEST] <Zexaron> Yeah I heard something about AVI being a problem and they apparently would like to get H264, but most people aren't that experienced into video transcoding, I'm not a programmer but I did a lot of that so I was thinking maybe I could bridge
[22:49:29 CEST] <Zexaron> because I think some of them, that were discussing, didn't even knew H264 has a lossless mode
[22:49:32 CEST] <Cracki> good.
[22:50:03 CEST] <Cracki> ffmpeg source contains examples. maybe you can "copy" from that
[22:51:15 CEST] <Cracki> I would guess there's an integer overflow
[22:51:17 CEST] <fa0> Cracki: thanks
[22:51:35 CEST] <Cracki> at least someone should carefully check, where pts are computed
[22:51:43 CEST] <Cracki> it seems you people have a "ticks" variable
[22:52:15 CEST] <Zexaron> Now, I was premature, had planned but didn't take a look at the code for ffmpeg in Dolphin yet, but it looks like most framedumping stuff is in the AVIDump.cpp if you're lookign at it
[22:53:35 CEST] <Zexaron> I am somewhat familiar with the codebase since I have repo down with git myself and grepin throug the full source, but only for 1 year (6 months of pause) so I'm not a longtime developer of anykind, but I would be able to send recommendations
[22:54:05 CEST] <Zexaron> That code was written probably a long long time ago and those developers probably not around anymore
[22:54:24 CEST] <furq> i hope avidump doesn't imply avi the container format
[22:54:36 CEST] <furq> because as far as i know avi doesn't support vfr video
[22:55:36 CEST] <Cracki> it looks like they allow other file extensions, and figure the container format from that
[22:55:46 CEST] <furq> fair enough
[22:56:15 CEST] <Zexaron> By the sound of it I'm not even sure if movies are made, as it's called "framedumping" however, in the main GUI there is "Movies" and it asks to load single file called ".dtm" or Dolphin TAS Movies, not sure if this is the same ,TAS Input ... ah I should have looked that up before coming here
[22:56:52 CEST] <furq> yeah that much sounds normal
[22:56:52 CEST] <Zexaron> Okay, TAS is for Tool-Assisted Speed Run
[22:57:00 CEST] <Zexaron> Speedrun*
[22:57:11 CEST] <klaxa> yeah it's a recording of the inputs rather than a video
[22:57:16 CEST] <furq> right
[22:57:35 CEST] <furq> and then you dump those to a video so that the rendering isn't slowing the emulator down during gameplay
[22:57:43 CEST] <furq> and also so you can potentially do it faster than realtime
[22:58:02 CEST] <furq> idk whose benefit i'm explaining this for
[22:58:38 CEST] <Zexaron> There is an option though, "Frame Dumps using FFV1" ... so it's like they don't make a movie, they just use FFV1 to encode each frame file in
[23:00:04 CEST] <furq> well yeah i was asking what container it outputs
[23:03:05 CEST] <Zexaron> Sorry, cause I'm figuring this out in realtime, I'll run it right now and do some recording quickly
[23:03:35 CEST] <klaxa> from the code it looks somewhat user-supplied?
[23:03:41 CEST] <klaxa> https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/VideoCommon/AVIDump.cpp#L99
[23:05:05 CEST] <Zexaron> Looking at the commit history of that file may reveal more details sorrounding that, but I'll go make some recordings, can't do everything at once
[23:07:10 CEST] <furq> i can't find any options in dolphin to change any of the frame dumping options
[23:07:15 CEST] <furq> it just gives framedump0.avi
[23:07:46 CEST] <furq> there must be options somewhere because this is xvid
[23:08:16 CEST] <Zexaron> I also am not sure yet if this is meant to be used in conjunction with TAS or not. The configuration for framedumps is in the Graphics->Advanced tab
[23:08:58 CEST] <furq> oh
[23:09:01 CEST] <furq> just one checkbox huh
[23:09:21 CEST] <furq> you can dump frames whenever you want
[23:09:25 CEST] <furq> either when playing or playing back an input
[23:09:31 CEST] <Zexaron> at least in the GUI, the INI has more options, but not included by default, if you're trying yourself, you can make a file called "portable.txt" so the config is saved in the root folder where you extracted it, instead of My Documents or elsewhere according to OS
[23:09:42 CEST] <furq> but yeah there's no option to use anything other than avi
[23:09:45 CEST] <furq> and avi doesn't support vfr
[23:09:48 CEST] <furq> so that's probably your problem
[23:10:42 CEST] <Zexaron> yeah, pretty big facepalm ... but maybe that's not the only problem so I don't want to jump to conclusion hehe
[23:10:54 CEST] <furq> well you definitely need to fix that anyway
[23:11:17 CEST] <Zexaron> That's the first thing on the list yeah, then.
[23:11:22 CEST] <furq> i guess mkv would be a better choice
[23:11:23 CEST] <Zexaron> Not even OpenDML supports it ?
[23:12:06 CEST] <furq> i don't think so
[23:12:23 CEST] <Zexaron> Yeah ageed with mkv, i've dealth with them a lot when archiving my historical tapes
[23:12:27 CEST] <furq> afaik it's always fixed framerate and you can emulate vfr with dummy frames
[23:12:33 CEST] <furq> which means setting the fixed framerate really high
[23:12:41 CEST] <furq> but that's an awful hack that should be avoided
[23:12:59 CEST] <furq> like most things involving avi
[23:13:23 CEST] <furq> nut would probably be the simplest thing to use for this, but then people would complain because they've never heard of it and nothing other than ffmpeg and mpv will open it
[23:13:41 CEST] <furq> so you're probably stuck with mkv
[23:15:43 CEST] <Zexaron> Could be added as option tho ...
[23:16:14 CEST] <Zexaron> I remember some talks they had, historically it was possible to choose different codecs, but they removed that from the GUI at least.
[23:16:38 CEST] <Zexaron> That said, what if, that was just the codec, and not the file format, so it was always .avi
[23:16:43 CEST] <furq> yeah they used to use VfW
[23:16:48 CEST] <furq> which is a nightmare
[23:18:00 CEST] <Zexaron> There doesn't seem to be interest in this area, but they're all wanting it to be fixed, so I might take the challenge, I'm trying to learn C++ along anyway
[23:19:35 CEST] <Zexaron> I just don't know much history of the project, even tho I was lurking around for a long time
[23:19:51 CEST] <Zexaron> code histroy, I mean.
[23:23:19 CEST] <fa0> Cracki: one last thing, did you say before, if I transcode the video over, then it should be good to trim, and would I need to encode over the audio too, or just video?
[23:23:34 CEST] <Zexaron> furq: Hmm, not sure why it's dumping only when resizing the window, so it made only one avi file for you?
[23:24:01 CEST] <Zexaron> dump one when I resize the window, then stops, maybe not configured right
[23:24:16 CEST] <Cracki> fa0, you might be able to get away with not reencoding the audio. audio comes in shorter packets.
[23:24:39 CEST] <fa0> ok let me try just video and let you know, thanks again Cracki
[23:24:44 CEST] <Cracki> so a bit of difference between audio and video is absolutely ok. container formats record that difference and report it to whoever plays it back
[23:25:27 CEST] <Cracki> "smart rendering" is a tricky technique. virtualdub did this for mpeg4.
[23:25:59 CEST] <fa0> k
[23:26:08 CEST] <Cracki> the technique has different names. I hear avisynth might have it implemented for mpeg4 too, but who knows...
[23:26:09 CEST] Action: fa0 flips the switch Vrooommm
[23:26:17 CEST] <fa0> hmm
[23:26:32 CEST] <Cracki> the technique being just reencoding the affected GOP
[23:26:50 CEST] <Cracki> the presence of B-frames can complicate things
[23:27:19 CEST] <Cracki> (or might not, I don't understand enough about h.264 features)
[23:28:05 CEST] <fa0> hmm well, since this is a mkv I tried mkvmergeGUI, it has a spilt option by time, and it ended up the same thing too...
[23:28:19 CEST] <fa0> wasn't sure if I'd have better luck with it...
[23:30:26 CEST] <Cracki> you can use that to split into 3 parts
[23:30:30 CEST] <Cracki> and reencode the middle part
[23:30:52 CEST] <Cracki> _if_ the tool does split at exactly gop boundaries (and doesn't truncate GOPs... which it may)
[23:31:11 CEST] <fa0> Crap transcoding the video didn't do anything... :(
[23:31:24 CEST] <Cracki> what did you do
[23:31:24 CEST] <fa0> so maybe before I try anything else, transocde audio too?
[23:31:41 CEST] <Cracki> you do "ffmpeg -i ... -ss ... -c:v ... out.xxx"
[23:31:47 CEST] <fa0> I'm running this in a script, here's the cmds;
[23:31:49 CEST] <fa0> urxvt -g 120x32 -e ffmpeg -i "$i" -vf format=yuv420p -c:v libx264 -preset fast -crf 20 -c:a copy -metadata:s:a:0 language=eng "$OUTPUT/${i%.*}.mkv"
[23:31:50 CEST] <Cracki> that way it seeks *after* decoding frames
[23:31:59 CEST] <Cracki> not before (i.e. seeking in the bitstream)
[23:32:09 CEST] <fa0> I just transcoded to x264
[23:32:13 CEST] <Cracki> so?
[23:32:14 CEST] <fa0> copied audio
[23:32:23 CEST] <Cracki> what did you expect that to do?
[23:32:29 CEST] <fa0> then I ran this cmds;
[23:32:30 CEST] <fa0> urxvt -g 120x32 -e ffmpeg -i "$i" -c:v copy -c:a copy -ss 00:00:05 -to 01:00:00 "$OUTPUT/${i%.*}.mkv"
[23:32:35 CEST] <fa0> and same problem...
[23:32:41 CEST] <Cracki> can you guess why
[23:32:46 CEST] <Cracki> -c copy
[23:33:22 CEST] <fa0> I tried that too, didn't work and I never used it on my other videos, this cmd works on all them except this one
[23:33:28 CEST] <Cracki> you misunderstand
[23:33:43 CEST] <Cracki> DO NOT COPY when you want frame-exact cutting
[23:33:56 CEST] <fa0> ok
[23:34:18 CEST] <Cracki> what is $i anyway?
[23:34:53 CEST] <fa0> it's in a script, I just run the file with all the cmds in them, I have several
[23:35:04 CEST] <fa0> So then how you mux and trim if not copying?
[23:35:15 CEST] <Cracki> by not using the "copy" codec, but a real codec
[23:35:22 CEST] <Cracki> that's why it's called reencoding
[23:36:16 CEST] <Cracki> I think if grasping this is already a hurdle, forget anything I said about "smart rendering/transcode/copy"
[23:36:25 CEST] <fa0> Like this; http://dpaste.com/1FMTVFD
[23:36:37 CEST] <Cracki> no, not like that
[23:36:47 CEST] <Cracki> that paste still does a "copy"
[23:36:56 CEST] <fa0> I was just showing you the script is all...
[23:37:00 CEST] <Cracki> ah
[23:37:19 CEST] <fa0> I grasp, all this, sorry if I said something confusing back...
[23:37:31 CEST] <Cracki> ok
[23:37:53 CEST] <fa0> I just thought you said before '-c:v copy -c:a copy' was ok for trimming...
[23:38:33 CEST] <fa0> Sorry trying to stay focused, was messing with this and chatting...
[23:39:46 CEST] <fa0> So with as little transcoding as possible, how would you recommend going about --> -ss 00:00:05 -to 01:00:00
[23:40:41 CEST] <Cracki> that's going to be messy
[23:41:09 CEST] <Cracki> you need to split the source at or after 5 seconds
[23:41:43 CEST] <Cracki> then do a reencode on the first piece, with "-i -ss" ordered like that, so you get actual decoded frames and seek on that
[23:42:12 CEST] <Cracki> from that reencode, you get an exactly shortened piece that ends at the GOP boundary where the second piece continues
[23:42:31 CEST] <Cracki> you should then be able to concatenate both. of course the codec and many of its parameters have to match.
[23:42:48 CEST] <fa0> ok
[23:43:06 CEST] <Cracki> split the source file means you want to get two pieces that exactly line up
[23:43:21 CEST] <Cracki> and the split being at or after the split/cut point you actually want
[23:46:38 CEST] <Zexaron> furq:If you started diving deep into that AVIDump.cpp and even doing code your self, tell me so I don't waste time on it myself, just saying that because it happened many times on freenode that I had a random discussion and a few hours later the person brings me a fully functioning example of all that we discussed lol
[23:53:36 CEST] <fa0> Wel for now just trying -ss -t to split, this doesn't work...
[00:00:00 CEST] --- Tue May 29 2018
More information about the Ffmpeg-devel-irc
mailing list