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

burek burek021 at gmail.com
Tue Nov 6 03:05:02 EET 2018


[00:02:04 CET] <limbo_> furq: If you can suggest some settings, I'm all ears. Burning in subtitles optionally. I currently use mpv to do this (slowly) because everything else I tried fails on embedded fonts. (that aren't also on the system)
[00:02:37 CET] <limbo_> Which is most of the re-encoding I do, most other things a PS4 can play. Even without remuxing out of mkv.
[00:07:33 CET] <furq> i don't think attached fonts are supported by any of the hardsubbing filters in lavfi
[00:07:45 CET] <furq> also i take it that you actually need the styling so you can't just use an external srt
[00:07:51 CET] <kepstin> my impression was that ffmpeg can burn in subtitles including fonts if you use the "subtitles" filter.
[00:07:56 CET] <kepstin> and give it the mkv file as input
[00:08:11 CET] <furq> https://github.com/libass/libass/issues/266
[00:08:52 CET] <kepstin> huh.
[00:08:57 CET] <nicolas17> IIRC in closed captioning on TV you get two (or more?) lines that scroll, when a new line appears, what used to be the last line scrolls up to make space
[00:09:01 CET] <nicolas17> what subtitle format supports that?
[00:09:24 CET] <furq> i've never actually tried it but the subtitles filter doesn't call ass_set_fonts after ass_process_codec_private
[00:09:30 CET] <furq> so i assume it doesn't work
[00:09:58 CET] <kepstin> nicolas17: you can fake it with most formats if your renderer has good timing, just have one sub say "line1 / line2" then the next "line2 / line3"
[00:10:27 CET] <kepstin> nicolas17: in theory webvtt specifies this sort of thing, in practice i've haven't seen it implemented.
[00:10:28 CET] <furq> also my favourite kind of bug report is one where one of the main contributors says "this should be easy to fix" and then nothing happens for two years
[00:10:52 CET] <nicolas17> I think Apple's video player supports that in webvtt
[00:11:26 CET] <furq> also i've seen that faked with srt and it was incredibly annoying
[00:12:14 CET] <kepstin> I was playing around with trying that for a web video player caption generation tool, and just doing them normal subtitle style was way less annoying, yeah.
[00:12:54 CET] <furq> it makes sense for live subtitling because the timing is screwed up there anyway
[00:12:54 CET] <nicolas17> the truth is that I want to overlay a synced chat log on a video ^^ maybe I should render it myself and then overlay
[00:12:59 CET] <furq> so you just want everything on screen as long as possible
[00:14:41 CET] <furq> you could probably do something like that with ass
[00:14:49 CET] <furq> but it sounds easier to just render and overlay
[02:33:02 CET] <mixfix41> nicolas17: could subtitle editor work for tha?
[02:33:13 CET] <mixfix41> that application does everything i need
[02:33:59 CET] <mixfix41> oh with an srt file that is
[05:27:09 CET] <mixfix41> its actually difficult for me to use handbrakecli but i think the gui is good
[05:28:24 CET] <furq> handbrake is ok but make sure to never use decomb because it's terrible
[05:35:04 CET] <mixfix41> heh heh
[06:19:11 CET] <KombuchaKip> What is the equivalent to avformat_open_input(), but to open from a file loaded in memory?
[06:21:28 CET] <nicolas17> I think that needs "custom IO"
[06:21:36 CET] <KombuchaKip> nicolas17: Ok
[06:22:04 CET] <nicolas17> documentation for avformat_open_input says "If you want to use custom IO, preallocate the format context and set its pb field."
[06:22:14 CET] <xiando> I'm trying to into VP9 encoding and I tried: ffmpeg -i gyongree-171129_downpour.mp4 -threads 8   -c:a opus -b:a 192k   -strict experimental   -c:v libvpx-vp9 -crf 33 -b:v 0 test.webm   <- while it makes a file it only uses one core and takes ages.
[06:22:20 CET] <xiando> How can I into multi-core VP9 encoding?
[06:22:51 CET] <furq> with difficulty
[06:23:00 CET] <furq> i think -row-mt 1 should be all you need these days
[06:23:07 CET] <furq> but if you have an older libvpx then it's a huge pain
[06:23:40 CET] <KombuchaKip> nicolas17: Like so? https://stackoverflow.com/a/20610535
[06:26:30 CET] <xiando> furq: uhm.. -row-mt 1  did work and now it puts most cores under 20-30% load. instead of 0.64x I get 0.84x on that very low-resolution file.
[06:26:47 CET] <furq> yeah libvpx has bad multithreadnig in general
[06:28:45 CET] <furq> if it's low resolution then that's probably the reason
[06:28:57 CET] <furq> it only works effectively on high res sources
[06:29:58 CET] <furq> you might want to try explicitly setting -threads, idk if that's still necessary
[06:30:02 CET] <furq> the docs for vpx are pretty bad
[06:30:36 CET] <nicolas17> furq: the command he posted had -threads 8
[06:30:51 CET] <furq> so it did
[06:30:59 CET] <furq> i guess it's just going to be slow then
[06:31:01 CET] <xiando> tried a 1080p, puts a bit more load accross cores but not near 100%, more like 60%. Still, it's an improvement
[06:31:15 CET] <xiando> speed is like 0.22x
[06:32:06 CET] <furq> you can set -cpu-used if you want to make it fast
[06:32:06 CET] <furq> er
[06:32:09 CET] <furq> but it'll reduce the quality
[06:33:46 CET] <xiando> I must have quality, I can't have blurry kpop
[06:34:32 CET] <furq> i take it you're doing this to upload it somewhere
[06:34:38 CET] <furq> otherwise i'd just leave it as h264
[06:34:38 CET] <KombuchaKip> nicolas17: Like so? https://stackoverflow.com/a/20610535
[06:35:21 CET] <nicolas17> I guess? I never did it
[06:35:52 CET] <xiando> no my tablet can't have files bigger than 4 GB since it can't ext4 the SD card for some reason so I must reduce 6-7GB files to below 4 with quality. So I can use HEVC or VP9
[06:36:01 CET] <xiando> I'm not sharing.
[06:36:16 CET] <KombuchaKip> nicolas17: Ok
[06:37:11 CET] <nicolas17> exfat?
[06:38:39 CET] <xiando> it's one that says it only supports 32 GB SD cards but if I format 64 GB cards as FAT they work fine
[06:39:06 CET] <xiando> I guess I could buy a new one but I don't want to
[06:39:22 CET] <nicolas17> how big is the SD card?
[06:39:30 CET] <xiando> 64GB
[06:39:42 CET] <nicolas17> did you try formatting it as exfat?
[06:40:03 CET] <nicolas17> it should support files bigger than 4GB
[06:40:51 CET] <xiando> I'm fairly sure the card was exfat when I got it. The tablet doesn't "support" cards bigger than 32 GB
[06:41:00 CET] <xiando> which is why I had to mkfs.vfat it to make it work
[06:41:07 CET] <xiando> it's a thing with older technology
[06:41:32 CET] <nicolas17> and i guess you don't want to split it into two video files?
[06:41:56 CET] <furq> yeah i would just split it
[06:42:00 CET] <xiando> Now there's a simpler solution isn't it
[06:42:19 CET] <furq> there's no way to reencode it to <4GB with good quality without spending days
[06:42:42 CET] <furq> x265 is quicker than libvpx though fwiw
[06:42:47 CET] <furq> since it actually has frame multithreading
[06:43:12 CET] <furq> but it's still extremely slow at high quality settings
[06:44:55 CET] <xiando> yeah it takes hours with x265, quicker than vp9 but splitting the file took seconds
[06:45:08 CET] <nicolas17> uh how did you split it?
[06:45:44 CET] <xiando> avidemux-qt, just opened it, selected first half, save, selected second half, saved that, done
[06:46:31 CET] <xiando> file operations are quick on raid ssds
[06:46:47 CET] <nicolas17> ah nice :D
[06:46:51 CET] <nicolas17> I'm still on spinning rust
[06:48:00 CET] <xiando> what, there's a big difference for opening programs and everything, just get a SSD as OS disc, seriously. prices are going down and will go down more the coming months due to oversupply
[06:48:13 CET] <xiando> we're talking $30 for 240GB
[06:54:15 CET] <furq> mkvmerge can split by size
[06:54:25 CET] <furq> --split size:4g
[06:55:02 CET] <nicolas17> I'd have done like
[06:55:25 CET] <nicolas17> ffmpeg -i gyongree-171129_downpour.mp4 -t 1:00:00 -codec copy part1.mp4
[06:55:31 CET] <furq> there's no particularly nice way to do it with ffmpeg
[06:55:39 CET] <furq> without working backwards from how long the file is
[06:55:55 CET] <nicolas17> yeah, I'd have just split it in half by time :P
[06:56:22 CET] <furq> also if you did do it with ffmpeg you should use the segment muxer
[08:46:44 CET] <KombuchaKip> Could anyone with knowledge of custom AVIOContext usage kindly provide a code review? I have attempted to implement my own AVIOContext for reading media from memory instead of disk. I just want to make sure this is performed correctly. https://pastebin.com/KA7s4bJs
[08:50:09 CET] <squ> what is return type of distance
[08:50:58 CET] <squ> it is assigned to pointer to char in one function
[08:51:05 CET] <squ> and compared to int64 in another
[08:51:51 CET] <squ> if should have space
[08:52:17 CET] <squ> pointer to char is compared with 0
[08:58:35 CET] <KombuchaKip> squ: Thank you. I will take a look tomorrow.
[09:45:20 CET] <beauty> hello
[09:45:27 CET] <beauty> can i connect
[10:41:46 CET] <spaam> beauty: i think so.
[12:07:39 CET] <gaara4896> quick question, how long does it take for you guys computer to compile ffmpeg library? And what is your spec?
[12:16:56 CET] <beauty> two minutes
[12:17:00 CET] <beauty> twenty
[12:54:12 CET] <skident> Hi there
[12:56:42 CET] <skident> I'm trying to use audio filters for audio stream (applying them on the fly). After using some of these filters I got cut sound (sounds like part of audio was lost).
[12:57:19 CET] <skident> For example loudnorm work as I described above
[12:59:41 CET] <spaam> gaara4896: ~90s on macbook pro with i9 and running with -j12  with only configure without any options.
[13:09:52 CET] <gaara4896> spaam: That was fast
[13:10:57 CET] <gaara4896> spaam: Do we need to specify -j12? I put only make, and it seems like it not utilizing all the core, and i have a 6 core processor too, and it took me quite a while
[13:11:18 CET] <gaara4896> I read online says without putting anything will spawn unlimited worker
[13:12:45 CET] <Ke> make -j is unlimited parallelism
[13:12:58 CET] <TheAMM> make -j is webscale
[13:13:00 CET] <Ke> I use make -j$(nproc)
[13:13:29 CET] <Ke> but what is best heavily depends on circumstances
[13:13:37 CET] <Ke> might be nproc + 1
[13:15:22 CET] <gaara4896> I change to just -j, and its so freaking fast now...
[13:19:27 CET] <Ke> -j is known to cause problems on large compiles, like distro kernels
[13:19:49 CET] <Ke> running out of memory etc.
[13:22:54 CET] <gaara4896> Ke: Just some thought experiment, if you have threadripper with 4GB ram and doing -j$(nproc+1) might get you out of memory right? Haha
[13:24:10 CET] <Ke> gaara4896: depends a lot on, what you are compiling
[13:24:26 CET] <Ke> C++ with debug symbols is a lot heavier than C without
[13:25:27 CET] <gaara4896> But not people gonna pair 32core processor with 4GB ram I guess
[13:43:05 CET] <BtbN> If you have a threadripper and only install 4GB RAM you have failed setting your priorities.
[13:43:32 CET] <BtbN> I usually aim for at least 4GB of RAM per core, ideally 8GB+
[14:12:06 CET] <dfhh> hello
[14:12:15 CET] <dfhh> hhh
[14:12:28 CET] <dfhh> can i connect
[16:22:43 CET] <kishmesh> hi. when trying to parse an mp3 file I see a message "header missing" Format mp3 detected only with low score of 1, misdetection possible!
[16:22:55 CET] <kishmesh> what could be wrong and how to fix this?
[16:24:25 CET] <kishmesh> basically this issue https://superuser.com/questions/827970/ffmpeg-mp3-file-header-restore
[16:25:58 CET] <kishmesh> als this bug it seems https://trac.ffmpeg.org/ticket/5689
[16:30:59 CET] <kishmesh> similar with the same file as m4a I get "moov atom not found"
[16:43:22 CET] <limbo_> kishmesh: you're missing the metadata section of the file, with mp4 files it's at the end. Either that, or it's not actually the format you think it is.
[17:05:02 CET] <kishmesh> limbo_: thank you I figured it out. it was a file format problem.
[20:21:13 CET] <puchu> hi
[20:21:37 CET] <puchu> how can i convert an audio file (aac 2ch 44100Hz) to aac 2ch 48000Hz
[20:23:32 CET] <kepstin> puchu: in general, don't - the lossy transcode will lose quality and that sort of resampling can normally be done by the player if needed. But if you have to, you can use the "-ar" output option in ffmpeg to tell it to resample when re-encoding.
[20:24:01 CET] <puchu> kepstin: i want to merge two files with mkvmerge but i get
[20:24:10 CET] <puchu> The sample rate of the two audio tracks is different: 48000 and 44100
[20:24:39 CET] <puchu> kepstin: so i have to change it to get i merged. or do you have another idea to force mkv to merge it
[20:25:24 CET] <puchu> kepstin and where can i find a would documentation for ffmpeg? the man page seems to miss a lot of stuff
[20:25:37 CET] <puchu> like list all available codecs with options
[20:27:59 CET] <puchu> ahh found it ffmpeg -codecs
[20:29:45 CET] <kepstin> adjusting the sample rate to allow concatenating files is a case where it makes sense
[20:30:46 CET] <kepstin> ffmpeg has a builtin aac encoder (named "aac") that works ok, but if you have a build with fdk_aac available it'll probably give better quality at the same size
[20:41:16 CET] <puchu> kepstin: thanks
[20:41:37 CET] <puchu> kepstin is there a way to list all available options for a specific codec?
[20:43:02 CET] <kepstin> there's a bunch of generic options available that apply to many codecs, e.g. bitrate
[20:43:11 CET] <kepstin> and some codec specific ones
[20:43:19 CET] <kepstin> no general way to get the full list
[20:43:50 CET] <kepstin> for aac, just set a bitrate (-b:a) and that's probably enough
[20:44:42 CET] <puchu> sucks a bit that there is no way to get a full list
[20:44:45 CET] <puchu> thanks for your help
[20:45:55 CET] <kepstin> for codec specific options, use " ffmpeg -h encoder=<codecname>"
[20:46:07 CET] <kepstin> for general options,... read the ffmpeg man page :/
[20:50:50 CET] <puchu> kepstin: thanks
[22:16:14 CET] <No0n3Left> Anyone have suggestions on converting between h264 in a mkv and theora in an ogg? Got the audio part fine, as its just copying an opus stream from the mkv, but the video conversion is quite horrid. Not only did it take 10 minutes for a 4 minute video (which isnt horrid really), it just doesnt render correctly. There are so many visual glitches from the conversion, and lots of laggy frames. The original
[22:16:22 CET] <No0n3Left> h264 was 60fps, and mpv says the theora is also 60fps, but it looks more like a 15fps minimum quality jpeg slideshow. I just used the flags -vcodec theora -acodec copy, any suggestions on how to get better quality?
[22:17:38 CET] <JEEB> No0n3Left: the theora encoder is notorious for dropping frames when it can't hit your bit rate
[22:20:33 CET] <nicolas17> and you didn't set a bitrate
[22:20:41 CET] <nicolas17> so maybe it's doing 200kb/s or something stupid
[22:20:59 CET] <JEEB> the default in AVCodecContext for bit rate is indeed 200kbps for hysterical raisins
[22:21:05 CET] <No0n3Left> It is, what bitrate would you suggest? Dont know much about bitrate
[22:21:15 CET] <JEEB> or you just use some quantizer
[22:21:20 CET] <JEEB> if theora supports that
[22:28:10 CET] <dualz> Using anullsrc and testsrc as my inputs I'm getting very high FPS in my output. I set rate on testsrc to 30 and still no avail
[22:28:13 CET] <dualz> https://gist.github.com/ryanmarin/7adbfec209c359296eb5dbfb4df96f9e
[23:19:21 CET] <kepstin> yeah, just don't use theora if at all possible
[23:19:40 CET] <kepstin> pretty much no reason to nowadays, vp8 (or even 9) is almost always a better choice
[00:00:00 CET] --- Tue Nov  6 2018


More information about the Ffmpeg-devel-irc mailing list