[Ffmpeg-devel-irc] ffmpeg.log.20170207
burek
burek021 at gmail.com
Wed Feb 8 03:05:01 EET 2017
[00:01:02 CET] <xtina> didn't know it would be so difficult to stream audio and video from my Pi. i've spent days trying to learn how to use ffmpeg, and stll no luck.....
[00:02:50 CET] <xtina> i don't want to keep bugging you guys but i don't know where to ask for help. i tried mailing ffmpeg-users and my msg never got approved since i'm not a user. raspberry pi and reddit don't seem to have large ffmpeg communities. i don't want to file a ticket since i don't think i'm hitting bugs, just need some help
[00:11:53 CET] <llogan> xtina: 1. the mailing list moderation queue doesn't get cleared immediately. 2. i see no message in the queue in ffmpeg-user from you.
[00:12:52 CET] <xtina> llogan: i sent a msg to the list 11 days ago. i got 3 msgs saying itwas being held for approval. no msg saying it was ever approved.
[00:13:34 CET] <xtina> do you know my email adress? zou [dot] christina [at] gmail
[00:18:39 CET] <xtina> llogan: the question's not valid at this point anyway, it's almost 2 weeks old. i just wish there were a reliable place to get help from the ffmpeg communiy, the way RPi has its very active RPi forums.
[00:19:39 CET] <llogan> those were all approved
[00:19:41 CET] <llogan> https://lists.ffmpeg.org/pipermail/ffmpeg-user/2017-January/035086.html
[00:20:27 CET] <llogan> you got a reply but never replied to it
[00:20:28 CET] <xtina> llogan: hmm no idea why i never got emails saying my msg was approved or notifying me of the reply
[00:20:45 CET] <xtina> there's nothing in my inbox after i sent those messages out
[00:21:21 CET] <llogan> i do not believe you get a message that it has been approved. and unsubscribed users don't get replies because most people reply to the mailing list itself (and they usually don't know if a user is subscribed or not)
[00:21:48 CET] <xtina> how am i supposed to know if someone replied to my message, the?
[00:22:04 CET] <xtina> when i didn't even know that my msg ever made it onto the mailing list?
[00:22:12 CET] <llogan> users that aren't subscribed can still send to ffmpeg-user. they have to check the archives for replied, or asked to be CCd for replies.
[00:22:27 CET] <llogan> most valid messages are approved
[00:23:13 CET] <xtina> all right. i didn't realize i was supposed to check constantly to see if my message made it in. but i suppose i should have just subscribed, although i don't really need to be a part of the mailing list
[00:25:03 CET] <llogan> i guess i should make better instructions on contact.html, but i doubt they would be read in the first place.
[00:25:25 CET] <llogan> since there is already a wall of text
[00:25:45 CET] <xtina> overall, i would really love a forum like raspberry pi has, as it's so much easier for reading and searching threads. of course, beggars can't be choosers and i'm glad this IRC channel and the mailing list exist
[00:26:37 CET] <xtina> when i try to search for help on my ffmpeg issues (like alsa xbuffer overrun) i get ffmpeg tickets and unanswered stackoverflow questions.. very difficult to find the nuggets of info
[00:27:19 CET] <llogan> does the output sounk ok despite the messages?
[00:27:27 CET] <sware> xtina: what's the issue ?
[00:29:05 CET] <xtina> sware: it's a bit of a mess, but piping raspivid/arecord into ffmpeg is giving me far better performance than the equivalent (i think) command purely in ffmpeg, which gives constant alsa buffer overrun errors and audio almost completely cut out
[00:29:22 CET] <xtina> Approach 1. sudo rm temp.v mkfifo temp.v arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v | raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | \ ffmpeg \ -re \ -i - \ -i temp.v \ -ab 32k \ -ac 2 \ -strict -2 \ -c:v copy \ -c:a aac \ -report \ -vsync 2 \ -async 1 \ -f flv rtmp://209.85.230.23/live2/KEY
[00:29:36 CET] <xtina> Approach 2. ~/special/ffmpeg/ffmpeg -report -re -f alsa -ar 48000 -acodec pcm_s32le -i mic_sv -f v4l2 -thread_queue_size 512 -framerate 20 -probesize 100 -i /dev/video0 -c:v h264_omx -acodec aac -f flv rtmp://209.85.230.23/live2/KEY
[00:29:54 CET] <sware> you're streaming from your ?
[00:29:57 CET] <xtina> approach 1 > approach 2, at the moment
[00:30:02 CET] <xtina> pi zero with pi camera
[00:31:38 CET] <sware> you have omx and omx_rpi enabled?
[00:32:26 CET] <sware> how did you build ffmpeg?
[00:33:27 CET] <xtina> sware: in the first command i'm using the static ARMEL build from johnvansickle's site
[00:33:52 CET] <xtina> for the second, i had to recompile ffmpeg with omx and alsa enabled, and i just did it a few days ago, so it's a fresh build
[00:34:17 CET] <xtina> i used these instructions to build ffmpeg for the 2nd cmd http://vpaste.net/cXV9F
[00:35:18 CET] <sware> yeah don't use prebuilt, build your own
[00:35:50 CET] <xtina> sware: well, the approach where i built my own performs way worse
[00:36:00 CET] <sware> can you put your .config up somewhere on pastebin or something from that build so I can look at it ?
[00:36:42 CET] <sware> config.h*
[00:38:31 CET] <xtina> i don't *think* anything is wrong wth my custom built ffmpeg bcause i followed instructions from someone here to build it. but here is my compile.h file for the custom ffmpeg: http://pastebin.com/CAJcZEHB
[00:42:36 CET] <sware> seems okay at first look
[00:43:28 CET] <xtina> yea, i don't think anything is wrong with it. perhaps something wrong with the command that uses it. i can share my report log pastebins from approach 1 and approach 2 with you
[00:44:50 CET] <sware> I've only done decoding with the pi not encoding. Never had a camera to do it.
[00:45:03 CET] <xtina> This is piping raspivid/arecord into ffmpeg: http://pastebin.com/56P5Vs6Z
[00:46:38 CET] <xtina> this is with everything in ffmpeg. this is the one with trouble: http://pastebin.com/hatZBjnH
[00:46:55 CET] <xtina> sware: fair enough, no worries if you're not familiar
[00:47:23 CET] <sware> well I'm just thinking that maybe you should be looking into mmal
[00:48:22 CET] <furq> alsa and omx works fine on my pi 2, but i've never had cause to use v4l and i'm not running raspbian
[00:48:48 CET] <furq> i know other people in here have got that setup working
[00:49:00 CET] <sware> pi zero is significantly less powerful though isn't it?
[00:49:45 CET] <furq> that might not matter
[00:49:47 CET] <xtina> furq: but if things work OK if i pipe raspivid/arecord into ffmpeg, it doesn't seem like my Zero is too weak to handle this operation?
[00:49:48 CET] <furq> depends what format the camera is putting out
[00:50:04 CET] <furq> although even if it's h264 i'd have thought the pi zero could handle it
[00:50:08 CET] <xtina> i've managed to stream about 1 min of video+audio by piping raspivid/arecord into ffmpeg, but the sound and video were out of sync and the sound was not stable
[00:50:17 CET] <xtina> my cpu usage is not high, 20% or less
[00:50:31 CET] <xtina> i'm using the default rpi camera
[00:50:32 CET] <furq> does it work with raspivid and ffmpeg alsa, or arecord and ffmpeg v4l
[00:50:49 CET] <furq> or if you write to a file (or /dev/null)
[00:51:54 CET] <xtina> furq: i can try those. but i'm also wondering whether i should just try to optimize the 2-pipe into ffmpeg thing ...
[00:52:11 CET] <xtina> i would only want to contain everything in ffmpeg if getting good sync is impossible with 2-pipe into ffmpeg
[00:53:09 CET] <furq> well those should at least help you isolate where the problem is
[00:54:00 CET] <furq> what you're doing looks fine to me but i don't have the same hardware setup
[00:54:44 CET] <xtina> furq: i will try a single pipe, and see which one fails. but even my 2-pipe setup (my best so far) is far from 'good'
[00:54:59 CET] <xtina> i haven't managed a setup where the audio and video are in sync
[00:55:09 CET] <furq> i mean you could just try v4l on its own to /dev/null, and alsa on its own, etc
[00:55:13 CET] <xtina> and the video sometimes skips forward, the audio sometimes cuts out
[00:55:21 CET] <xtina> btw, i've streamed video only from the zero in ffmpeg
[00:55:24 CET] <xtina> it works perfectly
[00:55:29 CET] <furq> replace everything after -f flv with -f null -
[00:55:56 CET] <xtina> i should try audio only, i suppose.
[00:56:08 CET] <xtina> since i know the video's fine. i'll give that a go
[01:30:34 CET] <xtina> furq: i'm trying to test streaming audio only, with arecord to ffmpeg. i know anullsrc creates silent audio, do you know the equivalent for video?
[01:30:48 CET] <furq> nullsrc
[01:31:11 CET] <furq> although i normally use testsrc and sine for testing
[01:33:17 CET] <xtina> thanks :)
[02:57:37 CET] <xtina> furq: hey, wondering if you'd know why my arecord command works when writing a test.wav file, but then shows lots of overrun! messages and produces clippy, skipping audio when sending a stream to ffmpeg?
[02:58:09 CET] <xtina> this generates a clippy, skipping stream: arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -re -f lavfi -i testsrc -i - -ab 32k -ac 2 -c:a aac -f flv rtmp://209.85.230.23/live2/KEY
[02:58:33 CET] <xtina> but this is OK: arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.wav
[03:06:11 CET] <xtina> i'm sending an empty video file, so it should not take any extra processing..
[03:07:50 CET] <xtina> specifically, it shows:
[03:07:51 CET] <xtina> overrun!!! (at least 2339.409 ms long)6kB time=00:00:00.25 bitrate= 525.9kbits/s speed=0.255x overrun!!! (at least 82.880 ms long) 36kB time=00:00:00.53 bitrate= 545.8kbits/s speed=0.258x overrun!!! (at least 6.315 ms long) 42kB time=00:00:00.84 bitrate= 410.8kbits/s speed=0.273x overrun!!! (at least 54.927 ms long) 61kB time=00:00:01.13 bitrate= 442.3kbits/s speed=0.27x overrun!!! (at least 164.733 ms long)67kB time=0
[03:50:22 CET] <xtina> why are there params like rtmp_buffer_size that seem to be recognized by ffmpeg, but have absolutely no documentation?
[04:10:47 CET] <xtina> furq: (or anyone else) my audio stream works well, no alsa xruns, but if i add in a null video source, i get tons of alsa xruns
[04:11:07 CET] <xtina> audio only cmd: ~/special/ffmpeg/ffmpeg -report -f alsa -ar 44100 -acodec pcm_s32le -i mic_sv -acodec aac -f flv rtmp://209.85.230.23/live2/KEY
[04:11:27 CET] <xtina> audio + null video (this one has tons of alsa buffer xruns): ~/special/ffmpeg/ffmpeg -report -f alsa -ar 44100 -acodec pcm_s32le -i mic_sv -acodec aac -f lavfi -i testsrc -f flv rtmp://209.85.230.23/live2/KEY
[04:11:38 CET] <xtina> why would adding in a null testsrc video source cause alsa buffer xruns?
[04:11:45 CET] <xtina> any idea how to fix?
[04:12:30 CET] <furq> you forgot -c:v h264_omx in the second command
[04:22:28 CET] <xtina> furq: good catch, you're right! only seeing 1 buffer xrun now, so that's great. but my resulting audio in the audio-only stream is completely choppy...
[04:23:16 CET] <xtina> i don't see any issues with the logs
[04:23:18 CET] <xtina> Input #0, alsa, from 'mic_sv': Duration: N/A, start: 1486437336.145364, bitrate: 2822 kb/s Stream #0:0: Audio: pcm_s32le, 44100 Hz, stereo, s32, 2822 kb/s Input #1, lavfi, from 'testsrc': Duration: N/A, start: 0.000000, bitrate: N/A Stream #1:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[04:23:32 CET] <xtina> Stream mapping: Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx)) Stream #0:0 -> #0:1 (pcm_s32le (native) -> adpcm_swf (native))
[04:31:11 CET] <furq> do you have -acodec aac in that command
[04:31:17 CET] <furq> it's converting to adpcm_swf for some reason
[04:43:45 CET] <jesseg> What's the trick to getting ffplay to build?
[04:44:07 CET] <furq> sdl
[04:44:28 CET] <jesseg> ahhhh... hmmm.. I have some version of SDL that came with distro, maybe I need a newer SDL
[04:44:29 CET] <xtina> furq: i did have -acodec aac in that command. it looked like this: ~/special/ffmpeg/ffmpeg -report -f alsa -ar 44100 -acodec pcm_s32le -i mic_sv -acodec aac -f lavfi -i testsrc -c:v h264_omx -f flv rtmp://209.85.230.23/live2KEY
[04:44:58 CET] <jesseg> furq, which version of SDL?
[04:45:16 CET] <furq> sdl 2
[04:45:28 CET] <jesseg> Ahhhh... k.. thanks.. I have 1.2.15 :D
[04:45:52 CET] <xtina> hmm, am i supposed to send raw pcm_s32le to my youtube live rtmp?
[04:45:54 CET] <xtina> (flv)
[04:45:56 CET] <furq> no
[04:46:08 CET] <xtina> i thought i needed aac acodec
[04:46:20 CET] <furq> aac, mp3 or (apparently) adpcm_swf will work
[04:46:59 CET] <furq> at least they'll get muxed into flv without erroring
[04:47:09 CET] <furq> whether they'll work in a player is another thing
[04:47:18 CET] <xtina> i'm specifying -acodec aac
[04:47:21 CET] <xtina> but seeing: Stream #0:0 -> #0:1 (pcm_s32le (native) -> adpcm_swf (native))
[04:47:27 CET] <furq> yeah i'm not sure what's going on there
[04:47:33 CET] <furq> are you getting any warnings
[04:49:03 CET] <xtina> i'm not getting warnings
[04:49:06 CET] <xtina> just see this in the report log
[04:49:06 CET] <xtina> Stream #0:1, 0, 1/1000: Audio: adpcm_swf ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 352 kb/s Metadata: encoder : Lavc57.75.100 adpcm_swf
[04:50:42 CET] <xtina> hmmm.. does anything look wrong with this command?
[04:50:50 CET] <xtina> ~/special/ffmpeg/ffmpeg -report -f alsa -ar 44100 -acodec pcm_s32le -i mic_sv -acodec aac -f lavfi -i testsrc -c:v h264_omx -f flv rtmp://209.85.230.23/live2/KEY
[04:51:16 CET] <furq> oh
[04:51:25 CET] <furq> put -acodec aac (or -c:a aac) after testsrc
[04:52:23 CET] <xtina> aha, yea
[04:52:36 CET] <xtina> good catch.. sigh.. i'm bad at ordering these params, apparently!
[04:58:46 CET] <xtina> hmm, i think the choppiness is actually that the audio is playing back at wayyy slower than realtime
[05:03:47 CET] <xtina> i saw the -async flag in documentation and thought it might help the audio play back in realtime. i set -async 2 but get tons of errors:
[05:03:52 CET] <xtina> Non-monotonous DTS in output stream 0:1; previous: 1811, current: 1609; changing to 1811. This may result in incorrect timestamps in the output file.
[05:04:25 CET] <xtina> i also remembered that the audio was not choppy when i piped it from arecord to ffmpeg via an input file, with the -re command
[05:04:51 CET] <xtina> is there some param i'm missing now, causing the audio to stutter and play at 1/3 speed?
[05:05:25 CET] <furq> isn't your capture device 48khz
[05:16:56 CET] <xtina> furq: ty for the patience.. you're right, my device is at 48khz. i modified my command: ~/special/ffmpeg/ffmpeg -report -f alsa -ar 48000 -acodec pcm_s32le -i mic_sv -f lavfi -i testsrc -c:v h264_omx -c:a aac -f flv rtmp://209.85.230.23/live2/KEY
[05:17:00 CET] <xtina> but still crazy stuttering
[05:17:15 CET] <xtina> here is the stream that i recorded if it helps: https://www.youtube.com/watch?v=eK4a3DU4tBk
[05:17:41 CET] <xtina> this looks right:
[05:17:41 CET] <xtina> Stream mapping: Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (h264_omx)) Stream #0:0 -> #0:1 (pcm_s32le (native) -> aac (native))
[05:18:06 CET] <xtina> Output #0, flv, to 'rtmp://209.85.230.23/live2/xbjs-a3gp-0yvk-ftdg': Metadata: encoder : Lavf57.66.101 Stream #0:0: Video: h264 (h264_omx) ([7][0][0][0] / 0x0007), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc Metadata: encoder : Lavc57.75.100 h264_omx Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder
[05:20:07 CET] <xtina> again, it's odd, because this command works perfectly arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav test.wav
[05:31:45 CET] <jesseg> thanks furq ! sdl 2 fixed it for me!
[06:01:36 CET] <xtina> furq: can you tell what's causing my audio stream to skip a bit every 5seconds? https://www.youtube.com/watch?v=VPlsJtJrQm4
[06:01:50 CET] <xtina> arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -acodec pcm_s32le -i - -f lavfi -i testsrc -c:v h264_omx -acodec aac -ab 64k -bufsize 64k -g 50 -f flv rtmp://209.85.230.23/live2/KEY
[06:03:39 CET] <xtina> i noticed that the 'speed' output by ffmpeg is around ~0.85x instead of 1x. is that part of the reason?
[06:03:40 CET] <xtina> time=00:00:57.88 bitrate= 208.4kbits/s speed=0.849x
[06:27:28 CET] <xtina> so i can arecord to a file and stream that file with ffmpeg perfectly, but if i pipe an arecord command INTO ffmpeg, there's tons of skipping
[06:27:49 CET] <xtina> 1. (perfect, arecord->file->ffmpeg) arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & ~/special/ffmpeg/ffmpeg -report -re -i temp.v -f lavfi -i testsrc -c:v h264_omx -ac 2 -acodec aac -ab 32k -bufsize 32k -async 2 -f flv rtmp://209.85.230.23/live2/KEY
[06:28:06 CET] <xtina> 2. (skipping/dropping, arecord -> ffmpeg) arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -acodec pcm_s32le -i - -f lavfi -i testsrc -c:v h264_omx -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[06:28:34 CET] <xtina> the only differences i see are the -re and -async 2 in arecord->file->ffmpeg
[06:28:56 CET] <xtina> any idea how i should fix command 2?
[08:15:15 CET] <magican> Hi all! Finally got my screencapture with sound going, but! Voice and capture is out-of-sync, almost perfect at start, then it increases. Tried the -isync flag with no result. Tips anyone?
[08:16:02 CET] <magican> Command: ffmpeg -f x11grab -video_size 1920x1080 -i $DISPLAY -f alsa -i default -c:v libx264 -c:a aac -isync video.mkv
[09:18:36 CET] <squ> what is alsa?
[09:25:29 CET] <kerio> a mediocre rewrite of OSS
[09:39:12 CET] <Guest88919> ffprobe duration and bitrate is n/a for m2v video, any ideas? just updated centos from 5 to 7,
[10:00:57 CET] <satinder___> hi please anyone help me I am getting following errors continously :
[10:00:59 CET] <satinder___> [alsa @ 0x34b1700] ALSA buffer xrun.218kB time=00:00:04.14 bitrate= 429.5kbits/s dup=0 drop=15 speed=2.75x
[10:01:12 CET] <satinder___> my command is following :
[10:01:56 CET] <satinder___> ffmpeg -f alsa -i hw:1 -i /dev/video0 -vcodec mpeg4 -b:v 2M -maxrate:v 3M -minrate:v 2M -ar 44100 -f mpegts video.ts
[10:08:37 CET] <petershaw> I am looking for a command line tool that can split a video on a frame that is in a solid base color (eg. green). Some ideas?
[10:20:32 CET] <satinder___> Is there anyone please help me ? see above mentioned issues
[10:52:47 CET] <llamapixel> Image processing in something like OpenCV perhaps petershaw
[10:54:04 CET] <llamapixel> http://opencv-srf.blogspot.com.au/2010/09/object-detection-using-color-seperation.html
[10:55:05 CET] <llamapixel> If you also be specific about what you are detecting it might be eaier to identify.
[10:55:08 CET] <petershaw> llamapixel: thanks a lot. that looks promising
[10:55:17 CET] <llamapixel> EG: tv commercial black fades.
[10:55:21 CET] <llamapixel> oh ok mate
[11:11:39 CET] <satinder___> llamapixel : hi
[11:11:53 CET] <llamapixel> hey
[11:12:13 CET] <satinder___> I want make video conference project
[11:12:30 CET] <satinder___> which library is perfect
[11:12:41 CET] <satinder___> right now I am using ffmpeg
[11:13:14 CET] <satinder___> llamapixel : please help me
[11:16:20 CET] <llamapixel> The question is a little broad, I assume you have two nodes ( computers ) to test the basic premise with. I also suspect that you need to fill in the technical gaps so you dont have to ask for help satinder___ . ffmpeg however is not a bad place to start your prototyping.
[11:18:56 CET] <satinder___> ok thank you
[11:18:57 CET] <llamapixel> http://blog.kris-lab.com/2015/06/01/simple-osx-bi-directional-video-chat-using-ffmpeg-ffplay-and-wowza/ if you are asking about a tutorial as well to get you started on the basics satinder___
[11:19:07 CET] <satinder___> llamapixel : :)
[11:19:13 CET] <llamapixel> The article above uses a different streaming server.
[11:19:32 CET] <satinder___> llamapixel : Actually I want make a prototype only
[11:19:51 CET] <satinder___> because I have very small time period
[11:20:29 CET] <satinder___> I want one more opinion from your side , Is Command line ffmpeg is good for prototyping
[11:20:42 CET] <satinder___> llamapixel : ??
[11:20:52 CET] <llamapixel> yes
[11:22:05 CET] <satinder___> ok thank you
[11:22:28 CET] <abd5932> Hello, I have to stream a mp4 file with following specs ( http://pastebin.com/jfcmR0Dr ). I have not encoded it, and I think it can be optimized for streaming. Probably the first thing to do is to reduce 50fps to 25fps. 1. How can I do it with CLI? 2. I don't know what tbr, tbn, tbc are - but maybe there are other parameters that can be tuned (without serious loss in quality)? Thank you very much!
[11:22:56 CET] <satinder___> where from I can start actually I am getting error alsa xbuffer run see my above mentioned question on top
[11:26:33 CET] <debianuser> satinder___: alsa buffer overrun/underrun usually means that application (ffmpeg) has not enough CPU, or slowed down by something else, so it doesn't read soundcard buffer in time, it reads slower than soundcard puts the data into it, and the buffer overflows. It's not a fatal error, any alsa application should automatically recover from xrun. But you may hear slight audio click when xrun happens.
[11:29:13 CET] <debianuser> satinder___: So it's not xrun that you should be fighting with, but the reason xrun was caused by. Check if you have enough CPU for ffmpeg. Try recording video-only and audio-only, make sure it's recorded properly. Check if your disk is fast enough to write encoded data, etc. You need to find what slows ffmpeg in the first place, and then try to fix it. :)
[11:32:13 CET] <abd5932> how can I reduce fps from 50 to 25 with ffmpeg?
[11:32:29 CET] <abd5932> (leaving the rest as it is...)
[11:34:26 CET] <durandal_1707> abd5932: see fps filter docs
[11:34:47 CET] <satinder___> debianuser : ok
[11:34:50 CET] <satinder___> thanks
[11:34:58 CET] <abd5932> durandal_1707: thank you! any link?
[11:35:30 CET] <satinder___> but sir my cpu is very powerful , intel i5 3rd generation quad core
[11:35:48 CET] <satinder___> then what is going wrong I not understand
[11:36:04 CET] <satinder___> ffmpeg -f alsa -i hw:1 -i /dev/video0 -vcodec mpeg4 -b:v 2M -maxrate:v 3M -minrate:v 2M -ar 44100 -f mpegts video.ts
[11:36:19 CET] <satinder___> above comand I am using
[11:44:33 CET] <abd5932> durandal_1707: in the docs I see example to reduce fps to 25 which looks like this: "fps=fps=25" ... but it seems to be only a part of the command... how the whole command should look like?
[11:46:13 CET] <durandal_1707> abd5932: ffmpeg -i input -vf fps=25 output
[11:46:31 CET] <abd5932> thank you very much! I'll check...
[11:49:09 CET] <abd5932> durandal_1707: it says: "No such filter: 'fps'" ... in which version was it added?
[11:49:57 CET] <durandal_1707> abd5932: what ffmpeg version you use?
[11:50:23 CET] <abd5932> 0.8.20
[11:52:34 CET] <kerio> satinder___: any particular reason you're using mpeg4?
[11:52:52 CET] <kerio> also you should probably specify an audio encoder
[11:53:44 CET] <satinder___> kerio : no reason
[11:53:52 CET] <satinder___> Please suggest to me
[11:54:14 CET] <kerio> well, what do you need to record?
[11:54:20 CET] <satinder___> how I can make zero_latency audio video streming using ffmpeg
[11:55:13 CET] <satinder___> I want send zero_latency video stream over the network
[15:58:56 CET] <Miyagui> Hi all :)
[16:02:07 CET] <Miyagui> I have a question : If you have an image over a video , there is any way to scale the image to the video size (keeping the aspect ratio)?
[16:11:38 CET] <kepstin> Miyagui: sure, using the 'scale2ref' filter, along with aspect ratio preservation options, e.g. force_original_aspect_ratio=decrease
[16:16:43 CET] <Miyagui> i got it in first try . Thanks kepstin!!
[16:18:09 CET] <Miyagui> can i evaluate if i need to resize by width or height?
[16:18:29 CET] <Miyagui> i think i can , i will work on that :)
[16:18:49 CET] <kepstin> that's what the 'force_original_aspect_ratio' option handles for you automatically - but you can use expressions for height/width if you prefer to do it manually
[16:31:42 CET] <Miyagui> I get info of force_original_aspect_ratio , and it is what i need
[16:31:49 CET] <Miyagui> you are awsome dude :) thanks
[18:27:01 CET] <MDesigner> hey folks. I'm struggling here.. I have ffmpeg on an Amazon Linux server that I use to automatically transcode audio files. it's failing in some cases due to no H.264 library.
[18:27:12 CET] <MDesigner> is there a quick/easy way to install ffmpeg with x264 support withouyt having to compile it?
[18:27:20 CET] <MDesigner> via yum
[18:34:38 CET] <relaxed> MDesigner: https://www.johnvansickle.com/ffmpeg/
[18:35:04 CET] <relaxed> although the above can't be installed using yum
[18:36:49 CET] <MDesigner> relaxed: but just downloaded, though.. so that works
[18:37:03 CET] <MDesigner> of course i'm already mid-compile.. I think I got it configured properly
[18:40:31 CET] <MDesigner> relaxed: you rock! thanks!
[18:40:40 CET] <relaxed> you're welcome
[19:59:12 CET] <Threadnaught> for some reason when I run "ffmpeg -i YA292Mf.gif -loop 2 lpd.mp4" the video file comes out not looped, is there any obvious reason why this might be?
[19:59:41 CET] <Diag> ffmpeg makes gifs?
[20:00:15 CET] <Threadnaught> it takes in gifs
[20:00:22 CET] <durandal_170> Threadnaught: put loop before -i
[20:00:43 CET] <durandal_170> Diag: yes. it can
[20:01:05 CET] <Threadnaught> so I thought that might be the problem, but when I do that it fails with "Option loop not found." I'm almost certain it's a recent version of ffmpeg
[20:01:10 CET] <Diag> durandal_170: https://www.youtube.com/watch?v=0IXwwcgIylo
[20:01:40 CET] <Diag> why am i still using handbrake
[20:02:19 CET] <durandal_170> Threadnaught: what 'ffmpeg -h demuxer=gif' outputs?
[20:03:28 CET] <Threadnaught> durandal_170:http://pastebin.com/58u1TEPN
[20:04:41 CET] <durandal_170> Threadnaught: try -ignore_loop 0
[20:05:11 CET] <Threadnaught> after -loop 2?
[20:05:46 CET] <Threadnaught> because it still can't find loop option
[20:05:50 CET] <durandal_170> Threadnaught: just before -i
[20:06:20 CET] <durandal_170> there is -stream-loop
[20:06:23 CET] <Threadnaught> ffmpeg -loop 2 -ignore_loop 0 -i YA292Mf.gif lpd.mp4 still fails
[20:06:45 CET] <Diag> wouldnt it be before the loop?
[20:07:22 CET] <durandal_170> also try stream loop or whatever it is called
[20:07:55 CET] <durandal_170> im not near computer right now
[20:08:06 CET] <Diag> durandal_170: then what are you on
[20:08:13 CET] <Threadnaught> tried ffmpeg -loop 2 -ignore_loop 0 -i YA292Mf.gif lpd.mp4 , ffmpeg -ignore_loop 0 -loop 2 -i YA292Mf.gif lpd.mp4 , ffmpeg -stream_loop 2 -i YA292Mf.gif lpd.mp4
[20:08:34 CET] <durandal_170> Diag: special device,smart one
[20:08:45 CET] <Threadnaught> also tried it with an mp4 input, same output
[20:08:46 CET] <Diag> durandal_170: well theres ffmpeg for android
[20:09:12 CET] <Threadnaught> this bug seems to be following me, didn't work when I was trying to hack a video together ssh'd into my raspi or now on my mc
[20:09:14 CET] <Threadnaught> *pc
[20:09:39 CET] <durandal_170> Threadnaught: try loop filter then, read documentation
[20:10:22 CET] <Threadnaught> also for some reason compose doesn't work, I tried that
[20:10:44 CET] <durandal_170> Threadnaught: compose what?
[20:11:08 CET] <Threadnaught> when you give it a text file and it spits out the videos / pictures in sequence
[20:12:04 CET] <durandal_170> wait, gif are single pictures?
[20:12:16 CET] <Threadnaught> well thanks anyway guys i have to go
[20:12:33 CET] <Diag> durandal_170: gifs can either be a single picture or an animation
[20:12:56 CET] <durandal_170> Diag: i know thats why i ask
[20:13:14 CET] <Diag> durandal_170: oh it sounded like you didnt know what a gif was lol
[20:14:16 CET] <durandal_170> if he wants to loop gif pictures it may not work
[20:14:31 CET] <Diag> oh
[20:21:30 CET] <someone_> Hello. Are there any "LTS" version of ffmpeg?
[20:22:01 CET] <Diag> someone_: is there any particular reason you ask?
[20:22:41 CET] <someone_> I am developing a piece of software depending on ffmpeg, and would like to see if such versions exist.
[20:22:55 CET] <Diag> Oh
[20:23:44 CET] <Diag> Fairly certain that flags hardly ever get deprecated if thats what youre worried about
[20:25:41 CET] <someone_> Well. The problem is that some users on Ubuntu 16.04 are reporting that my software doesn't work for them. While it works with me here on ffmpeg. Somethings changed (and a lot in the jump from 2 to 3) But I would like to know if I should go with 3.x or keep on 2.x.
[20:25:54 CET] <someone_> ffmpeg 3*
[20:30:32 CET] <JEEB> someone_: there are no "LTS" versions unless you pay to make some version such
[20:30:56 CET] <someone_> Thanks :)
[20:32:33 CET] <JEEB> also releases are not too much special either, someone generally just checks that FATE passes and decides on a revision
[20:32:46 CET] <Diag> fate?
[20:32:56 CET] <JEEB> so as long as you check that FATE passes for those architectures that interest you it's OK to update to HEAD as well
[20:33:08 CET] <JEEB> Diag: the automated regression testing suite
[20:33:16 CET] <JEEB> http://fatebeta.ffmpeg.org/
[20:33:27 CET] <JEEB> (older interface @ fate.ffmpeg.org)
[20:34:05 CET] <JEEB> contains all of the major architectures and operating systmes
[20:34:07 CET] <JEEB> *systems
[20:34:35 CET] <JEEB> linux, *BSD, macos, ios, android - IA32, x86_64, ARM, aarch64, MIPS
[20:34:41 CET] <JEEB> also powerpc I guess
[20:35:03 CET] <Diag> JEEB: powerpc? so it could run on the ps3? lol
[20:35:13 CET] <JEEB> yes
[20:35:17 CET] <Diag> huh
[20:35:32 CET] <Diag> i wonder how fast the ps3 could handle video conversion
[20:35:35 CET] <JEEB> not really
[20:35:36 CET] <Diag> id assume fairly quick
[20:35:41 CET] <JEEB> the powerpc cores are rather slow
[20:35:48 CET] <JEEB> they were rather slow even when PS3 was new
[20:36:00 CET] <JEEB> also there's not too much optimization for it
[20:36:16 CET] <Diag> Well i mean if someone took advantage of all the features of the processor...
[20:36:23 CET] <JEEB> those aren't powerpc tho
[20:36:34 CET] <JEEB> you had the powerpc cores and then some other sort of cores
[20:36:41 CET] <Diag> are you sure about that?
[20:36:44 CET] <JEEB> yes
[20:36:52 CET] <Diag> i dont recall that
[20:37:06 CET] <Diag> oh yeah look at that
[20:37:32 CET] <JEEB> http://www.psdevwiki.com/ps3/CELL_BE
[20:38:29 CET] <Diag> 128 registers?!
[20:39:26 CET] <JEEB> too bad the SPEs require custom code :P
[20:39:47 CET] <JEEB> (and compiler)
[20:39:56 CET] <Diag> idunno
[20:39:58 CET] <Diag> from what im reading
[20:40:00 CET] <Diag> if shit can use it
[20:40:04 CET] <Diag> it sounds pretty quick
[20:40:24 CET] <JEEB> as I said, it needs custom code specific to that thing
[20:40:39 CET] <JEEB> I guess you could do it as an academical thing if you find an SDK
[20:40:45 CET] <Diag> pff
[20:40:46 CET] <Diag> good luck
[20:41:19 CET] <Diag> "Dual Issue (Each SPE can execute 2 instructions per clock)"
[20:41:21 CET] <Diag> wat
[20:41:31 CET] <atomnuker> I think its amazing there's an emulator for the ps3 at all
[20:41:38 CET] <Diag> is there....
[20:41:54 CET] <atomnuker> its even more amazing it works well for quite a lot of games now, in realtime
[20:41:59 CET] <Diag> really?!
[20:42:00 CET] <JEEB> lol
[20:42:05 CET] <atomnuker> yeah, its the rpcs3
[20:42:07 CET] <JEEB> I knew there was an emulator
[20:42:13 CET] <JEEB> but when I last checked it was lulz
[20:42:21 CET] <Diag> I could probably blow this shit out of the water
[20:42:32 CET] <JEEB> but that it could run actual software was cool
[20:42:38 CET] <JEEB> (it was just lol slow)
[20:43:23 CET] <atomnuker> https://rpcs3.net/
[20:43:28 CET] <Diag> yeah reading
[20:44:07 CET] <Diag> NPEB01270 Digital Terraria f2ba41af Playable 2017-01-22
[20:44:09 CET] <Diag> FINALLY
[20:44:13 CET] <Diag> i can play terraria
[20:44:53 CET] <atomnuker> that one's better on the pc
[20:45:22 CET] <Diag> atomnuker: http://i2.kym-cdn.com/photos/images/newsfeed/000/992/401/e37.png
[20:46:45 CET] <atomnuker> I thought you had a weird fetish about torturing yourself playing it with a controller
[20:47:12 CET] <Diag> all the games that run are just ports
[20:47:16 CET] <Diag> or really basic shit
[20:47:20 CET] <Diag> boooo
[20:47:43 CET] <atomnuker> catherine runs, tried it last week
[20:49:06 CET] <JEEB> I should try underwater ray romano 2
[20:49:26 CET] <Diag> i want gran turismo to work
[20:50:01 CET] <JEEB> project cars and forza do it for me so not that much needed for me personally
[20:50:11 CET] <Diag> yeah but forza is an arcade game
[20:52:36 CET] <TD-Linux> atomnuker, one of the only games I wanted to actually play on ps3, neat
[20:53:33 CET] <JEEB> Diag: IIRC you could config it to be quite a bit less friendly. although project cars most certainly defaults to much more realistic handling compared to the latest Forza I poked
[20:54:02 CET] <Diag> JEEB: ill have to look at project cars. Forza has, and always will be an arcade game
[20:54:03 CET] <JEEB> (I <3 when you can't just throw the pedal to the metal with a rear-powered car)
[20:54:24 CET] <JEEB> Diag: the PC version is on the latest humble bundle
[20:54:31 CET] <JEEB> grabbed it there
[20:55:01 CET] <Diag> JEEB: iirc i remember people saying bad things about project cars
[20:56:02 CET] <JEEB> I've only driven alone in training mode so far to get a handle on the cars. so I have no idea of the non-driving aspects of it :D
[20:56:31 CET] <Diag> idunno
[20:56:35 CET] <Diag> ill have to ask my friend
[21:00:00 CET] <TD-Linux> <Diag> "Dual Issue (Each SPE can execute 2 instructions per clock)" <- only half the instructions per clock as skylake :^)
[21:00:10 CET] <Diag> TD-Linux: is that so? lol
[21:00:44 CET] <Fenrirthviti> Project Cars is kinda crap. It's a bad sim game, and a bad arcade game. Asseto Corsa is better for sim
[21:00:58 CET] <Diag> Fenrirthviti: isnt that just like f1 though?
[21:01:03 CET] <Diag> I want something like gran turismo
[21:01:08 CET] <Diag> where the physics are great and shit
[21:01:16 CET] <Diag> and theres like 800 cars
[21:01:19 CET] <Fenrirthviti> It's pretty limited in the vehicles, yeah.
[21:01:31 CET] <Diag> I mean shit
[21:01:35 CET] <Diag> theres like 1200 cars in gt6
[21:01:39 CET] <Diag> no other game is close to that
[21:01:41 CET] <kerio> why is this release 1792x1072 :|
[21:02:11 CET] <Diag> I think forza is way under 500 iirc
[21:02:18 CET] <Diag> The fun cars are all the random shit ones
[21:02:31 CET] <Fenrirthviti> gt7 when :(
[21:02:38 CET] <Diag> Fenrirthviti: its gt sport
[21:02:49 CET] <Fenrirthviti> Right, gt7 :P
[21:02:50 CET] <Diag> I did like 6 or 8 races in it
[21:03:04 CET] <Diag> i liked the driving physics
[21:03:08 CET] <Diag> seemed much more real
[21:03:13 CET] <Diag> they also had some cool steering wheel
[21:03:15 CET] <Fenrirthviti> GT has always had the best physics
[21:03:27 CET] <Fenrirthviti> Outside the real sim stuff
[21:03:27 CET] <kepstin> kerio: that a video resolution? sounds like someone cropped off some black bars or distortion.
[21:03:43 CET] <Fenrirthviti> like iRacing
[21:03:46 CET] <Diag> Jesus christ
[21:03:51 CET] <Diag> gt sport still hasnt come out
[21:03:54 CET] <kerio> kepstin: yeah but this is YTS
[21:04:04 CET] <Fenrirthviti> Nope. "Sometime in 2017" is all they say
[21:04:05 CET] <Diag> oh thats the other thing Fenrirthviti, gtsport looked amaaaaaaaaaaaaazing
[21:04:09 CET] <kerio> they're supposed to be good
[21:04:14 CET] <kepstin> kerio: keep in mind that HD resolutions are still designed to be overscanned, and stuff outside the central 1888x1062 or so isn't really guaranteed to be clean.
[21:04:14 CET] <Diag> according to amazon its december 29th
[21:04:22 CET] <Fenrirthviti> that just means it has no release :P
[21:04:24 CET] <Diag> lol
[21:04:31 CET] <Fenrirthviti> they do that for everything with no release date
[21:04:33 CET] <Diag> Well
[21:04:40 CET] <Diag> I loved the game, but im not getting a ps4 just for it
[21:05:49 CET] <Diag> Fenrirthviti: it was funny, because they had like 30 cars to choose from, ranging from like, street cars to muscle cars
[21:06:12 CET] <Fenrirthviti> Yeah they have the most comprehensive licensing for cars of any series
[21:06:20 CET] <Diag> then at the end there was like 3 cars, one was the peugeot somethin or other
[21:06:24 CET] <Diag> Got i cant remember that one
[21:06:35 CET] <Diag> 908?
[21:06:41 CET] <Diag> its the one in gt5/6
[21:06:51 CET] <Diag> yes the 908
[21:07:03 CET] <Diag> So there i was, everyone was picking the stupid mustangs and shit
[21:07:09 CET] <Diag> and i picked the peugeot
[21:07:30 CET] <Diag> some other people picked the stupid bugatti
[21:07:39 CET] <Diag> I was lapping motherfuckers
[21:09:06 CET] <Diag> Fenrirthviti: hang on, i got a picture for you
[21:09:11 CET] <kerio> Diag: a girl comes up to me and says
[21:09:16 CET] <kerio> "what you driving?" i said
[21:09:19 CET] <kerio> "bugatti"
[21:09:39 CET] <Fenrirthviti> I drive a miata, so everyone just asks me if I'm gay :(
[21:09:40 CET] <xtina> hey guys. i'm trying to understand why ffmpeg streams audio from a wav file perfectly, but stutters and skips if i stream directly from the audio grab device.
[21:10:02 CET] <xtina> this command works perfectly: arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & ~/special/ffmpeg/ffmpeg -report -re -i temp.v -f lavfi -i testsrc -c:v h264_omx -ac 2 -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:10:07 CET] <kerio> Diag: https://www.youtube.com/watch?v=CFg6amMLd-o
[21:10:16 CET] <xtina> this command produces skipping and stuttering: arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -acodec pcm_s32le -i - -f lavfi -i testsrc -c:v h264_omx -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:10:34 CET] <xtina> here is the stream with skipping and stutters: https://www.youtube.com/watch?v=8ytuVU3SIuw
[21:10:51 CET] <kepstin> xtina: ffmpeg is single-threaded, so something getting delayed in the output section will cause it to not be able to read on the input in realtime
[21:10:52 CET] <xtina> as you can see the commands are almost identical. only difference is the -re flag in the first command, and the writing to / reading from file
[21:11:11 CET] <kepstin> keep in mind that the ffmpeg command line tool isn't /really/ designed for realtime stuff, it's best at batch processing
[21:11:14 CET] <Diag> Fenrirthviti: https://puu.sh/tSKku/7e7d44e082.jpg
[21:11:25 CET] <xtina> kepstin: hmm thanks for the info. is there a better tool for video/audio streaming on my Pi?
[21:11:43 CET] <Diag> Fenrirthviti: take a guess at who was user 6 >:)
[21:11:58 CET] <Fenrirthviti> Was it me?
[21:12:01 CET] <kepstin> xtina: you might want to try doing the audio capture in a separate process, and piping it into ffmpeg. could add a little desync, but the buffering should make it more stable.
[21:12:02 CET] <Fenrirthviti> It was me wasn't it? :D
[21:12:06 CET] <Diag> I bet you wish XD
[21:12:16 CET] <Diag> i think you were user 9
[21:12:22 CET] <Fenrirthviti> I mean, I actually race IRL
[21:12:25 CET] <xtina> kepstin: i don't mind a little bit more latency, but i need the audio and video to be synced. is that still possible with the audio capture in a separate process?
[21:12:31 CET] <Diag> I did like 6 or 8 races
[21:12:33 CET] <Fenrirthviti> So I'm usually pretty good at the games :P
[21:12:38 CET] <Diag> won every one but one, where my friend
[21:12:44 CET] <Diag> well
[21:12:55 CET] <Diag> someone spun out in the middle of the road as we were about to lap them
[21:12:56 CET] <xtina> additionally, my current working approach, which is here: arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & ~/special/ffmpeg/ffmpeg -report -re -i temp.v -f lavfi -i testsrc -c:v h264_omx -ac 2 -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:13:02 CET] <xtina> means i have to record to temp.v
[21:13:05 CET] <kepstin> xtina: hard to say. You'd have to try it and see. Keep in mind that even in a single ffmpeg process, the a/v from live sources isn't really guaranteed to be synced
[21:13:08 CET] <xtina> and i can't keep an ever-increasing file on my Pi
[21:13:11 CET] <xtina> wouldn't i run out of space?
[21:13:18 CET] <kepstin> xtina: then replace the file with a named pipe
[21:13:24 CET] <kepstin> or just use stdout/stdin
[21:13:33 CET] <xtina> well this command is what produces stuttering
[21:13:39 CET] <Diag> I was in front of my friend, I hit the brakes, he kept it floored, his car jumped me and i hit the other car as he went right over them
[21:13:40 CET] <xtina> arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -acodec pcm_s32le -i - -f lavfi -i testsrc -c:v h264_omx -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:13:50 CET] <Diag> Fenrirthviti: it was the biggest bunch of BS
[21:14:24 CET] <Fenrirthviti> Diag: Situational awareness!
[21:14:49 CET] <Diag> Fenrirthviti: i could have driven around the car, but when he was on top of my car, i couldnt turn
[21:14:53 CET] <xtina> there's no known solution for livestreaming from the Pi?
[21:14:56 CET] <xtina> (this is kind of surprising...)
[21:15:05 CET] <kepstin> xtina: that command is missing some stuff on the audio input to ffmpeg - it might be using the wrong sample rate, for example, which could cause issues
[21:15:22 CET] <Diag> Fenrirthviti: last i checked, cars cant jump cars
[21:15:30 CET] <xtina> kepstin: the command is identical to this one, which works perfectly, except for the -re flag: arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & ~/special/ffmpeg/ffmpeg -report -re -i temp.v -f lavfi -i testsrc -c:v h264_omx -ac 2 -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:15:43 CET] <xtina> the 48000 is the correct rate for my mic
[21:15:48 CET] <kepstin> xtina: ... yep, default sample rate of s32le demuxer is 44100, but your arecord is 48000 - that'll cause your desync there
[21:16:06 CET] <kepstin> add a "-sample_rate 48000 -channels 2" before the input in ffmpeg
[21:16:06 CET] <xtina> oh hmmmmm
[21:16:16 CET] <kepstin> it defaults to mono, too
[21:16:26 CET] <kepstin> oh, wait, that's a wav not raw audio
[21:16:30 CET] <kepstin> it should be fine...
[21:16:38 CET] <kepstin> since wavehas a header
[21:16:45 CET] <xtina> hmmm
[21:17:06 CET] <xtina> do you see anything else wrong?
[21:17:31 CET] <kepstin> ... wait, you have too many commands here, i'm getting confused
[21:17:52 CET] <xtina> sorry! i have a total of 2 commands
[21:18:00 CET] <Diag> Fenrirthviti: also during another time when we were waiting to race the game crashed, but my friend grabbed my phone and didnt let me take a picture :(
[21:18:05 CET] <xtina> 1. (this one works) arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & ~/special/ffmpeg/ffmpeg -report -re -i temp.v -f lavfi -i testsrc -c:v h264_omx -ac 2 -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:18:13 CET] <xtina> 2. (this one doesn't) arecord -Dmic_sv -c2 -r48000 -fS32_LE | ~/special/ffmpeg/ffmpeg -report -acodec pcm_s32le -i - -f lavfi -i testsrc -c:v h264_omx -acodec aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:18:25 CET] <xtina> this is the output from #2: https://www.youtube.com/watch?v=8ytuVU3SIuw
[21:18:39 CET] <kepstin> ok, so I *think* the -twav on the arecord is redundant, that should be the default
[21:18:50 CET] <xtina> OK, gotcha
[21:18:51 CET] <kepstin> which means that the two commands should be equivalent
[21:19:10 CET] <xtina> well, they're not, right? one writes to temp.v and reads from temp.v
[21:19:13 CET] <xtina> the other pipes straight in?
[21:19:20 CET] <xtina> and the one that writes to temp.v uses the -re flag
[21:19:27 CET] <kepstin> yes, so they should be equivalent other than that
[21:19:33 CET] <xtina> apart from that i *think* they're equivalent which is why idk why the 2nd one stutters so badly
[21:19:35 CET] <xtina> and 1st one is perfect
[21:19:46 CET] <kepstin> what's the command line output of the ffmpeg from your not working example?
[21:19:57 CET] <xtina> let me share a pastebin with you
[21:21:45 CET] <xtina> kepstin: http://pastebin.com/bAtpHagr
[21:21:57 CET] <kepstin> I'd probably try something like "arecord -Dmic_sv -c2 -r48000 -fS32_LE | ffmpeg -sample_rate 48000 -channels 2 -f s32le -i - <rest of command>" but I don't think it would actually be any different. hmm.
[21:22:12 CET] <xtina> i can share a pastebin from teh working example too
[21:23:14 CET] <xtina> working version pastebin: http://pastebin.com/G41dum9Y
[21:25:34 CET] <kepstin> it's hard to say. something in the live command must be hanging for a longer time than the length of the audio buffers, which of course won't happen when you're not reading from a live device (the file acts like a giant buffer). I wouldn't really know where to look for that. What kind of cpu usage are you seeing?
[21:26:10 CET] <llogan> does the not working version stutter if you output from ffmpeg to a local file?
[21:26:28 CET] <xtina> CPU usage is quite high, 90% from ffmpeg
[21:26:36 CET] <xtina> 70-90%
[21:27:08 CET] <kepstin> xtina: if it's going that high, the stuttering may be caused by cpu limitations, yeah.
[21:27:08 CET] <xtina> llogan: i can try it out
[21:28:03 CET] <llogan> also, if the working version works, why not just use that?
[21:28:04 CET] <xtina> kepstin: the cpu usage is identical if i write to temp.v, but there is no stuttering
[21:28:22 CET] <kepstin> xtina: yes, because the buffering via a large file hides the problem
[21:28:42 CET] <xtina> hmm, hides it..?
[21:28:50 CET] <xtina> because there is a little extra latency?
[21:29:19 CET] <xtina> llogan: yea, i just can't have a growing temp.v file, it will cause my SD to run out of space
[21:29:38 CET] <kepstin> the issue is that ffmpeg is reading a chunk of audio, then gets stuck doing something else, then reads another chunk of audio - if you have the audio all in a file, it can just read chunks at its lesiure. But if you're reading it from live, it can lose some audio that happened while it was paused.
[21:29:57 CET] <xtina> i'm wondering if i can be more CPU efficient. should i switch off of h264_omx?
[21:30:01 CET] <xtina> i don't really care about quality
[21:30:23 CET] <xtina> ah, i see
[21:30:26 CET] <kepstin> well, the 'omx' is the hardware encoder, switching that off will (probably) make it use *more* cpu and be worse
[21:30:26 CET] <kerio> well there's absolutely no way in hell you're running x264 on a raspberrypi
[21:30:36 CET] <xtina> i'm on a zero, as well
[21:30:37 CET] <kerio> at realtime speeds, i mean
[21:30:52 CET] <kerio> are you capturing from the camera?
[21:31:09 CET] <kerio> i wonder if it wouldn't be more efficient to use raspivid actually
[21:31:32 CET] <xtina> are x264 and h264_omx the same thing?
[21:31:36 CET] <kerio> no
[21:31:37 CET] <kepstin> the other alternative is to throw out the rpi and get a piece of junk intel celeron or something, it'll probably work better.
[21:31:44 CET] <xtina> i am capturing from camera, kerio. i was originally using both raspivid and arecord piped into ffmpeg
[21:31:56 CET] <xtina> but another user (furq?) told me to compile ffmpeg with alsa + omx264 so i wouldn't have to pipe
[21:32:03 CET] <kerio> xtina: yeah but
[21:32:04 CET] <xtina> so now i'm trying to do everything *within* ffmpeg
[21:32:25 CET] <xtina> i can go back to raspivid though
[21:32:29 CET] <kerio> i don't know if ffmpeg can do zerocopy stuff
[21:32:47 CET] <kerio> xtina: can you do ffprobe /dev/video0
[21:33:07 CET] <xtina> ffprobe version git-2017-02-05-e57fd92 Copyright (c) 2007-2017 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: --extra-cflags=-I/opt/vc/include/IL --enable-nonfree --enable-omx-rpi --logfile=CONFIG.TXT libavutil 55. 46.100 / 55. 46.100 libavcodec 57. 75.100 / 57. 75.100 libavformat 57. 66.101 / 57. 66.101 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 73.100 / 6. 73.100
[21:33:21 CET] <xtina> [video4linux2,v4l2 @ 0x18e8c10] Dequeued v4l2 buffer contains 3133440 bytes, but 3110400 were expected. Flags: 0x00000004. Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, bitrate: 746496 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, 746496 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[21:33:40 CET] <kerio> well that was a bit too much pasting
[21:33:44 CET] <xtina> sorry :)
[21:33:57 CET] <kerio> but you see
[21:34:20 CET] <kepstin> yeah, using raspivid is probably a better option for this, since iirc it sends the video directly from the camera to the hardware encoder without going throught he cpu
[21:34:23 CET] <kerio> ye
[21:34:30 CET] <kepstin> with the resource limits you have, that'll make a big difference
[21:34:31 CET] <xtina> Ohhh, i see
[21:34:40 CET] <kerio> i'm not sure if some extra magic is happening somewhere else
[21:34:43 CET] <xtina> maybe that's why i was doing much better when i was using raspivid
[21:34:45 CET] <kerio> but that's 746MB/s
[21:35:10 CET] <kerio> that has to be read from the camera and sent to the "gpucore"
[21:35:15 CET] <xtina> well, since i can't get ffmpeg alsa to work without stuttering, it seems that
[21:35:18 CET] <xtina> the only things i can get to work are
[21:35:21 CET] <kerio> yeah use raspivid
[21:35:25 CET] <xtina> arecord -> file (named pipe) -> ffmpeg
[21:35:27 CET] <xtina> and raspivid -> ffmpeg
[21:35:41 CET] <kerio> xtina: nah you can just do -f alsa -i hw:whatever
[21:35:56 CET] <kerio> not sure if there's a fancier way to do what raspivid does
[21:35:57 CET] <xtina> that's what i've been trying, but it causes incredible stuttering/skipping
[21:36:00 CET] <xtina> i wrote details here :)
[21:36:03 CET] <xtina> (one sec)
[21:36:08 CET] <kerio> xtina: did you do that with the raspivid binary tho
[21:36:10 CET] <kepstin> using ffmpeg's native alsa audio combined with piping in raspivid should work...
[21:36:10 CET] <xtina> http://raspberrypi.stackexchange.com/questions/61663/arecord-ffmpeg-works-but-ffmpeg-w-alsa-stutters
[21:36:30 CET] <xtina> this is what i tried:
[21:36:30 CET] <xtina> ~/special/ffmpeg/ffmpeg -report -f alsa -ar 48000 -ac 2 -acodec pcm_s32le -i mic_sv -f lavfi -i testsrc -c:v h264_omx -c:a aac -ab 32k -bufsize 32k -f flv rtmp://209.85.230.23/live2/KEY
[21:36:37 CET] <kepstin> xtina: those commands are all doing video encoding inside ffmpeg
[21:36:38 CET] <xtina> this results in crazy stuttering
[21:36:43 CET] <xtina> ohhh, right
[21:36:48 CET] <xtina> right, right
[21:36:51 CET] <kerio> well, "inside" ffmpeg
[21:36:52 CET] <xtina> let me try taking that out then :)
[21:37:11 CET] <kerio> but yes, ffmpeg is way more involved than just reading x264 from raspivid
[21:37:21 CET] <xtina> gotcha
[21:37:26 CET] <xtina> this is really enlightening, thank you
[21:37:30 CET] <xtina> i'll try out your suggestion
[21:37:42 CET] <kepstin> xtina: when using raspivid, make sure you use "-c:v copy" in ffmpeg, so it's not doing any video encoding.
[21:37:54 CET] <xtina> gotcha
[21:38:28 CET] <llogan> what format is the raspivid outputting?
[21:38:35 CET] <kerio> it can do h264
[21:38:38 CET] <kerio> iirc
[21:38:59 CET] <kepstin> llogan: should be a raw h264 video stream, i think
[21:39:01 CET] <llogan> if you compile ffmpeg with --enable-mmal you can use it to decode the h264 input via MMAL hardware (IIRC)
[21:39:21 CET] <kerio> but we don't want to decode :\
[21:39:31 CET] <xtina> i didn't compile with --enable-mmal
[21:39:41 CET] <xtina> i have '--enable-nonfree --enable-libfdk-aac --enable-omx-rpi'
[21:40:04 CET] <kepstin> we want to have data from the camera, pre-encoded via the hardware encoder, to pass through ffmpeg with as little processing as possible
[21:40:08 CET] <kerio> yep
[21:40:11 CET] <kepstin> since this system is so resource constrained :/
[21:40:26 CET] <kerio> is the pi even fast enough to encode audio?
[21:40:48 CET] <kepstin> you might end up wanting to use mp3 or something rather than aac if that's too slow, yeah
[21:40:58 CET] <kerio> you mean opus >:C
[21:41:00 CET] <kepstin> but try and see
[21:41:06 CET] <llogan> libshine perhaps if it is faster
[21:41:20 CET] <kepstin> this is rtmp (presumably for something like twitch/youtube), so you're really limited in codecs
[21:41:28 CET] <kepstin> mp3, aac, maybe speex? :/
[21:41:44 CET] <xtina> my cpu usage is less than 10% now! :)
[21:41:56 CET] <kerio> yay
[21:42:05 CET] <xtina> OK, let's see if this one works
[21:44:10 CET] <kepstin> note that you might have to manually specify the framerate of the video stream using the '-framerate' input option in ffmpeg
[21:44:18 CET] <kepstin> (it defaults to 25, which probably isn't correct)
[21:45:48 CET] <kerio> why not
[21:47:36 CET] <DHE> 24 and 30 tend to be more common, but it depends where you live
[21:49:27 CET] <kepstin> because after I took a quick glance at the camera specs, it appears to only do 30 and 60Hz. could be wrong tho, but I wouldn't be surprised if it defaulted to 30
[21:51:31 CET] <xtina> kepstin: here's my command, i'm asking 20 fps in both raspivid and ffmpeg
[21:51:33 CET] <xtina> raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | ~/special/ffmpeg/ffmpeg -f alsa -ar 48000 -ac 2 -acodec pcm_s32le -i mic_sv -f h264 -thread_queue_size 512 -framerate 20 -probesize 100 -i - -vcodec copy -acodec aac -g 20 -f flv rtmp://209.85.230.23/live2/KEY
[21:51:56 CET] <xtina> this used almost no CPU but also gave me a lot of ALSA buffer xruns and an incoherent stream
[21:51:56 CET] <kepstin> xtina: should be fine then, as long as they match :)
[21:52:10 CET] <kepstin> hmm. :/
[21:53:30 CET] <kerio> and you say that with arecord it works well?
[21:54:56 CET] <xtina> i'm testing again to make sure, but in the past, this command has been "successful" (video skipping around a bit, and not synced with audio, and extremely low fps ~2-3ish, but both video+audio appear and are fairly smooth)
[21:54:59 CET] <xtina> sudo rm temp.v mkfifo temp.v arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v & \ raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | \ ffmpeg \ -re \ -i - \ -i temp.v \ -ab 32k \ -ac 2 \ -c:v copy \ -c:a aac \ -report \ -vsync 2 \ -async 2 \ -f flv rtmp://209.85.230.23/live2/KEY
[22:20:28 CET] <wouter> hi -- I'm running "ffmpeg -i /tmp/cutvdYT8m/full.mp4 -i /tmp/cutvdYT8m/full.wav -ss 2383 -c:v copy -c:a libfdk_aac -b:a 128k -map 0:v -map 1:a -shortest -y /srv/sreview/1/H/geo_osmoffline-post.mp4", but ffmpeg says "[libfdk_aac @ 0x7b02e0] Trying to remove 1024 samples, but the queue is empty" and produces no output
[22:20:34 CET] <wouter> what could the reason for that be?
[22:22:17 CET] <Diag> guys
[22:22:25 CET] Last message repeated 2 time(s).
[22:22:25 CET] <kerio> WADDUP
[22:22:25 CET] <Diag> does anyone here need a 2u case
[22:22:30 CET] <Diag> https://www.amazon.com/gp/product/B00BL3WI0U/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A1NAVOX3XE5VZM
[22:22:36 CET] <Diag> 59.30
[22:22:57 CET] <kerio> that is a fukken 94% discount
[22:23:06 CET] <Diag> dude
[22:23:10 CET] <Diag> DUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUDE
[22:23:16 CET] <kerio> too bad i'm not in the US
[22:23:20 CET] <Diag> im tempted to do what this other dude wants to do
[22:23:23 CET] <Diag> buy it and sell it on ebay
[22:23:33 CET] <Diag> it comes with fuckin power supplies and shit
[22:23:39 CET] <Diag> 920W Redundant High-efficiency Platinum Level (94%+) Power Supply
[22:24:07 CET] <Diag> holy furq man
[22:24:08 CET] <Diag> thats a deal
[22:24:54 CET] <wouter> 920W?
[22:24:58 CET] <wouter> no shit he's selling it for cheap
[22:25:06 CET] <wouter> I don't want to pay those power bills :)
[22:25:11 CET] <Diag> lol
[22:25:22 CET] <Diag> fuckaroni and cheese though
[22:25:45 CET] <wouter> also, you wouldn't need a heater with such a thing anymore
[22:25:49 CET] <Diag> dude
[22:25:52 CET] <Diag> its fucking 59 dollars
[22:25:59 CET] <wouter> yes, and?
[22:26:08 CET] <Diag> im considering getting one
[22:26:10 CET] <Diag> just because
[22:26:34 CET] <wouter> dude, it's just a case
[22:26:46 CET] <wouter> if it had a motherboard, I'd say yeah
[22:28:07 CET] <Diag> its a case with a built in cooling system and power supplies and shit
[22:28:19 CET] <Diag> show me a 920 watt 94%eff power supply for under 60 dollars
[22:31:56 CET] <furq> why are you so excited that old server equipment is being sold really cheaply
[22:32:14 CET] <Diag> because its cheap
[22:47:03 CET] <xtina> kerio: this is the latest stream i'm getting with raspivid and (ffmpeg+alsa): https://www.youtube.com/watch?v=do9aWOwWqko
[22:47:11 CET] <xtina> there's stutter-y audio
[22:47:15 CET] <xtina> cpu usage <10%
[22:47:28 CET] <xtina> command: raspivid -o - -t 0 -fps 5 -b 1000000 | ~/special/ffmpeg/ffmpeg -f alsa -ar 48000 -acodec pcm_s32le -i mic_sv -f h264 -framerate 5 -i - -vcodec copy -acodec aac -f flv rtmp://209.85.230.23/live2/KEY
[22:48:06 CET] <xtina> lots of ALSA buffer messages...
[22:48:07 CET] <xtina> [alsa @ 0x179a590] ALSA buffer xrun. 934kB time=00:00:07.87 bitrate= 971.6kbits/s speed=0.735x [alsa @ 0x179a590] ALSA buffer xrun.2341kB time=00:00:19.04 bitrate=1007.2kbits/s speed=0.79x [alsa @ 0x179a590] ALSA buffer xrun.3920kB time=00:00:32.27 bitrate= 994.8kbits/s speed=0.917x [alsa @ 0x179a590] ALSA buffer xrun.5321kB time=00:00:43.40 bitrate=1004.4kbits/s speed=0.964x [alsa @ 0x179a590] ALSA buffer xrun.6435kB t
[22:48:56 CET] <Fenrirthviti> gyah has nobody heard of gist or pastebin?
[22:49:08 CET] <Fenrirthviti> quit posting logs right to chat!
[22:50:47 CET] <xtina> sorry. but it is a shame we are not using a chat platform that supports code formatting, to be honest!
[22:51:15 CET] <xtina> i pastebin quite a lot, but it means you can't see anything without clicking links...
[22:51:34 CET] <Fenrirthviti> better than flooding the chat or getting cut off
[22:51:44 CET] <BtbN> I don't want large formated chunks of text in the chat.
[22:51:44 CET] <xtina> i agree
[23:05:28 CET] <xtina> Hi, i'm seeing the following two errors in my output:
[23:05:29 CET] <xtina> [aac @ 0x3137320] Queue input is backward in time0
[23:05:45 CET] <xtina> [flv @ 0x31317e0] Non-monotonous DTS in output stream 0:1; previous: 45202, current: 45196; changing to 45202. This may result in incorrect timestamps in the output file.
[23:06:08 CET] <xtina> does anyone know what either of those mean? my command: raspivid -o - -t 0 -fps 5 -b 1000000 | ~/special/ffmpeg/ffmpeg -f alsa -ar 48000 -acodec pcm_s32le -thread_queue_size 512 -i mic_sv -f h264 -thread_queue_size 512 -framerate 5 -thread_queue_size 512 -i - -vcodec copy -acodec aac -g 10 -f flv rtmp://209.85.230.23/live2/KEY
[23:18:56 CET] <llogan> -g does nothing with -vcodec copy
[23:20:53 CET] <xtina> llogan: oh, ok
[23:20:55 CET] <xtina> i'll take that out
[23:23:05 CET] <xtina> i'm still getting choppiness with this, i've made it as simple as i could:
[23:23:07 CET] <xtina> raspivid -o - -t 0 -fps 5 -b 1000000 | ~/special/ffmpeg/ffmpeg -f alsa -ar 48000 -acodec pcm_s32le -i mic_sv -f h264 -thread_queue_size 512 -framerate 5 -thread_queue_size 512 -i - -vcodec copy -acodec aac -f flv rtmp://209.85.230.23/live2/kEY
[23:23:13 CET] <xtina> (audio choppiness)
[23:23:28 CET] <xtina> also getting some ALSA buffer xrun
[23:24:21 CET] <xtina> kepstin: if you're still around, any ideas? :)
[23:28:58 CET] <wouter> so, turns out that my problem earlier is due to the fact that I'm doing '-i "concat:foo.mp4|bar.mp4" -c copy -y quux.mp4' earlier, and the index of the resulting quux.mp4 isn't generated properly
[23:29:06 CET] <wouter> how can I fix tha?
[23:29:08 CET] <wouter> that
[23:29:17 CET] <furq> https://trac.ffmpeg.org/wiki/Concatenate#demuxer
[23:34:44 CET] <wouter> thanks
[23:37:31 CET] <kepstin> xtina: get a faster computer? :/ You could try mp3 audio instead of aac, it might be quicker to encode.
[23:37:45 CET] <xtina> but my CPU usage is under 30%
[23:37:56 CET] <xtina> is this a hardware constraint?
[23:39:14 CET] <xtina> hmm, are there any quality params i can lower to help? like audio bitrate or something?
[23:43:50 CET] <mete> could it be that the process is bound to one cpu core ?
[23:44:01 CET] <xtina> mete: i'm on a Pi zero, it's single-core
[23:44:14 CET] <mete> ok - the zero IS single core yes
[23:44:23 CET] <mete> I use it also xD
[23:44:54 CET] <mete> what does idle says when you run "top" ?
[23:45:29 CET] <xtina> mete: sorry, idle?
[23:45:44 CET] <mete> "id" in top
[23:46:01 CET] <xtina> 91.0
[23:46:06 CET] <mete> while encoding?
[23:46:16 CET] <xtina> no, nothing going on right now.. let me run the stream
[23:46:23 CET] <mete> yeah
[23:46:25 CET] <mete> ;)
[23:47:22 CET] <xtina> roughly 20% cpu usage, 80% idle
[23:48:12 CET] <mete> hm, interesting
[23:48:40 CET] <mete> unforunately I can't install ffmpeg currently on the PI zero, otherwise I would check it
[23:50:01 CET] <xtina> no problemo :)
[23:50:09 CET] <xtina> thanks anyway
[23:50:32 CET] <mete> what command are you exactly executing?
[23:50:55 CET] <JASTON> hey gang, when using -i input from an http stream, and with -ss and -t asking for only the first few seconds of a large multimedia file, i noticed that ffmpeg makes several byte-range requests, some even for parts of the very end of the file. is there any way to make that less aggressive, e.g. focus as much as possible only on the beginning of the file?
[23:51:53 CET] <xtina> mete: hold up a sec, maybe getting something promising.. gonna check it out
[23:52:11 CET] <furq> JASTON: is it an mp4, by any chance
[23:52:26 CET] <mete> sorry I have to leave... it's 11:52 pm here, have to sleep ;)
[23:53:35 CET] <xtina> mete: no problem! good night :)
[23:53:41 CET] <mete> thanks
[23:56:29 CET] <JASTON> @furq in this case its an mkv, but ive seen this behavior on every format ive tried
[23:57:22 CET] <BtbN> some formats have their header at the end of the file. Most notably mp4
[23:59:57 CET] <thebombzen> cd / && touch this
[00:00:00 CET] --- Wed Feb 8 2017
More information about the Ffmpeg-devel-irc
mailing list