[Ffmpeg-devel-irc] ffmpeg.log.20170219
burek
burek021 at gmail.com
Mon Feb 20 03:05:01 EET 2017
[00:00:28 CET] <lockdown> worked nicely :)
[01:44:56 CET] <Viliams> Hello, im trying to encode 1920x1080 60FPS YUV420 5s long videos with MPEG2 and I need to outputs to have a wide range of quality(~bitrate). The lowest quality I get seems too good compared to those I get with x264 and x265. I tried using: -qscale 31; -qmin 69 -qmax 69 => too high quality. I also tried -maxrate 4000k but I get the message that it is too low. How can I encode lower quality(~bitrate) MPEG2 videos? TY
[01:55:59 CET] <DHE> mpeg2 is old. it's what's on DVDs. x264 can basically cut the bitrate in half and still be watchable compared to mpeg2
[01:56:23 CET] <DHE> Honestly I would use 20 megabits as a starting point for 1080p60 video and see how it turns out
[02:16:27 CET] <faLUCE> I see that each time I call avcodec_encode_audio2(...., &packet....) I have to unref the packet before. Does it mean that avcodec_encode_audio2() allocate the pkt's buffer at each call?
[03:32:17 CET] <dmc> when I play content over sshfs, ffmpeg uses libssh? asking because I would like to test the latest package from my distro. the only thing I have installed with libssh as a dep is ffmpeg
[03:33:24 CET] <c_14> dmc: see my response in #mpv
[03:33:53 CET] <dmc> heheh
[03:37:34 CET] <dmc> thank you :)
[07:52:03 CET] <TommyC> Hello. I'm using ffplay in ffmpeg3 with SDL2 installed. However, it doesn't appear to be able to pause, play, fullscreen and other keyboard functions that ffmpeg2's ffplay was capable of doing. I'm not sure what I'm missing and was hoping I could get some help.
[10:32:48 CET] <xtina> hi guys. is there any library other than ffmpeg that will let me record+encode ALSA audio?
[10:33:03 CET] <xtina> i'm on a Raspberry Pi running Debian Jessie
[15:53:36 CET] <Majidsafaei29> hello
[15:54:50 CET] <Majidsafaei29> I am using ffmpeg php, when run save method, is getting error. error is encoding faild
[16:18:58 CET] <Bombo> what is ffmpeg php?
[16:19:53 CET] <DHE> this is not software we support nor can we help with such vague error messages
[16:50:07 CET] <zachphillips> Im having a lot of trouble finding common settings used for retaining quality but really cutting down filesize. All of the settings lines Ive found in gists and otherwise have mangled my videos and made them look like crap. Does anyone know of a list of good settings for mp4, webm, and ogg output that still look pretty smooth but significantly compress the file?
[16:51:15 CET] <relaxed> zachphillips: did you look at https://trac.ffmpeg.org/wiki ?
[16:53:02 CET] <relaxed> Under encoding read the h.264, VP9, and theora guides
[16:53:38 CET] <zachphillips> relaxed: looking now. i had gone on trac, but i hadnt seen any try this one first, and the explanations of all the settings were a little over my head.
[16:53:50 CET] <furq> i assume "mp4, webm and ogg" means this is for browsers
[16:53:53 CET] <furq> in which case you can forget about ogg
[16:54:10 CET] <furq> there is no commonly-used browser which only supports ogg
[16:54:21 CET] <zachphillips> oh cool, good to know. thanks.
[16:54:28 CET] <furq> there's no need to use webm either
[16:54:31 CET] <furq> everything supports mp4 now
[16:54:48 CET] <furq> webm is more efficient if you don't mind waiting a million years
[16:54:49 CET] <zachphillips> well the mp4s seem to be giving me the most trouble when it comes to getting the filesize down&
[16:55:23 CET] <furq> pastebin the command line
[16:56:28 CET] <zachphillips> http://pastebin.com/wF37jmPt
[16:56:33 CET] <vans163> should I be using -x264opts, or passing the opts directly?
[16:57:00 CET] <zachphillips> thanks so much for the help
[16:57:21 CET] <furq> there sure is some old advice out there
[16:58:21 CET] <Diag> furq: version me
[16:58:28 CET] <zachphillips> yeah, im very excited to learn i only need mp4! i havent seen that anywhere.
[16:58:40 CET] <relaxed> vans163: I guess anything not covered by ffmpeg's options, which you can see with "ffmpeg -h encoder=libx264|less"
[16:58:46 CET] <zachphillips> and ive been searching a LOT
[16:59:04 CET] <furq> http://caniuse.com/#feat=mpeg4
[16:59:33 CET] <furq> opera mini doesn't support any video format as far as i can tell
[16:59:45 CET] <vans163> relaxed: ah thanks
[16:59:53 CET] <furq> zachphillips: what ffmpeg version are you using
[16:59:58 CET] <zachphillips> yeah, just anywhere folks talk about html5 video, theyre like be sure to include these formats"
[17:00:00 CET] <furq> you shouldn't be using libfaac if you can avoid it, it's really bad
[17:00:03 CET] <furq> and -bt doesn't exist any more
[17:00:26 CET] <furq> which is fine because that stuff is only necessary if you want to support really old phones
[17:01:45 CET] <zachphillips> got it& is there a good list of options i can just drop in? these are for background videos, so they dont have to be perfect, but they cant have big blocky blockness.
[17:01:46 CET] <vans163> relaxed: is tehre a similar command to get info on the -x264opts?
[17:02:08 CET] <vans163> im trying to find how to get RC_2_PASS
[17:02:14 CET] <relaxed> x264 --fullhelp
[17:02:19 CET] <furq> zachphillips: mp4 has sensible defaults
[17:02:24 CET] <furq> try with just -i foo.mp4 bar.mp4
[17:02:33 CET] <zachphillips> copy that.
[17:02:40 CET] <furq> you can tune -crf and -preset if you're not satisfied
[17:03:08 CET] <furq> also make sure your ffmpeg is newer than 3.0, there's a new aac encoder in 3.x
[17:03:45 CET] <zachphillips> yep its 3.2 thanks.
[17:05:24 CET] <furq> i don't think h264 profile and level is really a compatibility issue these days, but there's no concrete docs on what phones will play
[17:05:28 CET] <furq> maybe someone else can shed more light on that
[17:06:44 CET] <vans163> relaxed: cant figure out the full cmdline for that.. ffmpeg x264 --fullhelp ffmpeg -h x264 --fullhelp etc..
[17:07:03 CET] <vans163> trying every combincation ffmpeg -h full works but it gives everything
[17:07:05 CET] <furq> vans163: it's not an ffmpeg command line
[17:07:09 CET] <furq> he means the x264 binary
[17:07:54 CET] <vans163> furq: seems I need to install a packge
[17:12:12 CET] <zachphillips> furq: so the file is 10 times the size of the webm which appears to be of comparable quality& this is the thing im running into.
[17:12:12 CET] <relaxed> vans163: you're just trying to do 2 pass encoding?
[17:12:34 CET] <relaxed> zachphillips: command?
[17:13:01 CET] <zachphillips> relaxed: just plainjane foo.mp4 bar.mp4
[17:13:23 CET] <furq> as i said, you can adjust -preset and -crf
[17:13:29 CET] <relaxed> ffmpeg -i input -preset veryslow output
[17:13:31 CET] <furq> -crf defaults to 23, higher values = smaller output
[17:14:26 CET] <zachphillips> got it& if im trying to go down 90% in size, what value do you think that would be?
[17:14:42 CET] <vans163> relaxed: im trying to play with the encoder to balance cpu/quality while keeping it ultra low latency, no buffering.
[17:14:55 CET] <furq> shrug
[17:14:59 CET] <furq> probably 28-32
[17:15:33 CET] <furq> if the source is grainy or noisy then you can try filtering it first
[17:16:04 CET] <zachphillips> got it., ill try that. thanks.
[17:16:54 CET] <vans163> actually an interesting question, im guessing there is no such thing as a SPS header to ffmpeg commandline converter?
[17:17:02 CET] <vans163> or hinter
[17:17:12 CET] <furq> not that i know of
[17:17:21 CET] <furq> it probably wouldn't be that hard to make though
[17:20:23 CET] <vans163> the Video Usability Info (Annex E): does not have option to write timestamps?
[17:20:45 CET] <vans163> timing_info_present_flag
[17:21:00 CET] <vans163> and fixed_frame_rate_flag
[17:22:32 CET] <vans163> maybe its.. --pic-struct Force pic_struct in Picture Timing SEI ?
[17:23:18 CET] <zachphillips> furq: thank you, ive almost got it perfect&
[17:24:07 CET] <zachphillips> relaxed: you too
[18:34:46 CET] <zachphillips> do vbrs perform worse? sorry if thats a dumb question.
[18:35:07 CET] <Diag> ?
[18:35:12 CET] <Diag> what do you mean by perform
[18:35:17 CET] <Diag> speed or quality?
[18:35:24 CET] <Diag> or filesize
[18:35:31 CET] <zachphillips> like they take up less space, but do they spin up the CPU more while playing them?
[18:35:57 CET] <zachphillips> also, is there a reason why Quicktime Player cant view the mp4s coming out of ffmpeg but the browser can?
[18:36:30 CET] <zachphillips> errr gpu, like do they skip more on peoples browsers.
[18:42:51 CET] <furq> it shouldn't make any difference at all unless you're live streaming
[18:43:05 CET] <furq> also quicktime is generally a piece of shit so that's probably the reason why
[18:43:09 CET] <zachphillips> weird
[18:43:10 CET] <zachphillips> got it
[18:44:55 CET] <DHE> VBR is either aobut targetting a specific file size, or controlling the bandwidth requirements for playback (the live streaming scenario)
[18:44:58 CET] <furq> if you're using -preset veryslow you'll want to doublecheck you can play them on phones
[18:45:06 CET] <furq> i'm not sure how phones deal with 8 bframes these days
[18:45:15 CET] <furq> decent ones should handle it ok
[18:45:23 CET] <DHE> wouldn't a properly set profile or level deal with that?
[18:45:37 CET] <furq> it would
[18:45:38 CET] <DHE> I'm not sure if the level's reference frames limit affects b-frames
[18:45:45 CET] <furq> i believe it does
[18:45:54 CET] <furq> the problem is, what profile and level do you set for "phones"
[18:46:28 CET] <DHE> manufacturers specify what the limits are. newer iPhones handle High, older ones do Main and the oldest (iphone 1 and 2?) do Baseline
[18:46:37 CET] <furq> well yeah but what about android
[18:46:56 CET] Action: DHE cringes and hides in a corner
[18:47:08 CET] <furq> just as i suspected
[18:47:19 CET] <furq> i guess you could do main at 3.1 if you want to be safe
[18:47:34 CET] <DHE> for anything 1080p I think you need 4.0 though
[18:47:53 CET] <furq> so you do
[18:48:29 CET] <furq> hopefully this website background video isn't 1080p though
[18:48:31 CET] <DHE> hmm... wikipedia page is a bit ambiguous. 1080p might work at 30fps if you used 2 (or fewer?) reference frames
[18:48:38 CET] <DHE> fair enough
[18:49:11 CET] <furq> hopefully it also doesn't redownload itself every time it finished playing like that carousel video on the google AMP homepage used to
[18:49:16 CET] <furq> s/ed/es/
[19:06:07 CET] <gargamel> can ffmpeg somehow cut the audio, when i use copy, when the video have some bad frames to keep the sync?
[19:07:49 CET] <thebombzen> gargamel: if you're using -c copy then the "bad frames" will be copied as well
[19:08:09 CET] <furq> gargamel: are you using -vsync drop
[19:08:24 CET] <furq> try with cfr instead
[19:08:36 CET] <gargamel> http://pastebin.com/SNUuCdDD
[19:09:26 CET] <furq> or maybe passthrough would be better
[19:09:51 CET] <furq> drop will cause any frames after a dropped frame to be moved forward in time
[19:10:02 CET] <furq> which will obviously desync audio
[19:10:25 CET] <faLUCE> any Idea about av_gettime_relative(); ? API says "Get the current time in microseconds since some unspecified starting point." but how could it be used if the starting point is unspecified?
[19:11:01 CET] <thebombzen> faLUCE: it's useful to compare two things
[19:11:08 CET] <thebombzen> but not useful for an "absolute time"
[19:11:26 CET] <thebombzen> so like if you wanted to know how far apart certain things were in the stream, that's what it's for
[19:11:27 CET] <gargamel> furq: i'll test with passthrough
[19:11:49 CET] <furq> faLUCE: it's just clock_gettime(CLOCK_MONOTONIC)
[19:12:26 CET] <thebombzen> to be more rigorous, the numbers outputted from av_gettime_relative are a torsor
[19:12:56 CET] <faLUCE> thebombzen: why should I use av_gettime_relative instead of av_gettime for comparing two times?
[19:13:16 CET] <thebombzen> because not every container has av_gettime
[19:13:22 CET] <furq> because av_gettime is unreliable if your system clock changes
[19:13:27 CET] <furq> e.g. if you're running ntpd
[19:13:28 CET] <thebombzen> that too
[19:13:46 CET] <faLUCE> [19:13] <furq> e.g. if you're running ntpd <--- I see, thanks
[19:13:47 CET] <furq> or leap seconds, or any of that jazz
[19:13:55 CET] <thebombzen> av_gettime_relative is also useful for certain streams
[19:13:58 CET] <faLUCE> then the name of this function is really BAAAD
[19:14:14 CET] <thebombzen> like mpegts you want to use av_gettime_relative
[19:14:25 CET] <furq> "since some unspecified starting point" is what it says in the clock_gettime(3) manpage
[19:14:46 CET] <furq> maybe av_gettime_monotonic would be a better name but relative sums it up pretty well
[19:15:02 CET] <thebombzen> faLUCE: the difference is basically "av_gettime" points to the wall clock
[19:15:12 CET] <faLUCE> furq: in fact they should have called av_get_clocktime, not av_gettime_relative. It's really one of the worst and misleading names ever seen for a function
[19:15:22 CET] <furq> clocktime would be way more misleading
[19:15:29 CET] <furq> since that implies it's the wallclock time, which it isn't
[19:15:30 CET] <thebombzen> no, av_gettime is the wall clock
[19:15:42 CET] <thebombzen> av_gettime_relative is a difference timer
[19:15:55 CET] <thebombzen> av_gettime_relative is usually the time since boot, but it depends on your OS's implementation
[19:16:01 CET] <furq> right
[19:16:08 CET] <faLUCE> in each case it's a terrible name
[19:16:13 CET] <thebombzen> not really
[19:16:16 CET] <thebombzen> but the whole idea of av_gettime_relative is that the actual "zero point" doesn't matter
[19:16:35 CET] <thebombzen> the actual value of av_gettime_relative isn't useful, only what a call is *relative* to another call
[19:16:51 CET] <faLUCE> thebombzen: I'm still convinced that the name for the function could not be worse
[19:17:01 CET] <furq> what would you suggest then
[19:17:01 CET] <thebombzen> well I"m not sure what to tell you
[19:17:01 CET] <faLUCE> anyway, thanks for your help
[19:18:09 CET] <faLUCE> av_get_clockmicroseconds or something like that
[19:18:36 CET] <furq> av_gettime returns the wallclock time in microseconds
[19:18:58 CET] <faLUCE> then, eliminate av_gettime
[19:19:06 CET] <furq> what
[19:19:09 CET] <furq> why would you do that
[19:19:51 CET] <faLUCE> I really don't know, but that name, IMHO is really bad
[19:19:59 CET] <furq> i genuinely don't see the problem
[19:20:51 CET] <furq> av because it's part of libavutil, gettime because it calls clock_gettime, relative because it calls it with CLOCK_MONOTONIC which returns a relative timestamp
[19:21:47 CET] <faLUCE> av_getclockmonotonic()
[19:30:12 CET] <gargamel> furq: sadly it did not work
[19:31:17 CET] <gargamel> if i encode the audio aswell it cuts out that part where the video is bad
[19:34:16 CET] <faLUCE> Well, if I want to rescale pts = av_gettime_relative() to MPEGTS timebase, which timebase should I give to av_rescaleq? Should I do: pts = av_rescale_q(pts, AV_TIME_BASE_Q, AVRational{1, 90000}); ?
[21:42:05 CET] <SouLShocK> #joint #ffmbc
[21:42:14 CET] <SouLShocK> aha sorry
[21:42:29 CET] <ChocolateArmpits> -t 4:20
[21:42:55 CET] <Diag> Lol
[00:00:00 CET] --- Mon Feb 20 2017
More information about the Ffmpeg-devel-irc
mailing list