[Ffmpeg-devel-irc] ffmpeg.log.20160308
burek
burek021 at gmail.com
Wed Mar 9 02:05:01 CET 2016
[03:01:08 CET] <mariang> hello
[03:01:23 CET] <jookiyaya> i cannot find any player that support bluray menu
[03:02:02 CET] <Guest66065> Hello all, I run a video site, but watermark logo still in different sizes in every video with different resolution. My question: is there a way to scale watermark image in every video by some kind of percentage to have the same size of watermark whatever the resolution of the video.
[03:02:28 CET] <Guest66065> i tryed finding with scale filter but without success
[03:02:55 CET] <mariang> anyone know how to put a mp3 song to a mp4 file?
[03:03:17 CET] <mariang> I use http://pastebin.com/xj1zDA0q
[03:03:59 CET] <mariang> it works but with random file generated, I have a problem with firefox
[03:04:09 CET] <mariang> i can't play the video
[03:31:14 CET] <J_Darnley> mariang: please post the full output from ffmpeg
[03:31:43 CET] <J_Darnley> Guest66065: I'm sure someone earlier suggested something for you
[03:31:56 CET] <J_Darnley> jookiyaya: what about mpv or mplayer
[03:32:06 CET] <J_Darnley> uh I mean mpv or mpchc
[03:32:15 CET] <jookiyaya> doesn't support bluray menu
[03:32:15 CET] <J_Darnley> (how did I say mplayer?)
[03:33:31 CET] <mariang> J_Darnley: I fixed the problem with mozilla with http://pastebin.com/qq5dWE43 but idk how to put mp3 on video
[03:34:04 CET] <J_Darnley> I can't see why the input audio matters at all
[03:34:09 CET] <J_Darnley> you are encoding to aac
[03:34:25 CET] <J_Darnley> This is why we ask for the full output!
[03:37:48 CET] <furq> mariang: -c:a copy
[03:39:32 CET] <mariang> J_Darnley http://pastebin.com/3SARULrj
[03:39:37 CET] <mariang> it works on chrome
[03:39:40 CET] <mariang> with audio
[03:40:05 CET] <mariang> they tell something about Use -pix_fmt yuv420p for compatibility with outdated media players.
[03:40:25 CET] <furq> if only there was some way to know what that means
[03:40:27 CET] <furq> but there isn't
[03:40:27 CET] <Guest66065> J_Darnley yes , he told me to check the scale filter but i tryed a lot of code and without success
[03:40:47 CET] <Guest66065> i just need my watermark to be in a fixed size whatever the resolution of the video
[03:59:54 CET] <k_sze[work]> Not strictly a ffmpeg question, but I suppose you guys and gals would know better: can YUV values be averaged in a straightforward way in general? e.g sum(all Y)/number of pixels
[04:00:22 CET] <J_Darnley> Yes.
[04:02:24 CET] <J_Darnley> Guest66065: if you can't work scale2ref then I don't know how anyone can help.
[05:15:25 CET] <k_sze[work]> I mean, e.g. the H in HSV clearly can't be averaged naively by doing a sum and then a division, because it's a circular value. Is there any similar pitfalls with YUV?
[07:05:26 CET] <jookiyaya> why is it that i cannot find any player that support bluray menu
[09:38:59 CET] <Fyr> atomnuker, could write down a range of -q:a and corresponding bitrate for AAC?
[09:49:45 CET] <Fyr> or corresponding quality of LAME units.
[09:49:54 CET] <Fyr> or libfdk_aac
[10:51:09 CET] <termos> Hi I have some script that runs ffmpeg -i rtmp://somestream somefile.flv, and if the input rtmp goes down I want to retry forever and if it comes back up the somefile.flv should be appended to and not overwritten. Is there a way to do this?
[10:52:09 CET] <relaxed> termos: does ffmpeg exit when rtmp goes down?
[10:53:21 CET] <termos> hm I thought it did
[10:53:25 CET] <relaxed> if so, a simple script would be: while true; do ffmpeg -i rtmp://somestream somefile.flv; done
[10:54:26 CET] <termos> but won't that poll me asking if I want to overwrite? I can supply the -y flag and it will not ask just overwrite, but I have found not way to append to the output file
[10:58:15 CET] <relaxed> while true; do ffmpeg -i rtmp://somestream -f flv ->> somefile.flv; done
[10:59:15 CET] <relaxed> that would append to somefile.flv
[11:16:34 CET] <myztic> if this is off-topic I am sorry: what are some obvious things which might be wrong/screwed up in audio files, so they play correctly using one application, but are cut short (by approximately a second) in another application
[11:17:16 CET] <myztic> normal .mp3 files
[11:20:18 CET] <myztic> oh, and the issue is "fixed" if I convert the .mp3 files to .ogg for some reason
[12:01:05 CET] <relaxed> myztic: the mp3 was encoded with ffmpeg
[12:06:22 CET] <relaxed> ?
[12:29:12 CET] <myztic> relaxed: no
[12:29:16 CET] <myztic> relaxed: downloaded from the net
[14:52:08 CET] <momomo> i am generating a hls stream from a remote source, here is my command:
[14:52:14 CET] <momomo> ffmpeg -i "${URL}" -c:v libx264 -crf 23 -c:a libvo_aacenc -b:a 128k -ac 2 -f hls -hls_list_size 5 -hls_time 5 -hls_flags delete_segments -b:v 64k -bufsize 64k -minrate 0K -maxrate 1000k "${OUT}"
[14:52:30 CET] <momomo> at the end I've been trying to limit the bitrate ...
[14:52:48 CET] <momomo> but I am not sure this is working ... shouldn't 64k degrarde the quality alot ?
[14:54:43 CET] <J_Darnley> Which do you want to use crf 23 or bitrate?
[14:54:46 CET] <BtbN> So you want crf but with a maximum bitrate?
[14:55:13 CET] <BtbN> combining -crf and maxrate/bufrate is valid, though strange
[14:56:44 CET] <momomo> J_Darnley, the original source is high quality and I only wish to serve medium quality because of our users limited internet speed
[14:57:07 CET] <J_Darnley> Again, crf or bitrate? One or the other.
[14:57:19 CET] <momomo> bitrate gives more control, right?
[14:57:27 CET] <J_Darnley> Control of what?
[14:57:30 CET] <J_Darnley> Quality?
[14:57:30 CET] <momomo> the output
[14:57:31 CET] <J_Darnley> No
[14:57:40 CET] <furq> won't -crf be overriden by -b:v anyway
[14:57:46 CET] <J_Darnley> What property of output?
[14:58:02 CET] <momomo> J_Darnley, the size and quality
[14:58:11 CET] <momomo> the size in bytes per second
[14:58:20 CET] <furq> i've not messed with the vbv much but those minrate and maxrate settings look wrong
[14:58:35 CET] <momomo> furq, taken from: https://trac.ffmpeg.org/wiki/Limiting%20the%20output%20bitrate
[14:58:47 CET] <momomo> and http://superuser.com/questions/536001/variable-bit-rates-with-vb-and-minrate-maxrate-settings-in-ffmpeg
[14:59:10 CET] <furq> that doesn't say to set the maxrate to 15x the bitrate
[14:59:16 CET] <momomo> 3.5
[14:59:32 CET] <J_Darnley> You don't even know what you are trying to do. How can anyone help you?
[14:59:39 CET] <momomo> what is maxrate ? what does it do? i tried to understand it but no proper explanation
[14:59:55 CET] <momomo> J_Darnley, I do
[15:00:07 CET] <J_Darnley> It is the maximum input rate to the VBV "leaky bucket" model
[15:00:16 CET] <momomo> I want to control the output quality and size of the video per second
[15:00:22 CET] <BtbN> combining -crf and maxrate will result in ffmpeg, or rather x264, using whatever results in the lower bitrate
[15:00:39 CET] <momomo> BtbN, ok, so I won't combine ... one step forward
[15:00:53 CET] <momomo> this look better: ffmpeg -i "${URL}" -b:v 64k -bufsize 64k -minrate 0K -maxrate 128k -c:v libx264 -c:a libvo_aacenc -b:a 128k -ac 2 -f hls -hls_list_size 5 -hls_time 5 -hls_flags delete_segments "${OUT}"
[15:01:08 CET] <BtbN> you realize 64kbit is next to nothing for a video, right?
[15:01:16 CET] <furq> how limited is this internet speed
[15:01:30 CET] <furq> if it's not ISDN then you can probably go a bit higher
[15:01:39 CET] <furq> especially if you're using 128kbps audio
[15:02:04 CET] <momomo> BtbN, i am just experimenting .. and the results are bad quality but not that bad
[15:02:31 CET] <momomo> furq, maybe i will go lower on audio then .. 64k ?
[15:02:50 CET] <furq> 64k should be ok with aac but not necessarily with that encoder
[15:03:12 CET] <furq> if you have fdk-aac then that should do a much better job
[15:03:28 CET] <furq> or the builtin encoder if you have an up-to-date ffmpeg
[15:03:28 CET] <momomo> -c:a fdk-aac ?
[15:03:31 CET] <furq> yeah
[15:03:45 CET] <furq> it's not included by default due to licensing issues
[15:04:00 CET] <furq> in binaries, that is
[15:04:32 CET] <momomo> sometimes, due to the source rresulting in alot of errors .. i am getting this wierd annoying sharp noices when theere is a jump or lag ... maybe that was the audio encoder ?
[15:04:47 CET] <momomo> Unknown encoder 'fdk-aac'
[15:04:52 CET] <momomo> ffmpeg -i "${URL}" -b:v 64k -bufsize 64k -minrate 0K -maxrate 64k -c:v libx264 -c:a fdk-aac -b:a 64k -ac 2 -f hls -hls_list_size 5 -hls_time 5 -hls_flags delete_segments "${OUT}"
[15:05:10 CET] <furq> like i said, you can't distribute fdk with ffmpeg due to licensing issues
[15:05:15 CET] <furq> you'd have to build it yourself
[15:05:32 CET] <momomo> hmm .. install a separrate package ?
[15:05:35 CET] <J_Darnley> Well it might help if you get the name right!
[15:05:42 CET] <J_Darnley> libfdk_aac
[15:05:44 CET] <furq> oh yeah
[15:05:55 CET] <furq> it won't be there though ;_;
[15:06:15 CET] <J_Darnley> You mean not everyone compiles ffmpeg from source?
[15:06:15 CET] <furq> if you have it then you'll know already (or someone is violating GPL)
[15:07:41 CET] <momomo> i place it in ~/ffmpeg_sources ?
[15:08:00 CET] <furq> that depends on what ~/ffmpeg_sources is
[15:11:47 CET] <momomo> i will postpone that to another time ..
[15:11:52 CET] <momomo> what I have now is: ffmpeg -i "${URL}" -b:v 256k -bufsize 256k -minrate 256K -maxrate 256k -c:v libx264 -c:a libvo_aacenc -b:a 64k -ac 2 -f hls -hls_list_size 5 -hls_time 5 -hls_flags delete_segments "${OUT}"
[15:12:50 CET] <momomo> i was just wondering -minrate 256k vs -minrate 0 ... i can't really spot any difference ... is that for the control of the size of the output each .ts file ? i though bufsize was supposed to do that
[15:13:22 CET] <BtbN> bufsize sets the vbv buffer size, it's an encoder option, hls doesn't care.
[15:15:38 CET] <momomo> is there a way to control the hls file sizes ? some are hitting 1mb .. others are hitting 200kb ...
[15:15:48 CET] <momomo> i tried to increase from 5 to 10 on both params
[15:16:05 CET] <BtbN> Don't use variable bitrate if you want them to be the same size.
[15:16:46 CET] <momomo> don't use -b:v 256k or -bufsize 256k ?
[15:16:49 CET] <momomo> or both ?
[15:17:06 CET] <momomo> sorry guys, i know I am noob here .. but I am learning .. sorry for all the questions :(
[15:17:26 CET] <momomo> it's almost impossible trying ot figure this out by myself
[15:23:07 CET] <momomo> is tehre a way to generate smaller hls part files ?
[15:24:13 CET] <BtbN> make them shorter
[15:24:35 CET] <BtbN> also, you can't split the stream at random locations, the beginning of each segment has to be an IDR frame
[15:25:08 CET] <BtbN> so you have to set your gop length accordingly, or hls_time won't do much
[15:25:49 CET] <momomo> hmm hop length ? yes, I've tried to increase from 5 to 10 and 20 .. .but not much seems to happen
[15:25:51 CET] <momomo> ffmpeg -i ${URL} -b:v 256k -bufsize 256k -maxrate 256k -c:v libx264 -c:a libvo_aacenc -b:a 64k -ac 2 -f hls -hls_list_size 20 -hls_time 20 -hls_flags delete_segments ${OUT}
[15:26:01 CET] <momomo> gop*
[15:31:03 CET] <J_Darnley> What? You want smaller segements so you decide to try making them longer?
[15:32:43 CET] <momomo> ah .. so I need to decrease that number
[15:33:55 CET] <BtbN> 5 seconds is already very short
[15:36:13 CET] <momomo> ok, i think i understand how these two params work now .. learning :)
[15:38:38 CET] <momomo> i have another issue .. i am executing this from a java program ... and on occasion, for some reason, ffmpeg appears to get stuck and use up to 70% of the processor ... I am not able to reproduce this so it's hard to figure out why ... at one time it appeared as if the output in the command line stood still... and alot of .ts files where being generated .. fast ... this would not be too good in the production environment ...
[15:38:55 CET] <momomo> is there a safe guard against such scenarios, so the process would die or restart ?
[15:39:41 CET] <momomo> another scenario is if i run the command, and then pull out my etherrnet cable .. and then after a while put it in agian ... the ffmpeg command would exit ... is there a failsafe to allow to to continue or retry no matter what ?
[16:57:16 CET] <momomo> guys, when i run the ffmpeg command, the first 00.ts file might take some time ( up to 20 seconds ) ... which will delay the creation of the m3u8 playlist, and make the player take as long to load ... is there a way to jumpt start the creation of the first few ts files ?
[16:57:25 CET] <momomo> and the playlist so therre won't be a lag
[16:57:26 CET] <momomo> ?
[16:59:54 CET] <mariang> hey guys
[17:00:28 CET] <kepstin> momomo: what codec/options are you using?
[17:00:44 CET] Action: kepstin scrolls up
[17:00:53 CET] <momomo> ffmpeg -i ${URL} -b:v 256k -bufsize 256k -maxrate 256k -c:v libx264 -c:a libvo_aacenc -b:a 64k -ac 2 -f hls -hls_list_size 10 -hls_time 20 -hls_flags delete_segments ${OUT}
[17:01:18 CET] <kepstin> if your input is a remote stream, a good chunk of that time is just gonna be the connection setup
[17:01:35 CET] <matthias___> Hello, i want to open a flv stream from my ip camera with ffmpeg but i get [flv @ 0x55c00deecde0] Packet mismatch 45 41
[17:01:47 CET] <kepstin> some of it will be the encoder delay in x264, you can try "-tune zerolatency" to remove that at the expense of encoding efficiency
[17:01:49 CET] <momomo> yes, i know ... but then there is alot of additiooanl time spent on creating the first ts file ..
[17:01:58 CET] <matthias___> ffmpeg -i "http://192.168.178.140/videostream.flv?user=admin&pwd="
[17:02:02 CET] <mariang> any way to get this http://pastebin.com/9pgHHAGX working with Android devices?
[17:02:43 CET] <momomo> matthias___, girls/performers ? haha
[17:03:36 CET] <momomo> kepstin, will that apply for the entire lenght of the command running ?
[17:03:37 CET] <matthias___> momomo: nope, just surveillance
[17:03:53 CET] <momomo> i was hoping that I could run something like that only at the beggining
[17:04:00 CET] <J_Darnley> mariang: What isn't working?
[17:04:31 CET] <furq> momomo: use a lower segment duration?
[17:04:39 CET] <kepstin> momomo: it wouldn't really make sense to do only at the beginning if the source is realtime.
[17:04:51 CET] <kepstin> you can't exactly increase the delay while keeping it realtime...
[17:05:08 CET] <momomo> furq, you mean hls_time 5 ?
[17:05:13 CET] <furq> sure
[17:06:18 CET] <kepstin> oh, right, if you have 20s long hls segments, of course it'll be 20s before the stream is playable...
[17:06:51 CET] <momomo> i had 5 sec before, and I think it was pretty much the same
[17:06:56 CET] <momomo> i will rettry
[17:07:17 CET] <kepstin> momomo: you should also set the gop size (-g) to make sure there's keyframes near where you want the hls splits to happen
[17:07:39 CET] <furq> yeah i assume that if you have 10-second gops then ffmpeg will just split there and ignore hls_size
[17:07:50 CET] <furq> s/size/time/
[17:08:10 CET] <mariang> J_Darnley: I can't play the video in browser
[17:08:31 CET] <momomo> furq, you recommended me hls.js last time ( 3 weeks ago ) and it's been great .. but with small hls_size it doesn't seem to be buffering enough
[17:08:36 CET] <momomo> know anything about that ?
[17:08:45 CET] <momomo> i will look into gop
[17:08:55 CET] <kepstin> mariang: if you want an mp4 to play properly in a browser, you should add "-movflags faststart"
[17:09:20 CET] <momomo> btw, the standard pics per second is 25 .. right ? is there a way to half that ? to decrease size further /
[17:09:21 CET] <momomo> ?
[17:09:26 CET] <furq> -r
[17:09:40 CET] <furq> 25 is standard for pal, it could be 24 or 30 for film or ntsc
[17:09:46 CET] <furq> or double that for high framerate stuff
[17:09:47 CET] <momomo> -r 13 would work ?
[17:09:56 CET] <kepstin> momomo: you can use the -r output option or 'fps' filter (both are equivalent) to set any lower rate you like; it'll drop the extra frames.
[17:10:08 CET] <momomo> i say mathias had the option -framerate 1/2 ... is that the same ?
[17:10:12 CET] <furq> you can use 12.5 if you want to drop every other frame
[17:10:12 CET] <kepstin> 13's kind of a funny number, but sure - probably.
[17:10:16 CET] <furq> 1/2 is 0.5fps
[17:10:31 CET] <matthias___> momomo: any idea?
[17:10:34 CET] <momomo> so framerate and r is pretyt much the same ?
[17:10:47 CET] <furq> -r = rate
[17:10:59 CET] <kepstin> momomo: as input options, -framerate and -r are completely different
[17:11:01 CET] <furq> -framerate is usually an input option
[17:11:10 CET] <furq> although i think it's just mapped to -r as an output option
[17:11:34 CET] <furq> and i believe both of them are actually mapped to -vf fps
[17:11:39 CET] <momomo> here is my latest version:
[17:11:40 CET] <momomo> ffmpeg -i ${URL} -g 10 -r 12.5 -b:v 256k -bufsize 256k -maxrate 256k -c:v libx264 -c:a libvo_aacenc -b:a 64k -ac 2 -f hls -hls_list_size 10 -hls_time 10 -hls_flags delete_segments ${OUT}
[17:12:13 CET] <furq> if you want 5-second GOPs then -g should be r * 5
[17:12:19 CET] <kepstin> momomo: the argument for -g is in frames, not seconds.
[17:12:32 CET] <furq> although maybe not in this case because it'll need to be a whole number
[17:13:09 CET] <furq> also what resolution is the input video
[17:13:18 CET] <furq> you probably want to downscale it if you're using such low bitrates
[17:13:28 CET] <momomo> -g 50 -r 10
[17:13:36 CET] <furq> that works
[17:13:57 CET] <furq> 10fps is not going to look good though
[17:14:39 CET] <furq> for hls you might also want to set -x264opts keyint_min
[17:14:45 CET] <furq> to the same as -g
[17:15:01 CET] <J_Darnley> Or disable scenecut detection
[17:15:05 CET] <furq> yeah
[17:15:11 CET] <momomo> yeah, that looked like shit
[17:15:36 CET] <furq> like i said, you're probably better off downscaling
[17:16:00 CET] <momomo> -s ?
[17:16:03 CET] <furq> yeah
[17:18:52 CET] <furq> what's the default scaling algorithm for swscale
[17:19:01 CET] <furq> it doesn't seem to mentioned in the docs
[17:19:14 CET] <furq> i assume it's bilinear or bicubic which is probably what you want in this case
[17:19:57 CET] <momomo> what I want ?
[17:20:14 CET] <momomo> ah, ook...
[17:21:20 CET] <momomo> latest
[17:21:21 CET] <momomo> Strings.create("ffmpeg -i ${URL} -s 1024x768 -g 100 -r 20 -b:v 256k -bufsize 256k -maxrate 256k -c:v libx264 -c:a libvo_aacenc -b:a 64k -ac 2 -f hls -hls_list_size 10 -hls_time 20 -hls_flags delete_segments ${OUT}",
[17:21:39 CET] <furq> that's still really high for 256k
[17:21:47 CET] <momomo> scaling ?
[17:21:49 CET] <furq> unless it's a screencast or something where you need to read small text
[17:21:49 CET] <furq> yeah
[17:22:38 CET] <momomo> is it expensive to create two separate qualities at once, in the same command? processor wise ?
[17:23:16 CET] <furq> it's roughly twice as expensive as what you're doing now
[17:23:39 CET] <furq> but encoding 256k at 20fps shouldn't be taking much cpu time
[17:23:50 CET] <furq> if it's an issue you can use a faster x264 preset
[17:24:12 CET] <momomo> tell me :)
[17:24:27 CET] <momomo> is there a better encoder /
[17:24:28 CET] <momomo> ?
[17:25:37 CET] <momomo> i am using libx264, right ?
[17:25:39 CET] <furq> yes
[17:25:45 CET] <furq> http://dev.beandog.org/x264_preset_reference.html
[17:25:54 CET] <furq> -preset fast (or whatever)
[17:26:10 CET] <furq> slower presets compress better
[17:26:26 CET] <momomo> what is the defualt ?
[17:26:29 CET] <furq> medium
[17:26:46 CET] <momomo> so just adding -preset fast would change that /
[17:26:47 CET] <momomo> ?
[17:26:50 CET] <furq> yes
[17:27:36 CET] <kepstin> -preset fast would make it use less cpu to encode, and make the video quality slightly worse.
[17:28:52 CET] <momomo> mm .. tough one
[17:29:50 CET] <furq> is that command using an excessive amount of cpu
[17:30:18 CET] <furq> i'd be using the slowest preset which doesn't cause dropouts
[17:30:27 CET] <furq> except placebo which is pretty much worthless
[17:31:15 CET] <momomo> dropouts ? I am getting alot of issues with laggign sound and images .. but it might be the source ... or the command i am running .. not sure ..
[17:31:33 CET] <furq> the encoder lagging behind the source
[17:31:47 CET] <momomo> http://hastebin.com/udojubijoz.rb
[17:32:15 CET] <furq> that sure looks like an issue with the source
[17:32:17 CET] <momomo> ooh. so I have too much dragging it down? but i have a fast computer .. and resource is around 3-6%
[17:32:23 CET] <furq> ^
[17:32:36 CET] <momomo> good to know
[17:32:42 CET] <momomo> i am executing this from a java program ... and on occasion, for some reason, ffmpeg appears to get stuck and use up to 70% of the processor ... I am not able to reproduce this so it's hard to figure out why ... at one time it appeared as if the output in the command line stood still... and alot of .ts files where being generated .. fast ... this would not be too good in the production environment ...V
[17:32:51 CET] <momomo> is there a safe guard against such scenarios, so the process would die or restart ?
[17:32:59 CET] <momomo> another scenario is if i run the command, and then pull out my etherrnet cable .. and then after a while put it in agian ... the ffmpeg command would exit ... is there a failsafe to allow to to continue or retry no matter what ?
[17:33:45 CET] <furq> i don't think there's any builtin functionality for retrying
[17:34:10 CET] <furq> the other thing sounds like a java issue
[17:34:23 CET] <momomo> no, i think it is ffmpeg.. never occured for you ?
[17:34:28 CET] <furq> in my expert opinion as a guy who's never used java but says bad things about it on irc
[17:34:32 CET] <momomo> java is only executing it as a command
[17:34:48 CET] <momomo> i can detect the process dying .. so that part is not a big issue ... but process hogging is a tough one ...
[17:34:49 CET] <furq> it could be down to the wonky source
[17:35:18 CET] <momomo> yes, the source right now is a eebox .. so i think thast might the issue
[17:36:32 CET] <momomo> but still would like to protect myself against such scnearios .. i saw that one could configure threads and stuff like that ... maybe I could try to start parsing the error stream as well .. is there a consistent error log format and documenttion for different stuff online ?
[17:37:02 CET] <galex-713> Hi, why when I encode two opus file with same bitrate but compression_level at 0 or 10 it gives a different filesize with vbr?
[17:37:31 CET] <Fyr> oh
[17:37:45 CET] <Fyr> different quality?
[17:37:52 CET] <galex-713> btw, setting -vbr on and setting the bitrate mean its not vbr but abr? or is more correct to say that abr is a way to use vbr?
[17:38:15 CET] <galex-713> The same file, same size (wav), same bitrate, but one is 10 and other is 0 of -compression_level
[17:40:14 CET] <kepstin> galex-713: '-vbr on' is the default in ffmpeg; with that setting, the bitrate value is treated basically as a quality setting (over a large corpus of test files, the average bitrate at the given quality is n)
[17:40:35 CET] <galex-713> not of a lot though, most of time its less that 0,1M, but for example with a bitrate of 80kbps I get 70M for compression_level=0 and 68M for compression_level=10
[17:41:01 CET] <kepstin> i'm not sure exactly what the 'compression_level' option does, it's not listed as an avoption for libopus encoder
[17:41:15 CET] <J_Darnley> Its a global option
[17:41:18 CET] <galex-713> kepstin: oh, like with a limit tending to infty you mean? so that average is not the one of the entire file?
[17:41:41 CET] <J_Darnley> What it does depends on the encoder
[17:41:54 CET] <J_Darnley> for flac it conrols the compression
[17:42:04 CET] <galex-713> Yeah I think, just like -q, which btw doesnt exist for opus but does for mp3
[17:42:10 CET] <J_Darnley> for lame it controls a minor quality option
[17:42:33 CET] <galex-713> https://www.ffmpeg.org/ffmpeg-codecs.html#Option-Mapping
[17:42:42 CET] <kepstin> lets see - in libopus, it sets the "complexity" option
[17:42:42 CET] <galex-713> why minor?
[17:42:58 CET] <galex-713> comp stands for complexity? not compression?
[17:43:16 CET] <kepstin> it controls basically "how hard the encoder will work"
[17:43:42 CET] <J_Darnley> Minor because the main control over quality is the bitrate or -V quality level
[17:43:47 CET] <kepstin> so think of it as similar to the x264 encoder's tune option - you can control it between "faster" and "more efficient audio encoding"
[17:44:12 CET] <kepstin> so with vbr mode, using more complexity should result in smaller bitrates for the same audio quality
[17:44:39 CET] <galex-713> okkk
[17:44:44 CET] <furq> i assume you should never use a compression level lower than 10 unless you need to decode it on very low-end hardware
[17:44:55 CET] <kepstin> the default is 10
[17:44:59 CET] <galex-713> oh ok
[17:45:03 CET] <galex-713> Yeah using 10
[17:45:15 CET] <furq> opus is designed to be usable on like 20mhz arm cpus
[17:45:27 CET] <galex-713> I think less is maybe suited for wide-minded voip/streaming
[17:45:28 CET] <kepstin> hmm, not really :)
[17:45:42 CET] <galex-713> ?
[17:45:43 CET] <kepstin> best i could get it decoding on my ipod classic (armv5) was around 60-70mhz
[17:45:51 CET] <furq> well it says that on the wikipedia page
[17:46:01 CET] <kepstin> with 128k music files tho; lower bitrate voice might be faster
[17:46:38 CET] <furq> it's designed with a view to being usable for telephony, so it needs to run on potatoes
[17:46:44 CET] <galex-713> While encoding just a man speaking with almost no other sound (some quite low background noise/beverage), what would be a suited bitrate? 16kbps? 8kbps? more? something in between?
[17:46:56 CET] <furq> test it and find out
[17:47:44 CET] <galex-713> Well, I dont trust my hears, so just wanted what is the common usage for that ^^
[17:47:50 CET] <galex-713> (using -application voip of course)
[17:49:47 CET] <kepstin> (keep in mind that the ipod cpu is nominally around 216mhz, so even at 60-70mhz decoding opus it was still in a power-saving mode most of the time)
[17:50:35 CET] <mariang> guys, do you know a command to make a video from images with audio from a mp3 file and compatible with mobile and desktop devices? my command is broken, i can't play on android http://pastebin.com/rWjZPQxm
[17:52:28 CET] <Fyr> mariang, how is it broken?
[17:52:53 CET] <Fyr> is the profile too high for your player?
[17:54:03 CET] <galex-713> If the volume of a sound file is pretty low, is there a way to normalize it? like to make the higher value stored the higher pick of the sound stream? so not to have to set manually some gain? (btw how to achieve that with ffmpeg otherwise?)
[17:54:39 CET] <kepstin> galex-713: ffmpeg can do that with audio filters, there's a couple ways
[17:54:52 CET] <kepstin> can either do a 2-pass normalization, and i think there's a dynamic compressor too
[17:55:32 CET] <galex-713> 2-pass can be fine
[17:55:59 CET] <galex-713> Ive the time and I want to get the best possible result :)
[17:56:13 CET] <mariang> Fyr: i'm loading mp4 in brower and when i play, .. nothing
[17:56:24 CET] <mariang> in chrome on android
[17:56:33 CET] <kepstin> well, the reason that it's two pass is that you need to see the whole audio to find the peak before you can know what to set the gain to :)
[17:56:53 CET] <galex-713> I knew it :p
[17:57:18 CET] <galex-713> So how to do that with ffmpeg? is there a example section in some filter section in some document? ^^
[17:57:18 CET] <Fyr> mariang, try different -profile:v
[17:57:20 CET] <galex-713> *doc
[17:57:23 CET] <Fyr> baseline or so
[17:59:04 CET] <kepstin> galex-713: can use the volumedetect or ebur128 filters to check the audio, then use the output of them to set a gain via the volume filter in a second pass.
[17:59:45 CET] <kepstin> or use one of the acompressor, compand, or dynaudnorm to to a single pass dynamic normalization.
[18:00:18 CET] <galex-713> whats the difference between volumedetect and eburl28?
[18:00:43 CET] <kepstin> the single-pass ones will change the volume over the course of the stream so it's all the same loudness, while the 1-pass ones will preserve relative loudness between parts and change only the overall volume
[18:01:27 CET] <kepstin> galex-713: read the filter docs. volumedetect provides only simple measurements like peak and rms, while ebur128 does a fancy perceptual loudness measurement.
[18:02:10 CET] <kepstin> if you want "all files to sound the same loudness", ebur128 is the way to go.
[18:04:28 CET] <galex-713> kepstin: should I do the first pass on the flac or opus file resulting from it?
[18:05:16 CET] <kepstin> any different would be unnoticable, and doing it on the flac is probably faster.
[18:05:39 CET] <galex-713> Ok cool
[18:06:52 CET] <galex-713> kepstin: And after the first pass ended what should I use in order to normalize?
[18:09:02 CET] <kepstin> galex-713: the filter will print out a value in either dB (volumedetect) or LUFS (ebur128). You need to pick a reference level (the ebur128 standard is -23LUFS, but some people find that kind of quiet) and then use a volume filter like "volume=+3.2dB" or whatever is needed to adjust it to the reference level you picked.
[18:10:04 CET] <furq> mariang: -pix_fmt yuv420p
[18:11:52 CET] <mariang> furq: yes, i tried but nothing
[18:11:59 CET] <mariang> I have a warning, deprecated pixel format used, make sure you did set range correctly
[18:12:13 CET] <furq> yuv420p, not yuvj420p
[18:12:47 CET] <mariang> yes
[18:12:47 CET] <mariang> http://pastebin.com/s9Zj0ZPP
[18:13:29 CET] <mariang> and the video is broken in vlc also. the sound is good but the images is locked
[18:14:01 CET] <furq> that's probably due to the framerate
[18:14:21 CET] <mariang> http://i.imgur.com/c8kRYEQ.png
[18:14:41 CET] <furq> actually nvm i don't think the input framerate affects the output framerate
[18:14:58 CET] <Fyr> mariang, are you sure about yuvj420p?
[18:15:11 CET] <kepstin> you could try just using the -r output option to set a higher output framerate, like 12 or 24 or whatever. It'll duplicate the image frames and give something that might work better in players. shouldn't increase the size too much.
[18:15:32 CET] <Fyr> mariang, try yuv420p.
[18:15:44 CET] <furq> Fyr: 17:12:47 ( mariang) http://pastebin.com/s9Zj0ZPP
[18:15:49 CET] <mariang> i tried
[18:16:13 CET] <Fyr> mariang, have you tried profile?
[18:16:27 CET] <galex-713> kepstin: https://paste.debian.net/413298/ there are several values in LUFS, which is the one I need to increase my stream by? (btw should I do -filter_complex volume=+<N>LUFS just as -filter_complex volume=<N>dB?)
[18:16:38 CET] <mariang> Fyr: yes
[18:16:46 CET] <Fyr> mariang, do you have a video that your phone can play? we can take a look at working case and analyze its parameters.
[18:17:13 CET] <kepstin> galex-713: LUFS is basically like dB, you'll use dB in the volume filter. You want the integrated loudness ("I") value
[18:17:45 CET] <galex-713> so like -filter_complex volume=+33.2dB?
[18:17:53 CET] <furq> mariang: if you need to support legacy android devices then -profile:v baseline
[18:18:10 CET] <kepstin> galex-713: so for that example you'd use volume=+10.2dB to bring it up to the -23LUFS reference level
[18:18:34 CET] <furq> and like kepstin said you probably want to set -r 24
[18:18:34 CET] <Fyr> mariang, maybe, it's not the video that causes dysfunction, maybe this is audio. I would recommend you to try the latest version of ffmpeg. it has improved AAC encoder.
[18:19:06 CET] <mariang> Fyr: I've compiled myself on centos
[18:19:21 CET] <galex-713> kepstin: ohhh ok, same unit different 0, like Kelvin and Celcius?
[18:20:25 CET] <kepstin> galex-713: it's actually basically the same unit (dbFS and LUFS both are "relative to digital full scale"), they just renamed it so you know it's a perceptual loudness rather than simple power measurement.
[18:20:52 CET] <galex-713> oh ok
[18:21:32 CET] <Fyr> mariang, could you pastebin ffprobe output.mp4 ?
[18:21:40 CET] <kepstin> galex-713: what the ebur128 filter I value says is that "this file has a loudness of -33 LUFS". Since that's 10LU = 10dB quieter than the reference level of -23LUFS, you use volume=+10dB to adjust it.
[18:22:13 CET] <galex-713> yeah I see
[18:22:21 CET] <kepstin> (you can obviously play around with it and pick a different reference level if you like)
[18:22:27 CET] <galex-713> Yeah
[18:22:50 CET] <galex-713> Well Im a bit maniac, I hate using magic numbers/values, so I prefer to keep that ^^
[18:23:00 CET] <mariang> Fyr: http://pastebin.com/zgwtU6dE
[18:23:12 CET] <mariang> lol
[18:23:43 CET] <furq> that sure looks like it should work
[18:23:54 CET] <furq> although since your build includes fdk-aac you should probably use that to encode the audio
[18:25:09 CET] <furq> maybe it's having an issue with the framerate
[18:25:18 CET] <furq> try setting -r 25
[18:26:26 CET] <galex-713> kepstin: does something alike chapters exist but for sound streams? or does that require a complex container like mkv?
[18:59:05 CET] <kepstin> galex-713: "chapters" are pretty much always handled as part of the container
[20:36:57 CET] <voip_> hello guys , am taking live rtmp stream and transcoding to mpeg2. Sourse is good, but on output sometime i have droped frames.
[20:37:09 CET] <voip_> -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 29.97 -g 45 -bf 2 -trellis 2 -cmp 2 -subcmp 2 -s 720x480 -b 4000k -minrate 3000k -maxrate 4000k -bt 350k -acodec ac3 -ab 192k -ar 44100 -async 1 -y -f mpegts udp://10.110.11.16:7000?pkt_size=1316
[20:37:16 CET] <voip_> how to fix ?
[20:39:30 CET] <silentquasar> Hi! I'm searching for hardware recommendations for a PC that will be used to stream 720p video (and audio) from a USB webcam (MS LifeCam Studio) to YouTube via ffmpeg. Up to this point we've been using a second-hand Core 2 Duo PC and streaming through the Hangouts interface, but the stream struggles a bit and sometimes drops out altogether. We have a ~$600 budget for an upgrade.
[20:40:47 CET] <llogan> silentquasar: are you using ffmepg with the current machine?
[20:41:36 CET] <silentquasar> No, we've been using the Hangouts web interface for YouTube Live Events.
[20:42:50 CET] <silentquasar> Windows often shows alerts saying that the webcam may not perform well due to low system resources.
[20:43:36 CET] <llogan> you should try ffmpeg before buying a new computer, but i don't know if your cpu will suffice or not.
[20:44:01 CET] <furq> is that even transcoding before uploading
[20:45:31 CET] <furq> low system resources usually means low memory
[20:45:36 CET] <silentquasar> Sorry to be unclear--this is live streaming on YouTube.
[20:45:41 CET] <furq> as far as windows is concerned anyway
[20:46:21 CET] <silentquasar> Right. Well I'll give ffmpeg a shot on its own. But for the sake of argument, if I had no PC to begin with, what would you recommend for this application?
[20:46:34 CET] <voip_> llogan, hi , ssory
[20:47:02 CET] <furq> it depends on what hangouts actually does. if it's a web interface then i assume it's just receiving the webcam feed and transcoding it remotely
[20:47:11 CET] <furq> in which case the only requirement would be fast enough internet
[20:47:45 CET] <silentquasar> I'm pretty sure it is doing client-side transcoding--I don't think it would be feasible to stream 720p raw video over a broadband connection.
[20:48:02 CET] <furq> it depends what format your webcam puts out
[20:48:06 CET] <voip_> llogan, do you know how to fix issue with frame drops isuue?
[20:48:18 CET] <furq> i'd assume it's mjpeg which could be feasible
[20:48:39 CET] <furq> what's your cpu usage like while it's running
[20:49:15 CET] <silentquasar> I'll have to get back to you on that one.
[20:49:23 CET] <furq> also if it is transcoding then i'd expect ffmpeg to do a better job, so try that if you can
[20:49:38 CET] <silentquasar> It's usually running pretty hot, but I don't remember the particulars.
[20:49:46 CET] <furq> if you want a general recommendation for video encoding then any recent-ish intel quad core (or 6-core) should be fine
[20:49:52 CET] <furq> the higher base clock the better
[20:50:03 CET] <llogan> voip_: i'm waiting for your full command and complete console output
[20:50:20 CET] <voip_> oh
[20:50:29 CET] <voip_> one min
[20:51:04 CET] <silentquasar> Thanks furq and llogan. Much appreciated.
[20:52:11 CET] <llogan> was going to tell him to use VBV if re-encoding
[20:53:40 CET] <alesan> hello I have a question - ffmpeg supports "SVC"?
[20:53:56 CET] <Fyr> what is that?
[20:53:56 CET] <alesan> as in the multi-stream H.264 thing
[20:54:04 CET] <alesan> https://en.wikipedia.org/wiki/Scalable_Video_Coding
[20:54:12 CET] <J_Darnley> no, unless another h264 encoder supports it
[20:55:02 CET] <alesan> what I do not understand is
[20:55:16 CET] <alesan> it does not seem to me to require any different encoder or decoder
[20:55:26 CET] <alesan> it seems more like a muxing/demuxing thing to me
[20:58:03 CET] <klaxa> iirc the main x264 dev said it's not feasible
[20:58:52 CET] <alesan> I honestly wonder why, in a technical sense
[20:58:58 CET] <alesan> note I am talking about encoding here
[20:59:06 CET] <alesan> but the same should be for decoding
[21:00:25 CET] <klaxa> http://x264.nl/developers/Dark_Shikari/consulting.html (ctrl+f svc)
[21:00:32 CET] <klaxa> not sure if that's still relevant
[21:00:39 CET] <alesan> I'll have a look
[21:01:18 CET] <klaxa> it's merely a short passage where he says he won't implement it
[21:02:58 CET] <voip_> llogan, pasted http://pastebin.com/P9DRKY10
[21:03:56 CET] <alesan> I see
[21:05:19 CET] <llogan> voip_: ffmpeg is dropping frames because you're using -r. also, why are you using -minrate and -async?
[21:05:24 CET] <llogan> and why mpeg2video?
[21:13:36 CET] <jkqxz> H.264 SVC encode is immensely difficult to do well in the general case, and any specific case requires a lot of effort on the part of the user to actually be of value. H.264 SVC decode is totally doable, but it would be a lot of work for little gain given the lack of SVC encoders.
[21:14:46 CET] <voip_> llogan, its live stream i think for live stream i shuld use -r. I dont know why i am using -asinc, somone recomend it. Our customer is TV company theyr equipment needs minimum 3mb bitrate and mpeg2
[21:17:01 CET] <voip_> whats the right commands for my cas e?
[21:21:33 CET] <voip_> when i taking HLS from same command i have too much drop frames
[21:21:37 CET] <furq> voip_: don't use -r unless you want the output to be a different framerate than the input
[21:23:32 CET] <voip_> so, also i dont need use -async ?
[21:24:09 CET] <furq> i doubt it
[21:27:22 CET] <alesan> thanks
[21:27:40 CET] <llogan> voip_: if you want to use -r, don't use 29.97, but use 30000/1001 or ntsc
[21:31:08 CET] <voip_> llogan, thank you , shuld i also remove commands -async 1 -y ?
[21:31:38 CET] <llogan> probably
[21:32:39 CET] <llogan> why "4" for threads? IIRC, by default it will choose appropriately.
[21:34:55 CET] <voip_> because 4 cores on cpu
[21:35:15 CET] <voip_> ok, i will delete
[21:44:08 CET] <voip_> thank you
[21:50:07 CET] <Prelude2004c> hey everyone good day... i am trying to launch an mp4 and overlay a bunch of text on the video.. is drawtext the best way to do it ?
[21:52:05 CET] <kepstin> depending how much text exactly, it might make sense to do it via subtitles instead.
[21:52:33 CET] <llogan> Prelude2004c: it depends on what you're doing. you can use drawtext but that will require re-encoding. you can use softsubs, but playback support may suck. you can do it upon playback if your player supports it, such as just using ffplay
[21:52:54 CET] <Prelude2004c> yes i am transcoding the video
[21:53:04 CET] <Prelude2004c> which is perfectly fine... but the problem is the text i want to add is a bunch of lines
[21:53:12 CET] <Prelude2004c> like it could be 5 or 6 lines of text
[21:53:36 CET] <Prelude2004c> like a customer notice or something.. not just a word or a single line.. so i am having trouble with it as it does not understand something siple like \n for new line
[21:53:39 CET] <Prelude2004c> or <center> etc
[21:53:48 CET] <kepstin> even if you're putting the text in hard, it might make sense to use subtitles and the subtitle filter, simply so you can use something like aegisub to do the timing and typesetting.
[21:54:10 CET] <Prelude2004c> the problem is the text changes
[21:54:36 CET] <Prelude2004c> so i have to always restart the encoding but since i am using HLS i continue segmenting from the same place so from customers perspect it just flips the new .ts with the new data
[21:54:42 CET] <llogan> or if you want to use drawtext you can use textfile option which may be easier to deal with new lines
[21:54:55 CET] <Prelude2004c> yes . never used htat before.. i was looking for that
[21:56:14 CET] <Prelude2004c> llogan, exacxlty what i wanted :P haha
[22:07:36 CET] <voip_> guys, what is mean option -y ?
[22:09:07 CET] <furq> voip_: https://ffmpeg.org/ffmpeg.html#Main-options
[22:09:31 CET] <voip_> thank you !
[23:03:08 CET] <debianuser> Hello, a short question, but I can't find an answer. :( I have .mkv with 1 video track, one ac3 and one dts track. And I want to recode dts track to ac3. If I set `-acodec copy` both tracks get reencoded, even the ac3 one. So how can I say something like `-acodec copy -acodec ac3` to make it copy first track and reencode second one?
[23:03:54 CET] <c_14> -c:a:0 copy -c:a:1 ac3 ?
[23:05:27 CET] <debianuser> Ah! I can do that? Thanks!
[23:09:55 CET] <debianuser> Yes, looks working! Thank you!
[23:38:51 CET] <galex-713> kepstin: does ogg support chapters?
[23:39:12 CET] <galex-713> Otherwise should I make a .mka?
[00:00:00 CET] --- Wed Mar 9 2016
More information about the Ffmpeg-devel-irc
mailing list