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

burek burek021 at gmail.com
Sat Jan 23 02:05:01 CET 2016

[01:05:44 CET] <rizuk> VLC can pick up the stream from ffmpeg, then redistribute it, acting as a server. Since FFmpeg is at times more efficient than VLC at doing the raw encoding..Can someone tell me how this is done i have ffmpeg stream running over UDP how do i get VLC to stream it to clients
[01:06:08 CET] <rizuk> redistribute it over http how?
[01:06:28 CET] <Mavrik> Uh.
[01:06:36 CET] <Mavrik> Why not use something more stable than VLC as a streaming server?
[01:06:51 CET] <Mavrik> There's bunch of streaming servers that can injest ffmpeg output.
[01:07:13 CET] <rizuk> because vlc is not as stable and ffmpeg uses less cpu imo
[01:07:51 CET] <rizuk> which streaming servers are they
[01:07:55 CET] <J_Darnley> I wonder what magic encoder it uses then.
[01:08:39 CET] <rizuk> tell me this same settings i use in vlc yet vlc uses more cpu?
[01:08:52 CET] <rizuk> FFmpeg same settings as vlc 20 percent less cpu usage
[01:11:07 CET] <J_Darnley> I read that backwards.  Now I doubly wonder what magic FFmpeg has.
[01:11:46 CET] <furq> is it time for me to mention nginx-rtmp again
[01:12:18 CET] <rizuk> shame nginx is not http what im after
[01:12:46 CET] <furq> why would you stream over http unless you wanted a bad stream
[01:12:53 CET] <furq> unless you mean hls in which case nginx-rtmp can do that
[01:13:16 CET] <J_Darnley> <furq> why would you stream
[01:13:18 CET] <J_Darnley> FTFY
[01:14:38 CET] <furq> but how else am i going to monetise myself pretending to react to video games which aren't really that bad
[01:18:28 CET] <rizuk> ffserver can do HTTP MPEG-TS output right
[01:18:43 CET] <rizuk> only for linux will have to get a vps for it.
[01:19:01 CET] <furq> please don't spend any money so that you can use ffserver
[01:19:25 CET] <rizuk> it will benefit me not you
[01:21:13 CET] <furq> i very much doubt that
[02:51:03 CET] <Logicgate> Okay
[02:51:11 CET] <Logicgate> So i need someone to help me with the calculations for ffmpeg
[02:51:14 CET] <Logicgate> For aspect ratio
[02:51:30 CET] <Logicgate> All videos need to end in 720x720 (1:1 ratio)
[02:51:47 CET] <Logicgate> And I get videos from all shapes and sizes
[02:51:51 CET] <Logicgate> So i need to calculate the padding
[02:51:59 CET] <Logicgate> However, I'm not able to figure out what the calculations are.
[02:54:30 CET] Action: J_Darnley prays you don't get any anamorphic video
[02:57:21 CET] <J_Darnley> pad=w=max(720,in_w),h=max(720,in_h),x=(720-in_w)/2,y=(720-in_h)/2
[02:57:39 CET] <J_Darnley> (plus escaping hell)
[03:01:25 CET] <Logicgate> J_Darnley that'll work for *ALL* container sizes?
[03:02:15 CET] <J_Darnley> if you scale to fit in 720x720 first, yes (which is what I was writing until you interrupted)
[03:02:52 CET] <Logicgate> Lol
[03:03:25 CET] <J_Darnley> scale=w=if(gte(1,dar),720,720*dar),h=if(lte(1,dar),720,720*(1/dar))
[03:03:30 CET] <J_Darnley> (I think)
[03:03:38 CET] <J_Darnley> (plus escaping hell)
[03:04:03 CET] Action: J_Darnley pulls up his terminal
[03:04:46 CET] <furq> those commas should be colons
[03:05:02 CET] <J_Darnley> oh shit, yes
[03:05:03 CET] <furq> the ones outside of brackets, that is
[03:05:34 CET] <J_Darnley> and the ones inside need escaping!
[03:05:57 CET] <Logicgate> I'll paypal you money if you get me the right formula to pad which ever way it needs to and scale whichever way it needs to
[03:06:01 CET] <Logicgate> :)
[03:06:29 CET] <J_Darnley> Paypal can get cancer and burn in the fires of hell!
[03:06:32 CET] <furq> will you paypal me money if i copy and paste the things J_Darnley just said
[03:06:51 CET] <Logicgate> furq, if you pm me and help me. Yes.
[03:07:00 CET] <Logicgate> that's if J_Darnley gives up[
[03:07:14 CET] <furq> no i'm pretty sure he just gave you the answer
[03:07:17 CET] <J_Darnley> ah!  errors!
[03:07:20 CET] <furq> or maybe not
[03:07:52 CET] <Logicgate> so do I need to fill in the blanks?
[03:08:08 CET] <Logicgate> or this is all good to go
[03:09:45 CET] <Logicgate> invalid size if(gte(..
[03:10:10 CET] <J_Darnley> where's a link to the fucking syntax when you need one?
[03:14:19 CET] Action: J_Darnley wonders if the numerical comarisons support floats
[03:17:19 CET] <J_Darnley> WTF is going on here?
[03:20:51 CET] Action: J_Darnley facepalms
[03:22:55 CET] <Logicgate> I GOT IT J_Darnley
[03:23:09 CET] <Logicgate> "scale=iw*min(720/iw\,720/ih):ih*min(720/iw\,720/ih):flags=lanczos,format=yuv420p,pad=720:720:(720-iw*min(720/iw\,720/ih))/2:(720-ih*min(720/iw\,720/ih))/2:black"
[03:23:52 CET] Action: J_Darnley points out that that doesn't support anamorphic
[03:24:03 CET] <Logicgate> difine anamorphic :(
[03:24:13 CET] <J_Darnley> scale=w=if(gte(dar\,1)\,720\,720*dar):h=if(lte(dar\,1)\,720\,720*(1/dar))
[03:24:50 CET] <J_Darnley> 16:9 DVD video has a frame size 720x480
[03:25:01 CET] <J_Darnley> its pixels are not square
[03:25:13 CET] <J_Darnley> it must be stretched for correct playback
[03:25:46 CET] <Logicgate> Okay so use your scale command?
[03:25:49 CET] <Logicgate> w=if(gte(dar\,1)\,720\,720*dar):h=if(lte(dar\,1)\,720\,720*(1/dar))
[03:25:54 CET] <Logicgate> That'll work on everything?
[03:26:01 CET] <J_Darnley> I believe so
[03:26:22 CET] Action: Logicgate is going to run some tests meow..
[03:26:45 CET] <furq> Logicgate: if you ignore the dar then input videos which don't use a 1:1 dar will end up at the wrong aspect ratio
[03:26:59 CET] <furq> or 1:1 par rather
[03:27:07 CET] <Logicgate> dar?
[03:27:13 CET] <furq> display aspect ratio
[03:27:31 CET] <J_Darnley> What blanks?
[03:27:39 CET] <J_Darnley> nevermind
[03:27:55 CET] <Logicgate> furq, okay so I'm not sure what I'm supposed to do then
[03:28:08 CET] <J_Darnley> My scale corrects for that
[03:28:15 CET] <furq> ^
[03:28:22 CET] <Logicgate> Awesome
[03:29:28 CET] <J_Darnley> If you do want to give money I would say send it to FFmpeg http://ffmpeg.org/donations.html
[03:29:44 CET] <furq> J_Darnley: if it makes you feel any better, i've been using megui all day
[03:29:52 CET] <furq> so at least you've not had the biggest video-related headache today
[03:30:26 CET] <J_Darnley> If anyone was wondering what my problem was: gte(1,dar) vs. gte(dar,1)
[03:30:47 CET] <furq> has there ever been a worse example of gui design than megui
[03:31:13 CET] <J_Darnley> Every driver utility?
[03:31:30 CET] <J_Darnley> Audio drivers in particular
[03:31:52 CET] <J_Darnley> Windows 8 and 10?
[03:32:10 CET] Action: J_Darnley goes to add his hardwork to the docs.
[03:33:24 CET] <furq> http://gadgets.boingboing.net/gimages/razergp6.jpg
[03:33:27 CET] <furq> i would rather use that than megui
[03:33:47 CET] <furq> although i am at least glad that megui hasn't included any bank gothic
[03:33:52 CET] <furq> the worst font in the world
[03:34:08 CET] <J_Darnley> Mouse utils!  How could I forget those?
[03:34:26 CET] <Logicgate> J_Darnley, that will also work for 1:1 ratio video right
[03:34:28 CET] <furq> how could you forget razer in any discussion about ugly computer shit
[03:34:38 CET] <J_Darnley> :)
[03:34:43 CET] <J_Darnley> Logicgate: let me test
[03:35:10 CET] <J_Darnley> yes
[03:35:34 CET] <J_Darnley> if dar is 1 then the constant 720x720 is used
[03:35:51 CET] <Logicgate> the output needs to be 720x720 always
[03:36:31 CET] <J_Darnley> and it should be with the right padding
[03:36:44 CET] <Logicgate> yes padding seems to be working fine right meow
[03:37:37 CET] Action: TD-Linux votes for UIs that literally give people cancer https://en.wikipedia.org/wiki/Therac-25
[03:38:20 CET] <furq> that still sounds better than megui
[03:40:11 CET] <Logicgate> J_Darnley, thanks a lot for the help
[03:40:15 CET] <Logicgate> I will be donating to FFMpeg
[03:40:30 CET] Action: Logicgate bows down to the greatness of J_Darnley and furq
[03:41:24 CET] <furq> mostly me though
[03:42:51 CET] <J_Darnley> ha ha.  why did I do 720*(1/dar) when that's the same as 720/dar?
[03:43:05 CET] <Logicgate> lol
[03:43:09 CET] <J_Darnley> (too much use of a calculator with rational numbers
[03:46:15 CET] <Logicgate> J_Darnley, so I should switch that
[03:46:17 CET] <Logicgate> to make it prettier
[03:46:32 CET] <J_Darnley> If you like
[04:45:57 CET] <saranshsrivastav> Hello
[04:46:45 CET] <saranshsrivastav> I am building a precompiled ffmpeg binary for android
[04:47:02 CET] <saranshsrivastav> But it is giving an error of PIE failure
[04:47:31 CET] <saranshsrivastav> Error: only position independent executables are supported
[04:47:46 CET] <saranshsrivastav> Anybody has a knowledge about it?
[04:47:54 CET] <saranshsrivastav> Arch=arm
[05:36:16 CET] <SeanM_> Hi
[08:39:05 CET] <esdwdftty> AMD CPUX2 3394Hz have commands: SSE 4.1, 4.2, SSE 4A. GPU no have decode vp9, H264 yes.
[08:39:05 CET] <esdwdftty> Uses the vp9 decoder for these commands? If not then maybe they will give some performance gains on the CPU?
[08:44:39 CET] <esdwdftty>  vp9 decoder ffmpeg
[08:51:56 CET] <TD-Linux> esdwdftty, ffmpeg's vp9 decoder already uses those instructions automatically.
[08:53:16 CET] <esdwdftty> ok
[08:58:34 CET] <esdwdftty> To decode vp9 need a new GPU architecture or it can implement on the new version of the GPU driver?
[09:01:03 CET] <esdwdftty> 4k HEVC, CPU 2-5 fps
[09:03:54 CET] <esdwdftty> vp9 1080p60 56-70% cpu, 4k HEVC, CPU 2-5 fps 98-100% cpu, me not need 4k
[09:05:09 CET] <esdwdftty> vp9 1080p60 an average of 60%
[09:12:21 CET] <esdwdftty> H264 1080p60 48-70% cpu average of 60%
[09:14:56 CET] <explodes_> I'm using ffmpeg through the JNI, I cannot figure out why ffmpeg is requesting to seek ~48 bytes away from the end of the file
[09:15:29 CET] <explodes_> correction: 32498 bytes from the end of the file
[09:22:23 CET] <explodes_> I also get a request to seek 1 byte away from the end of the file: SEEK_END offset=-1
[09:23:00 CET] <explodes_> Not sure if SEEK_END is a variable actually used in the FFMpeg circle but it is a value defined for the jni callback to seek to relative offset from the end of the file
[09:26:59 CET] <esdwdftty>  4k HEVC 25 frames, CPU 2-5 fps 98-100% cpu
[09:32:50 CET] <otopolsky_> hi, can someone tell me what could possibly mean when avcodec_encode_audio2 returned -22 Invalid argument?
[10:18:59 CET] <zylthinking> I am writing 2 streams using ffmpeg to mp4,  the stream comes from network. So it is possible that I have lots of stream 1  while stream 2 nothing. My question is can I write the stream 1 even the stream 1s pts is larger than stream 2 pts
[10:20:02 CET] <zylthinking> e.g. I have stream 1s pts 10000000, while, stream 2s pts 10, then can I write stream 1 to 10000000 before I write stream 2?
[10:20:44 CET] <zylthinking> stream 1 and stream 2 need sync with pts when playing
[10:21:49 CET] <zylthinking> e.g. I have stream 1s pts 10000000, while, stream 2s pts 10, then can I write stream 1 to 10000000 before I write stream 2 with pts  11?
[10:23:29 CET] <zylthinking> or I have to wait stream 2 before I write stream 1 with pts > 10?
[10:26:57 CET] <Mavrik> First of all, your streams should really have the same timebase.
[10:27:15 CET] <Mavrik> Second of all, while PTS may differ between streams, a too large of a drift will make the file unplayable on most players.
[10:27:29 CET] <Mavrik> (Where a lot of players will choke even on a 1 sec difference)
[10:30:52 CET] <termos> Is it possible to create an mp4 file that I can read while writing to? I get these moov atom issues since it's written in the end
[10:31:19 CET] <zylthinking> the streams have same timebase
[10:37:04 CET] <zylthinking> Mavrik, which the PTS may differ between streams means? I have the streams with pts of everything OK, only that I may write lots of video frames before writing any audio frame, then when I have any audio packet to write, there is a big gap between the audio pts with the last writen video pts
[10:53:43 CET] <Mavrik> termos, segmented I guess, but if you have that use-case MP4 is not a container to use.
[10:54:00 CET] <Mavrik> zylthinking, yes, that will break a lot of players.
[10:54:07 CET] <Mavrik> A/V should be as interleaved as possible.
[10:54:30 CET] <zylthinking> : Mavrik thanks
[10:54:33 CET] <Mavrik> Since players won't load whole MP4 file to memory just to find matching audio packet to go with video it's trying to play.
[10:54:56 CET] <Mavrik> They usually buffer a short amount (depending on implementation) and will break hard if the matching packets for streams aren't found.
[10:55:01 CET] <Mavrik> Or will just play without audio or video.
[11:10:54 CET] <zylthinking> another question, can mp4 contain more than one video stream?
[12:05:52 CET] <jcalonso> Hello, Im using ffmpeg and ffserver to stream video coming from a dvr, it works fine for some seconds but then the video freeze and sometimes it able to continue if I stop and play again (vlc), sometimes i  neec to stop ffmpef y start over again, any ideas?
[12:06:23 CET] <jcalonso> i can paste the full command if that helps
[12:07:51 CET] <waressearcher2> jcalonso: hallo und herzlich willkommen
[13:27:01 CET] <spaam> waressearcher2: nemen tack så mycket!
[15:08:32 CET] <esdwdftty> Make decoding vp9, HEVC on OpenCl CPU + GPU offers a good trade-off http://www.arm.com/zh/files/event/B-2.2014_ARM_Multimedia_Seminar_Ittiam.pdf
[15:18:03 CET] <rektimus> vp9 @ 200kbps doesnt seem bad
[15:18:05 CET] <rektimus> for a 340p video
[15:25:10 CET] <esdwdftty> i know, i only have on gpu, h264, vc1, mpg2, mpg4. the pdf talks about "Mali" gpu (tablets, smartphones) I showed the idea on the example of Mali: CPU + GPU /
[15:25:11 CET] <esdwdftty> Open CL
[20:45:43 CET] <explodes_> Is it current during stream load to have ffmpeg read the end of the video file? (mp4, if that makes a difference)
[20:47:12 CET] <c_14> yes
[20:47:17 CET] <c_14> that's where the moov atom (usually) is
[20:48:47 CET] <BtbN> you can't stream mp4, if that's what you're asking.
[20:51:02 CET] <kepstin> explodes_: if you're pre-encoding file for http streaming, you can use the "-movflags faststart" ffmpeg option or qt-faststart tool to move the moov to the start of the file, which should speed up loading over http.
[20:51:33 CET] <explodes_> I'm using c api to decode a local file
[20:52:19 CET] <explodes_> but c_14 gave me the expected answer. do I need to reset my stream's position to 0 or will the seek callback function be provided with the absolute position?
[20:52:26 CET] <explodes_> (after load)
[20:56:16 CET] <explodes_> one of my video files comes out scrambled. all of them crash after about 1 second (it seems that the 'loaded' 262Kb are the only ones properly rendered, then I get a crash during the next read callback)
[20:56:33 CET] <kepstin> explodes_: the callback should be passed an argument for that, I think? if you get SEEK_SET it's an absolute position, SEEK_CUR is relative?
[20:57:08 CET] <explodes_> yea, i am getting those: AVSEEK or SEEK_SET or SEEK_END too
[20:57:21 CET] <explodes_> with reasonable offsets as well.
[20:57:35 CET] <explodes_> I'm not sure why my code crashes: the stack trace is messy
[21:36:35 CET] <explodes_> This is the stack trace: http://pastebin.com/5DGDfhmn
[21:46:07 CET] <jkqxz> ReadFunc is the native callback attached to lavf, which tries to call back to your Java code but somehow the place it's calling back to is invalid?
[21:50:20 CET] <jkqxz> If that worked for a few calls and then stopped, maybe you've lost all references to the object containing the callback and it's been garbage collected?
[23:05:34 CET] <skywalker> Hello
[23:06:05 CET] <skywalker> I am building a precompiled executable of ffmpeg for an android project
[23:09:08 CET] <skywalker> And i want to build with x264 vcodec
[23:09:32 CET] <skywalker> In arm architecture
[23:10:05 CET] <skywalker> The problem is : vcodec x264 is building for x86 architecture
[23:11:05 CET] <skywalker> Does anyone know how to build ffmpeg precompiled executable with x264 codec for ARM architecture?
[23:11:21 CET] <Logicgate> skywalker, this might help: http://forum.synology.com/enu/viewtopic.php?t=64609
[23:12:13 CET] <J_Darnley> > --disable-asm
[23:12:22 CET] <J_Darnley> Are these ARM people retarded?
[23:12:37 CET] <J_Darnley> (yes, they're trying to use x264 on AMR)
[23:14:09 CET] <Logicgate> lol
[23:14:22 CET] <Logicgate> J_Darnley, seems as if the channel is flooded with people trying to accomplish the samething
[23:14:27 CET] <Logicgate> should make an off channel #ffmpeg-arm
[23:15:01 CET] <skywalker> @Logicgate, bdw i solved yesterday's problem of PIE
[23:15:55 CET] <skywalker> By configuring cflag with -fPIE and ldflag with -pie
[23:16:00 CET] Action: J_Darnley is going to get kicked again at this rate
[23:17:16 CET] <furq> it's ok i'm sure you'll find some other place to talk shit
[23:18:17 CET] <Logicgate> J_Darnley, I like your style though. That's how I operate my company
[23:18:25 CET] <Logicgate> People with hurt feelings get fired
[23:19:04 CET] <skywalker> Lol
[23:19:28 CET] <Logicgate> I got no time for feelings lol
[23:27:05 CET] <skywalker> The link looks promising. But i want to build it for licence version 2.1. I hope that won't be a problem
[23:27:18 CET] <skywalker> I will try that in the morning. I wasn't  expecting such a quick reply,  lol
[00:00:00 CET] --- Sat Jan 23 2016

More information about the Ffmpeg-devel-irc mailing list