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

burek burek021 at gmail.com
Mon Feb 23 02:05:02 CET 2015

[00:52] <Maverick|MSG> anyone care to share their experience with encoding in x265 and then uploading the videoto YouTube? Works?  Doesn't work?
[00:53] <BtbN> What's the point of that? Even if youtube did accept it, they would transcode it to h264/vp8.
[00:53] <JEEB> no idea how old FFmpeg they're using regarding HEVC decoding
[00:53] <Maverick|MSG> well more in terms of, if you encode a video in x265 will YouTube accept the upload?
[00:54] <BtbN> try it?
[00:54] <Maverick|MSG> haven't had a chance to try it yet, hence the question
[00:54] <Maverick|MSG> if no one has any experience I'll give it a go later tonight
[00:54] <BtbN> There is no benefit to it though. Smaller upload size, but encoding h265 propably takes longer than uploading a slightly larger h264 video
[00:55] <Maverick|MSG> x265 is more processor-cycle hungry?
[00:56] <BtbN> It takes more CPU power to decode than x264 takes to encode.
[00:56] <BtbN> Encoding uses even more
[00:57] <Maverick|MSG> any idea how much more?
[00:57] <BtbN> I think a modern desktop CPU can do maybe 10 FPS for 1080p
[00:57] <BtbN> Not too sure about that though
[00:57] <BtbN> could be even slower
[00:58] <Maverick|MSG> hm, I guess I'll have torun some comparisons at different presets
[00:58] <JEEB> do note that x264 and x265 are developed by completely different people and that all the settings should in general be considered different
[00:58] <JEEB> because in most cases, they are
[00:58] <JEEB> also the CRF value range is completely different between the two
[00:59] <BtbN> If you reduce its quality to h264 level, you might get h264 speed. But there's no point in doing that.
[00:59] <JEEB> generally I've only seen x265 be useful at very slow configurations
[00:59] <Maverick|MSG> I'm 'battling' with a few other people about optimal x264 settings for uploading to youtube
[00:59] <Maverick|MSG> what crf value is the best, etc
[00:59] <Mavrik> crf 0, 4K.
[00:59] <JEEB> just fucking upload lossless (unless they're still broken about it)
[00:59] <JEEB> :P
[00:59] <Maverick|MSG> I was thinking that maybe x265 might be an option
[01:00] <JEEB> definitely not
[01:00] <BtbN> The best settings for youtube is propably the one that makes them use your upload without transcoding.
[01:00] <BtbN> those are documented somewhere
[01:00] <JEEB> those do not exist
[01:00] <Maverick|MSG> right now I'm using crf 18, but i'm not convinced that pushing it up to 23 will make a difference
[01:00] <JEEB> it was a bug
[01:00] <JEEB> youtube is supposed to re-encode *everything* you push there
[01:00] <Maverick|MSG> youtube encodes no mater what right?
[01:00] <BtbN> 18 is better quality than 23
[01:00] <Mavrik> yeah
[01:01] <JEEB> anyways, your limitation with the "source" quality should be your pipe
[01:01] <JEEB> if possible, use lossless
[01:01] <Mavrik> they'd be stupid to not reencode everything
[01:01] <JEEB> if not possible, drop as little as possible
[01:01] <BtbN> Well, entirely lossless isn't possible.
[01:01] <JEEB> why not?
[01:01] <BtbN> Youtube refuses to go above a certain file size
[01:01] <BtbN> tried to push a 300GB video there. It didn't like it.
[01:02] <JEEB> lol, are you sure you're talking about lossless compression here :P
[01:02] <Maverick|MSG> right, but after youtube encodes a video can a viewer differentiate between crf 18 (50MB) versus crf 23 (25MB)
[01:02] <Maverick|MSG> where 50 amd 25MB are the sizes of the uploaded file
[01:02] <Mavrik> Maverick|MSG, that is a rather non-sensical question
[01:02] <JEEB> I mean, long gops and x264 can do pretty good compression even with lossless
[01:02] <Mavrik> Maverick|MSG, because it depends on more than just crf.
[01:02] <BtbN> JEEB, well, it wasn't even lossless.
[01:02] <BtbN> Just nearly 200 hours
[01:02] <Maverick|MSG> likw what else Mavrik?
[01:02] <Maverick|MSG> *like
[01:03] <Mavrik> Maverick|MSG, like the actual content of the video.
[01:03] <Maverick|MSG> want me to post some test links to yt videos?
[01:03] <JEEB> BtbN, but they can do 20GB+ at least the last I looked into it. sure, with such special cases they might have some limitations
[01:03] <JEEB> although IIRC they had some service for lol big files
[01:03] <BtbN> yes, i split it up into 6 hours parts
[01:03] <Maverick|MSG> Mavrik they are all gameplay footage from QuakeLive
[01:03] <BtbN> those were no problem
[01:04] <BtbN> still took it multiple days to process every single one.
[01:04] <JEEB> yeah, seems like the limit is 128GB
[01:05] <JEEB> and I remember my badly compressed ffvhuff 1440x1080 things being 30GB for 24min
[01:05] <Mavrik> hmm, that sounds like their database limit
[01:05] <JEEB> so if you use some nicely compressing lossless like x264's you can get pretty good results out of that
[01:05] <JEEB> so it's definitely your pipe that starts to be the limit
[01:06] <JEEB> if you have a typical US broadband, then maybe you won't be uploading 1080p movies in lossless :P
[01:06] <Maverick|MSG> Mavrik https://www.youtube.com/watch?v=gBiyl23UkOg
[01:06] <BtbN> I can push with nearly 100MByte/s from my server to youtube
[01:06] <JEEB> yes, I was just making fun of US end-user broadband
[01:06] <BtbN> So 300GB wasn't a problem at all
[01:08] <JEEB> also somehow this reminded me of the time I asked a production company to send me a lossless copy of something to me
[01:08] <JEEB> then I get this huge mov file and wonder if the resolution is nice
[01:08] <JEEB> then I notice it's raw RGB in mov
[01:09] <JEEB> then later I learned how much professional tools hate non-raw lossless
[01:09] <JEEB> although nowadays you have plugins to output Ut Video from almost everything
[01:09] <JEEB> not the best compression, but still better than raw
[01:12] <BtbN> Well, but it was clearly lossless
[01:12] <JEEB> not sure if it was originally RGB though, so that's one thing that might have been unnecessary
[01:13] <JEEB> but this was one of those cases where just e-mailing a production company and honestly telling what sucked in their stuff led to results >_>
[01:14] <JEEB> (also it led to a certain clip being avaialable for testing purposes for x264 developers, although it did see only limited usage as such)
[01:19] <Maverick|MSG> so coming back to my original question, assuming that x265 isn't the way to go, what recommended settings should I use when encoding video game footage?
[01:19] <Maverick|MSG> right now I'm only focusing on the crf value
[01:20] <Maverick|MSG> but apparently I should focus on other settings(?)
[01:20] <JEEB> do 4:2:0 conversion on your side, and just fucking do lossless
[01:20] <DevMac> hi, i need help with ffmpeg + c# for streaming client windows to icecast linux server
[01:20] <Maverick|MSG> lossless creates gigantic files which I'd rather stay away from, if possible
[01:21] <JEEB> have you actually tried instead of thinking about "lossless" as "not compressed"?
[01:21] <DevMac> first i need send headers before send audio or video?
[01:22] <Maverick|MSG> I'm using crf of 18 right now, which according to the documentation is "lossless", right?
[01:22] <JEEB> no, it is not
[01:22] <DevMac> i need help please.
[01:22] <JEEB> never was, never will
[01:23] <Maverick|MSG> ok, so can you provide some further insight then?
[01:23] <JEEB> the exact crf value where something becomes visually lossless depends a) on the settings and b) on the actual content
[01:23] <JEEB> there is no magical value
[01:23] <JEEB> other than the lossless one :P
[01:23] <JEEB> anyways, optimizing the CRF really only makes sense when you are encoding for the end user role
[01:24] <JEEB> when you are encoding for another thing that's going to re-encode
[01:24] <Maverick|MSG> unfortunately in this case I'm attempting to do both
[01:24] <JEEB> then the only thing you should be thinking of is how to minimize conversions (as in, your stuff should already be in 4:2:0 YCbCr) and the best quality possible
[01:24] <JEEB> well that just fucking doesn't make sense :P
[01:24] <JEEB> you would never upload to youtube something you'd be offering yourself
[01:24] <JEEB> or via some CDN
[01:25] <JEEB> because for 'tube you want as good as possible, while for your CDN or whatever you just want to compress it as much as possible while looking alright
[01:25] <Maverick|MSG> most people downloading the videos are uploading them to youtube anyway
[01:26] <Maverick|MSG> so there isn't really a point in making two versions of the same video
[01:28] <JEEB> also if the video is supposed to be played from the CDN via network, then you have to constrain the stream with VBV (both maxrate _and_ bufsize)
[01:28] <Maverick|MSG> no cdn here
[01:28] <JEEB> well, whatever. your site or whatever you meant with that :P
[01:28] <JEEB> CDN is just a convenient short word
[01:29] <JEEB> basically, if you are making a file that is supposed to be played as-is via network, you have to constrain it and work for compression, rather than just being able to push the best piece of shit to a re-encoder
[01:29] <JEEB> while when you are pushing something to a re-encoder you just make sure the other side can fuck it up the least amount of times
[01:29] <Maverick|MSG> basically: I've got a video game which outputs the raw video which is piped into ffmpeg and then uploaded to youtube
[01:30] <Maverick|MSG> users optionally can download the encoded file before it gets uploaded to youtube so they can upload it to their own channel
[01:30] <JEEB> ok, so then it kind of makes sense to have both the same, because it's not really meant to be played via the network
[01:30] <Maverick|MSG> right
[01:31] <Maverick|MSG> I'm just trying to figure out the most practical settings for the encoder
[01:31] <JEEB> in any case, lossless with high compression and long gops would be my favourite but if that's not possible then just keep looking at the mix of preset/crf that is the best you can still use
[01:31] <JEEB> end of story
[01:31] <Maverick|MSG> I'm only using crf 18 at the moment, but I'm not experienced with ffmpeg enough to know any other tweaks
[01:32] <Maverick|MSG> with a preset of veryfast
[01:32] <JEEB> it's literally just using the slowest preset that is still fast enough for your use case and using the lowest crf that still is OK (for that specific content) size-wise
[01:32] <JEEB> also you can lengthen gops with -g
[01:32] <Maverick|MSG> ah, good to know
[01:32] <Maverick|MSG> what is the advantage of adjusting those?
[01:32] <JEEB> there was some specific value to set it to unlimited
[01:33] <JEEB> adjusting what
[01:33] <Maverick|MSG> the gops / iframe interval
[01:33] <JEEB> longer gops mean better compression
[01:33] <JEEB> the "unlimited" value for x264 is nice because it lets the encoder decide
[01:34] <JEEB> it will only start a new GOP when the encoder finds it being the optimal thing
[01:36] <Maverick|MSG> it was recommended to use the zerolatency tune, along with setting keyint to 30, bframes to 2, and b-adapt to 0
[01:36] <Maverick|MSG> any validity in that?
[01:36] <JEEB> uhhhh
[01:36] <Maverick|MSG> like I said, I don't have enough experience with ffmpeg to evaluate those settings as being good or bad
[01:36] <JEEB> zerolatency doesn't use b-frames to begin with
[01:36] <JEEB> so those two latter settings are meaningless
[01:37] <Maverick|MSG> http://www.esreality.com/post/2712581/#pid2712581
[01:37] <Maverick|MSG> from there
[01:37] <JEEB> I will not open that link
[01:37] <JEEB> no
[01:37] <JEEB> not going to do it
[01:37] <Maverick|MSG> ok, don't
[01:37] <JEEB> I've had enough stupid for this being awake
[01:37] <JEEB> zerolatency is only useful if and only if you care about the speed at which the frames pop out after you feed them into the encoder
[01:37] <JEEB> that is not the speed of encoding
[01:37] <JEEB> zerolatency is actually slower than settings without it
[01:38] <JEEB> it just makes sure the pictures pop out with the minimal latency, which is useful in live streaming, screen sharing and telecomms
[01:38] <Maverick|MSG> ok
[01:39] <JEEB> keyint is the gop max length, and 30 sounds like a streaming one
[01:39] <JEEB> because you want your watchers to get a picture relatively quickly
[01:39] <JEEB> so 30 either is ~one second or half a second
[01:39] <JEEB> for 30fps or 60fps
[01:40] <JEEB> it worsens compression of course, just like zerolatency
[01:40] <JEEB> also the two latter settings should never, ever be touched by themselves. you only touch the presets for speed/compression in general
[01:40] <Maverick|MSG> ok, I figured as much
[01:40] <JEEB> basically, unless you are live streaming you should never touch zerolatency or use super short gops
[01:41] <JEEB> both hurt compression
[01:41] <JEEB> short gops are useful in video editing but if you want compression you don't use them
[01:42] <Maverick|MSG> given that the video is of a video game with lots of motion in it, are there any other settings I should consider?
[01:42] <JEEB> x264 was made simple enough
[01:42] <JEEB> basically in your use case it's just the GOP length, preset and CRF value that you should care about
[01:43] <JEEB> since it's something that you'd put on 'tube I'd just max out the GOP with whatever is the way to set --keyint unlimited with ffmpeg's cli
[01:43] <JEEB> and using the slowest preset still fast enough for the use case
[01:43] <JEEB> and the lowest CRF still small enough for you :P
[01:44] <Maverick|MSG> the encoding is done as the video is output so I'm pretty processor limited given everything that is going on
[01:44] <DevMac> how is the error in EOF FFMPEG? End of file in command line ffmpeg?
[01:44] <Maverick|MSG> I typically have to use veryfast/superfast
[01:44] <JEEB> I understand, that's why I'm saying the slowest applicable to the use case :P
[01:44] <JEEB> instead of screaming for veryslow or something
[01:44] <Maverick|MSG> yup yup, gotcha
[01:45] <Maverick|MSG> I'm already dedicating about 6 cores to the entire process
[01:46] <Maverick|MSG> -x264opts keyint=0
[01:46] <Maverick|MSG> that should do the trick for the gops right?
[01:48] <JEEB> if zero is unlimited
[01:48] <JEEB> then yes
[01:48] <Maverick|MSG> if it isn't what should I set it to?
[01:48] <JEEB> I love it how I get my own IRC logs from 2013 when googling it :P
[01:49] <JEEB> also it wasn't unlimited but infinite
[01:50] <JEEB> keyint=infinite
[01:50] <JEEB> seems to work like that
[01:50] <Maverick|MSG> docs say that  a high gop will result in slightly more efficient compression, so that's encouraging
[01:50] <JEEB> you can check the command line output from libx264
[01:50] <JEEB> to make sure it was set to infinite
[01:51] <JEEB> it's the part that lists all the set libx264 parameters
[01:51] <JEEB> at the beginning of an encode
[01:51] <Maverick|MSG> gotcha
[01:52] <Maverick|MSG> earlier you mentioned 4:2:0 YCbCr, should I consider adjusting that as well?
[01:52] <JEEB> I'm pretty sure ffmpeg is picking that for you by default :P
[01:53] <Maverick|MSG> ok, just making sure
[02:11] <DevMac> i cant do broadcast with ffmpeg for icecast2 :( why? my error is "end of file"
[02:11] <DevMac> someone helpme please?
[02:43] <DevMac> bad forum :(
[02:58] <BtbN> So chrome does support streaming with mp4 segments. But not mpegts...
[06:36] <chchjesus> Hi friends
[06:36] <chchjesus> I have a question about video duration saying it is longer than it actually is
[06:36] <chchjesus> I'm trying to parse mkv video into a short webm clip
[06:37] <chchjesus> and I specify the time with -ss and -t
[06:37] <chchjesus> I'll give the command and output
[06:38] <chchjesus> here's the command and output: http://sprunge.us/hiVc
[06:38] <chchjesus> The first line being the command
[06:40] <chchjesus> The problem is that it keeps encoding even after it has gone past the specified duration
[06:41] <chchjesus> Until it reaches some arbitrary point
[06:43] <chchjesus> Could it possibly be because I am forcing the -b:v value?
[06:44] <relaxed> chchjesus: why are you changing the pts?
[06:45] <chchjesus> Isn't that how to seek in a subtitle file?
[06:45] <chchjesus> Also does -crf 4 even do anything?
[06:45] <chchjesus> I seems to make no difference
[06:45] <relaxed> for -crf 4 you would need to omit -b:v 5M
[06:46] <chchjesus> Yeah, I did that
[06:46] <chchjesus> Just now
[06:46] <relaxed> oh, libvpx
[06:46] <chchjesus> Are there problems with libvpx?
[06:46] <relaxed> no, "ffmpeg -h encoder=libvpx" says it supports -crf
[06:48] <relaxed> did you try, "ffmpeg -i input -ss <seek point> -to <end time> ..." without the setpts filter?
[06:48] <chchjesus> no
[06:48] <chchjesus> I'll try that now
[06:50] <relaxed> I don't know how ass subs are supposed to be handled with what you're doing.
[06:50] <chchjesus> We'll soon see
[06:50] <relaxed> if all else fails you could hardsub them
[06:50] <chchjesus> true
[06:50] <chchjesus> perhaps that's the better approach
[06:50] <chchjesus> That's the idea anyway
[06:50] <chchjesus> To hardsub them
[06:51] <chchjesus> Maybe it's worth doing multiple passes?
[06:51] <relaxed> you can do it in one
[06:51] <chchjesus> ARGH
[06:51] <chchjesus> Welp
[06:51] <chchjesus> Removing it doesn't help
[06:51] <chchjesus> As soon as it hit the 39 second mark
[06:51] <chchjesus> The time shot up to 13 minutes
[06:52] <chchjesus> now it's apparently 13 minutes long
[06:52] <chchjesus> Even though it's actually only 39 seconds
[06:52] <chchjesus> or 40 seconds
[06:52] <chchjesus> or what have you
[06:52] <chchjesus> >.<
[06:52] <chchjesus> You were correct though. That filter wasn't needed
[06:53] <chchjesus> However
[06:53] <chchjesus> http://sprunge.us/bNQN
[06:53] <chchjesus> Here's mpv output
[06:53] <relaxed> maybe it's including the duration of the entire subs?
[06:54] <chchjesus> Maybe
[06:54] <chchjesus> But it's a 25 minute episode
[06:54] <chchjesus> So wouldn't the subs track be longer, then?
[06:55] <relaxed> try, ffmpeg -i input.mkv -map 0:v -map 0:a -ss <seek point> -to <end time> -filter:v subtitles=input.mkv output.mkv
[06:55] <chchjesus> I want it to output to webm though
[06:56] <relaxed> ok, then change it to output.webm
[06:56] <chchjesus> I'll get back to it later
[06:56] <chchjesus> kik
[06:56] <chchjesus> lol
[06:56] <chchjesus> Thanks though.
[06:56] <chchjesus> I'll note down that command
[06:56] <relaxed> that will harsub that section but not include the internal ass subs in the output
[06:58] <chchjesus> Alright
[06:58] <chchjesus> running it now
[06:58] <chchjesus> There seems to be a delay at the start
[06:58] <chchjesus> Is that expected?
[06:58] <relaxed> er, it was converting the ass subs to webvtt
[06:59] <chchjesus> Oh, huh.
[06:59] <chchjesus> Interesting
[06:59] <relaxed> -ss after the input decodes to that point, before the input it seeks
[06:59] <chchjesus> lol
[06:59] <chchjesus> I see
[07:00] <chchjesus> I guess I have some ffmpeg reading up about streams, and about params to do
[07:00] <relaxed> the former is more accurate
[07:00] <chchjesus> thanks a lot relaxed
[07:00] <chchjesus> I'll see how this goes.
[07:00] <FireWater> How would I install ffmpeg in ubuntu 14.10
[07:00] <relaxed> you're welcome
[07:01] <chchjesus> FireWater: add the PPA repo and then do sudo apt-get update and sudo apt-get install ffmpeg
[07:01] <relaxed> FireWater: or http://johnvansickle.com/ffmpeg/
[07:01] <FireWater> There is a PPA?
[07:01] <chchjesus> Oh wait a minute
[07:01] <chchjesus> No
[07:01] <chchjesus> ffmpeg is returning to ubuntu apparently
[07:01] <chchjesus> http://www.noobslab.com/2014/12/ffmpeg-returns-to-ubuntu-1410.html
[07:02] <chchjesus> relaxed: neat
[07:02] <chchjesus> relaxed: the duration is perfect
[07:02] <chchjesus> Thank you!
[07:02] <FireWater> I need ffmpeg for mythtv web i believe
[07:02] <FireWater> ffmpeg with MP3 support not detected is the error i am getting
[07:02] <chchjesus> (I added in a -b:v 2M btw, for better quality)
[07:02] <relaxed> chchjesus: you're welcome
[07:03] <relaxed> chchjesus: https://trac.ffmpeg.org/wiki/Encode/VP8
[07:04] <relaxed> huh, the wiki shows them using both -crf and -b:v together
[07:04] <chchjesus> Yeah, I just read that.
[07:04] <chchjesus> Also
[07:05] <chchjesus> -qmin and -qmax
[07:05] <chchjesus> For quantisation
[07:05] <relaxed> which wouldn't work with libx264
[07:05] <relaxed> thanks google
[07:05] <chchjesus> lol
[07:05] <chchjesus> ffmpeg is a wonderful piece of software
[07:05] <chchjesus> It's just very complex
[07:05] <chchjesus> >.>
[07:08] <chchjesus> relaxed: http://a.pomf.se/zjiihz.webm here's the result, anyway
[07:10] <relaxed> looks good!
[07:11] <relaxed> I get an audio crack at the end
[07:14] <relaxed> you could probably remove it with the afade filter
[07:18] <chchjesus> Gah
[07:18] <chchjesus> My terminal crashed
[07:19] <relaxed> how does that happen?
[07:20] <chchjesus> I was mashing the right arrow key
[07:20] <chchjesus> in IRC
[07:20] <chchjesus> in weechat
[07:20] <chchjesus> Anyway
[07:20] <chchjesus> Be back later
[07:33] <FireWater> mythtv is giving me an error
[07:33] <FireWater>  ffmpeg with MP3 support not detected
[07:43] <relaxed> FireWater: did you try my static build?
[07:44] <FireWater> I actually didn't see that until just now
[07:45] <FireWater> Should I use 2.5.4
[07:46] <relaxed> either should work
[07:46] <FireWater> ok
[07:48] <FireWater> relaxed: I am not really that knowledgeable how would I install it
[07:48] <relaxed> tar xvf blah.tar.xz
[07:49] <relaxed> then copy the ffmpeg binary to your shell's path
[07:49] <FireWater> relaxed: it already is a tar
[07:50] <FireWater> ffmpeg-git-64bit-static.tar.xz
[07:50] <relaxed> that command would untar it
[07:51] <relaxed> but first remove the ffmpeg you installed with apt-get
[07:51] <FireWater> Aaahhh ok
[07:51] <relaxed> then copy the static ffmpeg to /usr/bin/
[08:16] <FireWater> relaxed: Should I copy the folder or the file
[08:27] <relaxed> file
[18:35] <slvmchn> hi all, i have a folder of .mov files, and i want to convert them all and just change the extensions to .avi, the command i'm using is "ffmpeg -i filename.mov -c h264 filename.avi"... how would i set up a batch script to just take any mov, execute that command changing the extension to avi, then just move onto the next one for however many are in the folder?
[18:35] <slvmchn> i don't know anything about batch scripting, this is on windows
[19:50] <vlt> slvmchn: for file in *mov; do ffmpeg -i "$file" -c h264 "${file%.mov}.avi"; done
[19:51] <vlt> slvmchn: (This is for the bash shell, for example.)
[20:46] <blacklion79> How should I split one big MPEG2-TS (created with "-f dvd") file into several files which will comply to DVD spec and played one-by-one will exactly the same as source? I've tried this: "ffmpeg -i in.mpg -f dvd -c:v copy -c:a copy -to 00:10:00 -sn title1.mpg -f dvd -c:v copy -c:a copy -ss 00:10:00 -to 00:20:00 -sn title2.mpg -f dvd -c:v copy -c:a copy -ss 00:20:00 -sn title3.mpg" (really, I have more than 3 parts and to so nice
[20:46] <blacklion79> times, of course), but after that dvdauthor could not use second file with error message "Cannot infer pts for VOBU if there is no audio or video and it is the first VOBU.". Source file works with dvdauthor!
[20:47] <BtbN> Aren't DVDs mpeg-ps?
[20:48] <blacklion79> Oh, sorry, MEPG2-PS, of cource. Problem is, source file works perfectly, but I need to split it to different titles. And splitted parts doen't work.
[00:00] --- Mon Feb 23 2015

More information about the Ffmpeg-devel-irc mailing list