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

burek burek at teamnet.rs
Wed Oct 9 03:05:06 EEST 2019


[04:51:56 CEST] <transhuman> hi! whats the magic command to convert .mp4 file to mpg losslessly (best quality)
[04:52:14 CEST] <transhuman> conversion comes out real lousy
[04:54:41 CEST] <nicolas17> mpg = MPEG1?
[04:56:42 CEST] <nicolas17> you won't get lossless, you might get reasonable quality by using a much higher bitrate than the mp4 uses
[04:56:59 CEST] <Ultima> Correct me if i'm wrong, but converting crappy quality to a better quality format is still going to be crappy. The source needs to be good to have good quality.
[04:57:25 CEST] <transhuman> thanks I figured it out , both of you were right
[04:59:31 CEST] <transhuman> one last question is there an ffmpeg command to take a video of a pan of an area and stitch together one large high resolution image?
[04:59:59 CEST] <transhuman> I can do this in windows with REgiStax
[05:56:03 CEST] <xtemp09> guys, why does FFMPEG keeps copying an unsupported codec, while I deliberately are trying to get rid of it using -map -0:1?
[06:33:16 CEST] <Media_Thor> xtemp09: do you have a pastebin url?
[06:53:53 CEST] <xtemp09> Media_Thor, it seems to be chapters.
[06:54:21 CEST] <xtemp09> ffprobe -show_streams -show _format shows something like chapters/
[06:54:58 CEST] <xtemp09> though, I don't unerstand why ffmpeg keeps copying them even if I set -map -0:1.
[06:55:28 CEST] <xtemp09> and why does it show them as a stream, while it's not supposed to like like a stream.
[06:55:53 CEST] <xtemp09> though, FFMPEG says when muxing: "Unsupported codec with id 100359 for input stream"
[10:32:23 CEST] <alexpacio_> Hello there. I just tried to capture my desktop on Windows 10 using DirectShow filters but, whatever I'm going to use, I'm always stuck at 20fps. No bottlenecks, I also tried with many encoders and formats on transcoding procedure. My output is a network flow (rtsp, native udp or tcp)
[10:32:52 CEST] <alexpacio_> Do you know if is it feasible to obtain 60fps on 1080p from a desktop capture?
[10:34:09 CEST] <BtbN> You must have installed some 3rd party tool for dshow to capture the desktop, and I'd blame that for a cap at clean 20 fps.
[10:35:56 CEST] <alexpacio_> BtbN: yes, also tried with gdigrab but results are even worse. Can you recommend me a directshow filter that is able to obtain 60fps?
[10:36:22 CEST] <BtbN> no
[10:36:34 CEST] <BtbN> I'd say just use OBS
[10:37:44 CEST] <alexpacio_> BtbN: OBS is able to obtain very easily 60fps but it does introduce a huge latency. I need to stream the desktop in realtime in order to manage my desktop from far
[10:38:05 CEST] <BtbN> I'm not aware of OBS introducing "huge latency".
[10:38:27 CEST] <BtbN> Most streams have just a few seconds.
[10:39:39 CEST] <alexpacio_> BtbN: I'm trying to obtain something that gives me back display at near 200-300ms of delay max
[10:39:51 CEST] <alexpacio_> do you mean it is possible with OBS?
[10:40:02 CEST] <BtbN> You're gonna have to write custom software for that. Neither obs nor ffmpeg are written with real time in mind.
[10:41:09 CEST] <BtbN> The video encoder alone easily introduces more latency than that, due to reorder delay and look-ahead buffering.
[12:32:33 CEST] <lokke> [ot] - hello world - is anyone of you guys able to tell me if (and if yes then how) i can add the information to a .mp3 file if it is comming from a ablum; EP; maxi; single etc.?
[12:32:50 CEST] <lokke> album*
[12:36:28 CEST] <DHE> id3 tag editor?
[12:37:49 CEST] <lokke> DHE: but into wich field? could not find a standart for it
[12:40:38 CEST] <pink_mist> there probably isn't a standard field for that
[12:40:43 CEST] <pink_mist> I don't know though
[14:58:11 CEST] <kepstin> for what it's worth, musicbrainz picard puts it in a TXXX tag in mp3, look for "release type" in https://picard.musicbrainz.org/docs/mappings/
[14:59:05 CEST] <kepstin> so yeah, no standard field
[14:59:38 CEST] <void09> any way to count the visible visual glitches in a video caused by corrupted stream ?
[15:03:41 CEST] <DHE> if the stream is obviously corrupted there should be log messages, usually prefixed with something like [h264 @ 0x12345678] so you can count those
[18:01:54 CEST] <jpb> hi - i've written up a how to on using xstack for making video mosaics and would like to add it to the wiki.
[18:02:32 CEST] <jpb> would someone be willing to critique it for me, to make sure my terminology and usage is correct?
[18:03:00 CEST] <durandal11707> jpb: anybody that with unbanned mail can edit wiki
[18:03:39 CEST] <jpb> i already have an account there and i've been using the sandbox. i'm now ready to put it on the wiki page
[18:05:10 CEST] <jpb> it will take me a bit to finish it off, and i'll post it after that.
[18:05:31 CEST] <klaxa> cool, good stuff!
[18:15:41 CEST] <MrSassyPants> ok with the new hevc_nvenc how do I clamp the bitrate in VBR
[18:15:49 CEST] <MrSassyPants> as in, max-rate, max bitrate, whatever
[18:16:54 CEST] <BtbN> What do you mean, "new hevc_nvenc"? And it takes pretty much the same parameters h264_nvenv does, except for some minor codec specific differences.
[18:19:13 CEST] <MrSassyPants> well probably not as new as it is to me
[18:21:13 CEST] <MrSassyPants> it's for OBS. obs has a gui that lets you set things like bitrate and "encoder settings", for example "cq=23 rc-lookahead=32 nonref_p=1"
[18:21:47 CEST] <MrSassyPants> but because the hevc_nvenc stuff is jank AF, it doesn't have an explicit gui for it, just the generic "via ffmpeg" gui
[18:22:10 CEST] <MrSassyPants> so I assumed the encoder settings would allow me to set a max bitrate
[18:22:16 CEST] <MrSassyPants> but I have not found the setting
[18:22:32 CEST] <MrSassyPants> its not max-bitrate or maxrate
[18:23:19 CEST] <MrSassyPants> ffmpeg -h encoder=hevc_nvenc doesn't mention anything bitrate wise, beyond the switch to set it to VBR
[18:26:48 CEST] <kepstin> the vbv controls are all done via generic encoding options, so they don't show up in the encoder-specific help
[18:27:26 CEST] <MrSassyPants> I tried "max-rate" and such in the "muxer settings" field
[18:27:32 CEST] <MrSassyPants> didn't work either
[18:29:50 CEST] <MrSassyPants> is there some way to get at these generic encoding options
[18:29:55 CEST] <MrSassyPants> from within obs
[18:30:02 CEST] <kepstin> hmm. the ffmpeg cli options for that are -maxrate and -bufsize (usually both are needed), but i don't know what names obs will use for those
[18:30:23 CEST] <MrSassyPants> It's probably not using the cli
[18:32:23 CEST] <kepstin> i just checked, the option names for avoptions are "maxrate" and "bufsize", those should work in obs
[18:32:46 CEST] <kepstin> note that maxrate on its own without bufsize is meaningless with most encoders (i dunno about nvenc specifically)
[18:33:01 CEST] <MrSassyPants> noted
[18:34:03 CEST] <MrSassyPants> Either option does not seem to be recognized by the encoder settings
[18:34:24 CEST] <kepstin> what causes you to think that?
[18:34:38 CEST] <MrSassyPants> Failed to set maxrate=50000
[18:34:42 CEST] <MrSassyPants> Failed to set bufsize=128000
[18:34:55 CEST] <MrSassyPants> recording proceeds regardless
[18:35:11 CEST] <MrSassyPants> but I'm not even going to test for actual impact on bitrates
[18:35:19 CEST] <kepstin> huh, weird. those are avoptions that should work on the avcodeccontext. no idea what's going wrong, you're gonna have to talk to obs folks about how to set those
[18:35:33 CEST] <MrSassyPants> it's probably not the right context?
[18:36:17 CEST] <kepstin> obs might have dedicated fields in its settings for maxrate and buffer size
[18:36:26 CEST] <kepstin> if it does, use those rather than manually specifying the options
[18:36:40 CEST] <MrSassyPants> I get the same error, except with "invalid muxer settings" if I add that to the "muxer settings"
[18:38:04 CEST] <kepstin> muxer is obviously wrong, they're codec settings. you're gonna need to get help from the obs folks, this is kind of out of scope for ffmpeg support.
[18:38:05 CEST] <BtbN> well, it's not a muxer setting.
[18:38:26 CEST] <kepstin> we know the options to set, we know where to set them, we don't know how to make obs set them.
[18:38:27 CEST] <BtbN> I feel like OBS sets the avoptions on the wrong context, so it only recognizes the codec own ones
[18:38:28 CEST] <MrSassyPants> it would be "ffmpeg gets those on the cli" settings but obs doesn't have that
[18:38:40 CEST] <MrSassyPants> I think that's the case, BtbN
[18:39:06 CEST] <MrSassyPants> And it only allows for a "rate" option (-b:v I suppose) but not -maxrate or -bufsize
[18:39:55 CEST] <kepstin> they should be setting the options as AVOption on the AVCodecContext for the encoder, which would mean the generic AVOption stuff for codec-independent options would work. I dunno how they'd get that wrong :/
[18:47:12 CEST] <BtbN> found the function: https://github.com/obsproject/obs-studio/blob/master/plugins/obs-ffmpeg/obs-ffmpeg-output.c#L168
[18:47:19 CEST] <BtbN> av_opt_set(context->priv_data, name, value, 0)
[18:47:28 CEST] <BtbN> so yeah... only codec-private options are gonna work
[18:50:51 CEST] <transhuman> so for anyone who is interested. I found a good solution for stitching a video of images together in a large hires image, not sure how good it works yet (still trying it out) but its called AviStack2 it pretty much automates the process, but using a good camera that's high res with like 80 frames a second and a tripod with slow steady motion gets best results
[18:51:11 CEST] <transhuman> for taking images of space at least
[18:53:53 CEST] <MrSassyPants> BtbN, so can I trick the codec into setting a max rate?
[18:54:07 CEST] <BtbN> no
[18:54:24 CEST] <BtbN> You set the apropiate option. If OBS does not expose it, it can't be set.
[18:54:48 CEST] <MrSassyPants> worst of all I got a custom cobbled together version of OBS too
[18:54:55 CEST] <DHE> you should still be able to set standard values like "maxrate" as they're exposed generically by the options layer
[18:55:03 CEST] <MrSassyPants> DHE, doesn't work
[18:55:11 CEST] <BtbN> DHE, see https://github.com/obsproject/obs-studio/blob/master/plugins/obs-ffmpeg/obs-ffmpeg-output.c#L168
[18:55:25 CEST] <BtbN> they are for some reason calling ac_opt_set on priv_data. So no global options...
[18:55:42 CEST] <MrSassyPants> you can set "rate" as in -b:v
[18:55:42 CEST] <DHE> oh geez...
[18:55:50 CEST] <MrSassyPants> per a gui thing
[18:56:14 CEST] <DHE> maybe C++ has it right with "private" fields...
[18:56:33 CEST] <BtbN> Just open a bug with them.
[18:56:35 CEST] <MrSassyPants> but I'd rather define a maxrate (so my HDD doesn't get overloaded when recording explosions) and rely on ABR or target constquality or whatevs
[18:56:50 CEST] <BtbN> If I'm not missing something, all that's needed to fix it is to remove the "->priv_data" there.
[18:56:57 CEST] <MrSassyPants> the bug is essentially that hevc_nvenc is not yet considered a supported codec
[18:57:15 CEST] <BtbN> No, the bug is that they use a private field.
[18:57:21 CEST] <MrSassyPants> I have to access it through the generic option on a specifically cobbled together custom obs
[18:57:39 CEST] <MrSassyPants> well can one of you guys open that? I'm way out of my field there
[18:57:42 CEST] <BtbN> OBS can't sensibly support HEVC, as rtmp does not support it. So you can't stream it. Nothing would be able to play it either.
[18:57:59 CEST] <MrSassyPants> and explaining "you shouldn't be using this function, you should be using that function" is also much better if you're doing it o_o
[18:58:21 CEST] <BtbN> They don't appear to have an issue tracker on GitHub anymore
[18:58:41 CEST] <MrSassyPants> most browsers don't support HEVC, streaming it doesn't make much sense at this point, twitch doesn't support it...
[18:58:50 CEST] <MrSassyPants> It's great for recording though
[18:59:18 CEST] <MrSassyPants> as in, recording high quality footage in parallel (or in stead) of streaming, editing/uploading that later
[18:59:33 CEST] <BtbN> Does it even have any benefits? nvenc can't be that much better at hevc than h264
[18:59:52 CEST] <MrSassyPants> because the limiting factor is literally the hard drive bandwidth, when lots of explosions are going on, the 5400rpm HDD gets overloaded
[19:00:10 CEST] <MrSassyPants> so I gotta write to the SSD, BUT if I record like 50gb of stuff a day, that's going to wear down the SSD
[19:00:40 CEST] <BtbN> Your HDD can't sustain 50~100Mbit/s?
[19:00:48 CEST] <MrSassyPants> it can sustain 50-100mbit
[19:01:04 CEST] <MrSassyPants> high quality 4k footage with explosions exceeds that
[19:01:12 CEST] <BtbN> 4K...
[19:01:16 CEST] <MrSassyPants> exceeds 50-100mBYTE
[19:01:22 CEST] <BtbN> I highly doubt that
[19:01:38 CEST] <BtbN> Why would 4 times the pixels need 8 times the bandwidth?
[19:01:40 CEST] Action: kepstin notes that on a 500gb ssd, 50gb/day is 0.1 drive writes per day, which is within spec for most consumer ssds
[19:02:02 CEST] <MrSassyPants> twitch allows CBR 6mbyte/s at 1080p at 60fps
[19:02:07 CEST] <MrSassyPants> it looks like ass
[19:02:17 CEST] <MrSassyPants> even with the highest quality encodery
[19:02:22 CEST] <BtbN> 6 Mbit
[19:02:26 CEST] <BtbN> per second
[19:02:28 CEST] <MrSassyPants> mBYTE
[19:02:29 CEST] <BtbN> no
[19:02:44 CEST] <MrSassyPants> I'm uploading to twitch daily these days
[19:02:47 CEST] <kepstin> https://stream.twitch.tv/encoding/ says 6000 kbps
[19:02:53 CEST] <BtbN> You are still getting bits and bytes confused.
[19:02:58 CEST] <MrSassyPants> yeah they mean 6 megabyte per second
[19:03:00 CEST] <kepstin> kbps = kilo-bits per second
[19:03:02 CEST] <BtbN> no they don't
[19:03:21 CEST] <BtbN> a 6MByte/s stream would be slightly insane, that's like 500 Mbit or so
[19:03:35 CEST] <BtbN> *50
[19:03:53 CEST] <MrSassyPants> ok maybe
[19:04:09 CEST] <MrSassyPants> Anyhow I found the problem to be the hard drive bandwidth
[19:04:20 CEST] <kepstin> MrSassyPants: for historical reasons, all codec bitrates are measured in bits
[19:04:24 CEST] <MrSassyPants> ok
[19:04:34 CEST] <MrSassyPants> yeah you're right
[19:04:37 CEST] <MrSassyPants> it's 6mbit
[19:05:01 CEST] <furq> if your hard drive can't sustain 50mbps then it's probably failing really badly
[19:05:06 CEST] <furq> or you're writing other stuff to it at the same time
[19:05:08 CEST] <MrSassyPants> anyhow, the write buffer obs/ffmpeg uses is very small
[19:05:17 CEST] <MrSassyPants> and nvenc is still jank
[19:05:35 CEST] <MrSassyPants> high bitrates cause frame loss
[19:05:51 CEST] <kepstin> note that about the highest bitrate i've seen is ultra-hd bluray, which maxes out at around 100mbit/s with all streams combined.
[19:06:13 CEST] <MrSassyPants> it works on the SSD (for muc higher bitrates) but when I found myself uploading 60gb in one day I decided I need to stop wearing it down
[19:06:29 CEST] <BtbN> 60gb a day is pretty much nothing for an SSD
[19:06:52 CEST] <MrSassyPants> the "omg the SSD is gonna wear down if you write 20gb a day for a year" thing people used to be afraid of
[19:06:57 CEST] <kepstin> (100mbit/s is around 12mbyte/s, which will leave a 5400 rpm hard drive mostly idle when doing linear writes)
[19:07:00 CEST] <MrSassyPants> because nobody actually writes 20gb to a drive every day
[19:07:07 CEST] <furq> it depends how cheap the ssd is really
[19:07:24 CEST] <furq> those new cheapo qlc ssds last a lot less long
[19:07:30 CEST] <MrSassyPants> kepstin, yes, it shouldn't bother the HDD, but somebody forgot to set a write buffer
[19:07:58 CEST] <MrSassyPants> additional information
[19:08:05 CEST] <MrSassyPants> it's also an encrypted drive?
[19:08:11 CEST] <kepstin> MrSassyPants: you honestly shouldn't need to, the os should be buffering those writes :/
[19:08:12 CEST] <MrSassyPants> as in dm-crypt
[19:08:16 CEST] <furq> could be cpu overhead then
[19:08:23 CEST] <kepstin> what os?
[19:08:29 CEST] <furq> if it happens when your game gets overly busy
[19:08:33 CEST] <MrSassyPants> kepstin, it should, but in this case we're talking nvenc, which probably does weird things
[19:08:55 CEST] <MrSassyPants> like straight from asic to memory via pci-e or something
[19:09:26 CEST] <MrSassyPants> It's jank AF and obs barely knows what they're doing either
[19:10:25 CEST] <MrSassyPants> and hevc is not high on their priority list
[19:10:41 CEST] <MrSassyPants> because it's not really a web streaming encoding
[19:13:56 CEST] <BtbN> There is zero difference for obs and ffmpeg if the packets are coming from h264_nvenc or hevc_nvenc. Or libx264. It works the exact same for all of them.
[19:14:15 CEST] <MrSassyPants> I'm not sure that's true
[19:14:33 CEST] <BtbN> If you say so...
[19:14:53 CEST] <BtbN> They both output bitstream in system ram. And the same muxer code generates what's written to disk from it.
[19:14:58 CEST] <MrSassyPants> I mean for starters, obs actually supports h264_nvenc and libx264
[19:15:22 CEST] <BtbN> That only means it has hardcoded option-mappings for them, nothing more.
[19:15:23 CEST] <MrSassyPants> while for hevc_nvenc I have to use the generic custom option
[19:16:53 CEST] <MrSassyPants> I had a mysterious problem at high (constant quality/variable bitrate) settings with hevc, recordings would turn into white mosaics periodically, and it seemed to get worse the higher the quality/bitrate went
[19:17:33 CEST] <MrSassyPants> Someone had the idea it was hdd write lag breaking the stream somehow and thus I tried on the SSD and there it didn't happen
[19:17:45 CEST] <MrSassyPants> jank
[19:18:06 CEST] <MrSassyPants> but a (working) maxbitrate setting would almost certainly be preferrable
[19:20:49 CEST] <kepstin> if you've got other things doing io on the hdd that could cause issues, sure
[19:21:06 CEST] <kepstin> any sort of mixed io causes hdd performance to absolutely plummet.
[19:21:30 CEST] <jpb> ok, done - comments, criticism welcome (flames to /dev/null, plz) : https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos%20using%20xstack
[19:25:50 CEST] <kepstin> heh, that reminds me, i was planning to make an automatic video mosaic filter at some point (you just give it N inputs and an output video size, and it scales and fits them automatically). I should finish that at some point...
[19:28:13 CEST] <a90c> hi is there a way to extract .srt file from mp4?
[19:32:01 CEST] <kepstin> a90c: if the mp4 file contains text subtitles in a format that ffmpeg understands, it should be as simple as "ffmpeg -i input.mp4 output.srt"
[19:32:19 CEST] <kepstin> (you may need to use additional options to select the correct stream if there are multiple)
[19:32:39 CEST] <jpb> kepstin:  i'd be happy to write that up as well ;-)
[19:35:17 CEST] <a90c> kepstin: yes i tried it. i guess its format that ffmpeg could not understand.
[19:35:56 CEST] <phobosoph> ffmpeg is awesome! it can do so much more than mpeg, its name is due to historical reasons,rgith?
[19:40:04 CEST] <kepstin> a90c: if you could pastebin the console output of "ffmpeg -i file.mp4" for your file, we might be able to help more.
[19:40:16 CEST] <a90c> ok
[20:26:32 CEST] <norbert> hi folks, question: I use -threads 2 but noticed the CPU usage is still going to around 350%; is this intended behavior? or perhaps I should use another command-line parameter?
[20:30:27 CEST] <norbert> (this is when mp4 transcoding)
[20:30:57 CEST] <furq> -threads is specific to one input or output
[20:31:14 CEST] <furq> so if you set it as an output option then any decoding and filtering aren't constrained by it
[20:33:58 CEST] <norbert> furq: do you mean I'd need to use something like "ffmpeg -threads 1 -i in.avi -threads 1 out.mp4" to get 2 threads? (1 for in, 1 for out)
[20:37:21 CEST] <norbert> I'm using it after -i, so for the output, which according to https://superuser.com/questions/792525/how-to-change-ffmpeg-threads-settings#comment1034226_792609 is correct
[20:37:28 CEST] <norbert> strange that the input would cause such high CPU loads
[20:42:15 CEST] <kepstin> norbert: note that if you want to limit cpu usage you should do so using something external to ffmpeg, e.g. cpu affinity mask or cgroup cpu quota
[20:44:08 CEST] <norbert> ok, I see
[20:44:56 CEST] <norbert> like "cpulimit -l 50 ffmpeg ..."
[20:45:06 CEST] <norbert> and then get rid of the -treads I previously used
[20:46:02 CEST] <kepstin> it probably still makes sense to use a -threads option (probably around the same as the number of threads you're making available to ffmpeg) since the auto-detection might try to match the number of cpus in your system, which could mean there's too many threads.
[20:46:45 CEST] <kepstin> (and stuff that doesn't use autodetection, like libvpx, won't be multithreaded at all unless you have a -threads option)
[20:46:59 CEST] <norbert> ok
[20:49:14 CEST] <furq> -threads is advisory when you're using an external library for encoding anyway
[20:49:23 CEST] <furq> what that library does with it is up to the library
[20:49:41 CEST] <furq> e.g. x264 will use extra threads for lookahead
[20:51:33 CEST] <kepstin> i don't think the 'cpulimit' tool will really do what you want, it looks like it's designed in the days of single-cpu systems and it doesn't make use of any kernel features for cpu control (it just sends sigstop/sigconf to the process)
[20:51:40 CEST] Action: kepstin would not recommend using it
[20:52:47 CEST] <norbert> kepstin: hm
[20:53:56 CEST] <norbert> "nice" then?
[20:55:23 CEST] <norbert> are you sure cpulimit isn't suitable, it's mentioned a lot on sites such as stackexchange
[20:58:20 CEST] <kepstin> cpulimit probably works ok on single-threaded processes, i guess.
[20:58:59 CEST] <DHE> there's cpu throttling in the `cpu` cgroup on linux
[20:59:43 CEST] <DHE> if you need to throttle a single-threaded application
[20:59:43 CEST] <DHE> like, even when the CPU is idle you want it to sleep a lot
[20:59:43 CEST] <kepstin> repeating myself, my suggestions were either to use a cpu affinity mask or cgroup cpu quota
[21:01:17 CEST] <kepstin> the former will limit cpu usage by only allowing the process to run on a set number of cpu threads, which works well for "limit to 200%" case; the later lets you tell the cpu scheduler how much cpu time the process is allowed to execute.
[21:05:10 CEST] <norbert> a CPU affinity mask would require me to write a C program?
[21:05:18 CEST] <norbert> I'm calling ffmpeg from PHP
[21:06:38 CEST] <norbert> I feel inclined to simply use "nice -19 ffmpeg ..." instead of trying to limit CPU usage
[21:07:45 CEST] <kepstin> is this a cli tool? a web service? what else is running on the system that makes you want to limit ffmpeg cpu usage anyways?
[21:10:00 CEST] <norbert> it's a LAMP-like system, so I want Apache and such to keep serving pages quickly while ffmpeg does its job in the background
[21:10:40 CEST] <norbert> the PHP file that calls ffmpeg is a simple encode.php script
[21:11:12 CEST] <norbert> (well, 'simple', it's not something I can convert to something else easily)
[21:12:52 CEST] <kepstin> sounds like you should be using a background jobs queue, then you could do something like apply cpu limits in the systemd service that starts the queue worker
[21:13:04 CEST] <kepstin> pretty straightforwards then.
[21:13:25 CEST] <norbert> I don't know anything about systemd
[21:13:50 CEST] <norbert> it is a queue, and there's a cronjob checking if transcoding is necessary
[21:32:23 CEST] <Retal> Hello guys, I have transcode command:
[21:32:23 CEST] <Retal> ffmpeg -hwaccel cuvid -c:v mpeg2_cuvid  -i INPUT -vf hwdownload,format=nv12,hwupload_cuda -preset fast -acodec aac -ar 44100 -ac 2 -b:a 96k -vcodec h264_nvenc -b:v 3500k -maxrate 5000k -bufsize 7000k -g 150 -qmin 1 -qmax 50 -f flv OUT
[21:32:23 CEST] <Retal> When i addin deinterlace command -vf yadif, transoding doesn't start
[21:37:22 CEST] <kepstin> Retal: please share the complete failing command and the console output
[21:38:04 CEST] <kepstin> but I can probably guess the issue - you can only have one video filter pipeline, so if you add a second -vf it overwrites the previous one
[21:38:41 CEST] <kepstin> you need to add the yadif filter inside your existing -vf option (and at a point where the video frames are in system memory)
[21:42:50 CEST] <Retal> kepstin: https://pastebin.com/prD8dkPn
[21:43:16 CEST] <kepstin> yep, exactly as i thought.
[21:44:06 CEST] <Retal> so it shuld be like : -vf yadif,hwdownload,format=nv12,hwupload_cuda ?
[21:47:00 CEST] <Retal> tryed, doesnt work
[21:52:31 CEST] <Kobaz> so i'm trying to convert wmv to 264   ffmpeg -i 9995.16954.1570326624.77208.1.wmv -c:v libx264 output.mp4
[21:52:46 CEST] <Kobaz> the wmv plays fine... the resulting mp4/264  is really choppy
[21:53:06 CEST] <Kobaz> like it'll freeze at 6 seconds, 9 seconds, the video just stops for a bit and then resumes
[21:57:34 CEST] <kepstin> Retal: repeating myself "a point where the video frames are in system memory"
[21:57:50 CEST] <kepstin> Retal: so after the hwdownload filter, since that's the filter that downloads frames to system memory
[22:00:24 CEST] <Retal> kepstin: thank you so much, it works!
[22:12:02 CEST] <Retal> guys what mean -g 150?
[22:20:12 CEST] <kepstin> Retal: it's documented here: https://www.ffmpeg.org/ffmpeg-codecs.html#Codec-Options - sets the GOP size
[22:20:23 CEST] <kepstin> (roughly, keyframe interval)
[22:26:57 CEST] <Retal> kepstin: in my command i have -g150, when i remove it i think trascoding quality is  better, but maybe i am wrong
[22:28:02 CEST] <kepstin> Retal: i have no idea what the default is with nvenc. But in general, when you're encoding with bitrate then having a longer keyframe interval will increase quality
[22:28:25 CEST] <kepstin> because keyframes are big (use lots of bit), having fewer of them means more bits for other stuff
[22:29:33 CEST] <kepstin> but having longer keyframe interval means seeking in the file is slower, and recovery from errors (e.g. lost frame when streaming) takes longer.
[22:29:37 CEST] <Retal> kepstin: thank you
[22:41:45 CEST] <auser0> i have a string that has a dict in it and named x = [{'number': '717*****, 'name': 'Ed Mxxxx', 'flat': 7, 'street': 'Whxxxx'}] , i want to get the x['name'] without the Mxxx part, how can i do this?
[22:42:00 CEST] <auser0> oh wrong channel
[22:42:18 CEST] <kepstin> i was gonna say... :)
[22:42:32 CEST] <auser0> sure :)
[22:42:34 CEST] <auser0> how haha?
[22:43:02 CEST] <kepstin> auser0: btw, don't split peoples names on whitespace, it's not uncommon for people to be referred to by multiple names in normal speech.
[22:43:48 CEST] <auser0> ya i agree
[22:46:41 CEST] <norbert> well, thanks for all the info; gotta go
[22:46:44 CEST] <norbert> :)
[00:00:00 CEST] --- Wed Oct  9 2019


More information about the Ffmpeg-devel-irc mailing list