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

burek burek021 at gmail.com
Mon Feb 6 03:05:01 EET 2017


[00:00:09 CET] <furq> qp and crf are two different ratecontrol methods, specifying both makes no sense
[00:00:19 CET] <furq> and crf is generally the one you want
[00:01:03 CET] <furq> also maxrate and x264opts vbv-maxrate are the same option
[00:01:31 CET] <vans163> furq: nice thanks any idea what vbv-bufsize=100 is?   someone wrote online it prevents encoder caching
[00:01:32 CET] <furq> and i'm not entirely sure keyint does anything with intra-refresh
[00:01:53 CET] <furq> http://archive.is/gUP7m
[00:01:57 CET] <furq> read that and also read comment 8
[00:02:17 CET] <furq> or skip to comment 8 if you just want The Right Numbers without understanding what it does
[00:02:22 CET] <vans163> hum.. i read that first time y9uo linked let me check again more focused
[00:03:20 CET] <furq> the idea is that the vbv buffer will only ever contain one frame
[00:03:30 CET] <Jan-> why is -libfdk_aac suddenly not found?
[00:03:33 CET] <Jan-> it always worked before
[00:03:45 CET] <furq> also double check the units for each of those options in x264 --fullhelp
[00:03:49 CET] <furq> some of them are in bits and some are in bytes
[00:04:02 CET] <vans163> furq: yea i was wondering because I am okay with doing 16-32mbps
[00:04:08 CET] <vans163> vbv-maxrate=3000 seems like 3mbps need check
[00:04:32 CET] <furq> yeah vbv-maxrate is in kbps
[00:04:56 CET] <furq> bufsize is kbit, slice-max-size is bytes
[00:05:10 CET] <furq> Jan-: check the end of config.log
[00:05:58 CET] <Jan-> The what now?
[00:08:45 CET] <vans163> any idea whats causing the blurry text? http://imgur.com/a/BS0IS  I know nvenc with 444 fixed it
[00:11:45 CET] <vans163> ahh nevermind
[00:11:56 CET] <vans163> i restarted the client decoder (after testing 4 types of streams)
[00:11:58 CET] <vans163> and it went away
[00:12:18 CET] <vans163> im aamazing how I streamed 4 different settings to the same client decoder without reseting it with different resoltuions
[00:14:57 CET] <vans163> seems to take 15-25ms to encode a frame
[00:15:00 CET] <vans163> not bad at all
[02:33:38 CET] <xtina> hey guys. i have some noobs q's :)
[02:33:52 CET] <xtina> my goal is to use ffmpeg for audio+video streaming
[02:34:15 CET] <xtina> i am using alsa for the sound. this command works for me: arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav -d10 -Vstereo test.wav
[02:34:44 CET] <xtina> now, i have a ffmpeg command that was previously capturing video and sending a null audio stream: sudo raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | sudo ffmpeg -f lavfi -re -i anullsrc -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/xbjs-a3gp-0yvk-ftdg
[02:34:51 CET] <xtina> i would like to add the alsa audio stream in.
[02:36:14 CET] <xtina> how do i pass in all the alsa params (like -Dmic_sv)?
[02:37:12 CET] <xtina> i'm not quite sure how, is itsomething like this? sudo raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | sudo ffmpeg -ac 1 -f alsa -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/xbjs-a3gp-0yvk-ftdg
[02:37:54 CET] <thebombzen> first of all, documentation on -re
[02:39:41 CET] <xtina> ah OK, so i need -re as well.
[02:44:15 CET] <xtina> i also think i need to add in -i hw:1,0? so now, my cmd is sudo raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | sudo ffmpeg -ac 1 -f alsa -i hw:1,0 -re -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/xbjs-a3gp-0yvk-ftdg
[02:47:39 CET] <xtina_> whoops, just disconnected..
[02:47:39 CET] <xtina_> anyway, i am wondering how to stick the alsa params into the ffmpeg command
[02:59:45 CET] <thebombzen> no you don't
[02:59:47 CET] <thebombzen> you shouldn't -re
[02:59:55 CET] <thebombzen> oh wow gg
[03:09:52 CET] <xtina_> thebombzen: sorry for the confusion, OK, no -re? it says in the manual that -re is for live streaming, which is my usecase
[03:22:08 CET] <xtina_> also, if I run the following command: sudo raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | sudo ffmpeg -ac 1 -f alsa -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/xbjs-a3gp-0yvk-ftdg
[03:22:16 CET] <xtina_> I get Unknown input format: 'alsa'
[03:22:24 CET] <xtina_> i know i have alsa on my Pi, as the arecord command succeeds
[03:22:34 CET] <xtina_> i also already have libasound2-dev installed
[03:28:06 CET] <xtina_> all it says on the documentation is that i need for ffmpeg/alsa is libasound installed. is there any official documentation? https://ffmpeg.org/ffmpeg-devices.html#alsa
[03:31:12 CET] <debianuser> xtina_: Order of args matters for ffmpeg, it's like this: ffmpeg <input1-options> -i <input1-source> <input2-options> -i <input2-source> ... <inputN-options> -i <inputN-source> <output-options> <output-target>` So to "pass in all the alsa params" add one more input source "mic_sv" with its only param saying it's alsa source: `-f alsa -i mic_sv` (iirc 2 channels 48000 Hz rate is used by default).
[08:53:13 CET] <xtina> hey guys. i'm trying to get alsa to work with ffmpeg. i read that i need to compile and rebuild ffmpeg with alsa, is this true?
[08:53:23 CET] <xtina> I have this version of ffmpeg: ffmpeg-3.1.4-armel-32bit-static
[08:53:35 CET] <xtina> it's from here: https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-armel-32bit-static.tar.xz
[08:53:56 CET] <xtina> if i navigate to this directory, the ./configure command is not recognized...?
[08:55:37 CET] <xtina> essentially, i'm following this guide: https://trac.ffmpeg.org/wiki/CompilationGuide/RaspberryPi but my ffmpeg version, ffmpeg-3.1.4-armel-32bit-static,  is not letting me run ./configure?
[08:56:32 CET] <debianuser> xtina: run `ffmpeg -devices` to see if you have "alsa" device available
[08:57:24 CET] <xtina> sure, it appears i do not:
[08:57:27 CET] <xtina> pi at raspberrypi:~/ffmpeg-3.1.4-armel-32bit-static $ ffmpeg -devices ffmpeg version 3.1.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers   built with gcc 5.4.1 (Debian 5.4.1-2) 20160904   configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable
[08:58:10 CET] <xtina> here's the output: http://pastebin.com/6bBmAUDA
[09:00:03 CET] <xtina> at least, i see no mention of alsa in there...
[09:01:47 CET] <xtina>  D  dv1394          DV1394 A/V grab  DE fbdev           Linux framebuffer  D  lavfi           Libavfilter virtual input device  DE oss             OSS (Open Sound System) playback   E v4l2            Video4Linux2 output device  D  video4linux2,v4l2 Video4Linux2 device grab  D  x11grab         X11 screen capture, using XCB
[09:08:46 CET] <xtina> debianuser: any suggestions?
[09:22:57 CET] <debianuser> xtina: find ffmpeg build that was built with alsa support :)
[09:24:54 CET] <xtina> so i can't add alsa support to my static build?
[09:25:09 CET] <xtina> i don't know where to find various ffmpeg builds... googling didn't turn up anything...
[09:25:39 CET] <xtina> I needed that particular static ARMEL build for my Pi Zero, I believe. I want to keep using this build, just add in ALSA.
[09:26:28 CET] <xtina> i'm reading that i might not have any choice but to build a brand new ffmpeg from scratch. is there no easier option?
[13:25:36 CET] <serialnuts> Hi, I keep getting 'Invalid duration specification for ss: -t' error. This is the short script that is supposed to take the arguments http://pastebin.com/1ERCNxiJ . The actual output is shown here: http://pastebin.com/sne2Ayiz
[13:48:14 CET] <DHE> serialnuts: starttime vs startime
[13:49:03 CET] <serialnuts> DHE: I'm going to go and bang my head to a wall. Thanks :)
[16:13:09 CET] <spirytusrektus> Hi, is it possible to convert 1080i60 video to 1080i50 without reencoding (with no noticable artifacts)?
[16:14:45 CET] <BtbN> no
[16:15:20 CET] <BtbN> with an intra only codec, maybe. But even then, no support from ffmpeg for that.
[16:15:57 CET] <bencoh> isn't there a new filter for that?
[16:22:52 CET] <DHE> how do you convert from progressive to interlaced without reencoding?
[16:32:22 CET] <spirytusrektus> So there is no surefire filter for that, i see. @bencoh Is it something documented, can I find it?
[16:34:59 CET] <spirytusrektus> @DHE Was your question directed at me?
[16:36:48 CET] <DHE> partiallh
[16:36:50 CET] <DHE> y
[16:37:29 CET] <DHE> also filters don't work without encoding. bitstreamfilters do but they're extremely limited and there's only like a dozen of them
[16:42:27 CET] <spirytusrektus> I have yet to understand the nature of filtering. My question looks a bit silly now, sorry for that and thanks for explaining it
[16:51:14 CET] <DHE> filtering takes a full frame (like RGB, but often in different colourspaces) and manipulates it. similarly for audio in waveform. but you can't do that without re-encoding
[17:26:44 CET] <Guest67252> Hello I downloaded segment of a protected video from vimeo.com , it is segment-1.m4s.
[17:26:58 CET] <Guest67252> avprobe fails to detect it (
[17:27:42 CET] <Guest67252> do you have any idea, how to convert segment-1.m4s,...,segment-100.m4s to all.mp4??
[17:28:09 CET] <JEEB> the segments are just fragmented ISOBMFF. you put the initialization segment up front, and then add the segments one by one afterwards
[17:28:19 CET] <JEEB> but if it's encrypted then you are pretty much out of luck :P
[17:28:26 CET] <JEEB> since it's most likely DRM
[17:28:39 CET] <JEEB> if it has no encryption then what I said will work
[17:28:54 CET] <JEEB> cat init_segment seg1 seg2 seg3 > clip.mp4
[17:36:30 CET] <bencoh> DHE: oh, without reencoding, nevermind
[17:37:39 CET] <kerio> i'm sure there must be some cool way of deinterlacing h264 without loss
[17:44:41 CET] <BtbN> kerio, sure, just encode it to some lossless format afterwards.
[17:44:49 CET] <kerio> hayo
[17:45:33 CET] <furq> you can convert from 60i to 50i without reencoding
[17:45:55 CET] <furq> as long as you don't mind the video playing at 83% its original speed
[18:29:18 CET] <DHE> that's where an all-intra codec could work. droped frames and re-timestamping would work. butt very few people use codecs like that outside of special workflows
[19:03:57 CET] <Guest67252> O, JEEB! Thank you! it sound really hopefully. but what may be an init_segment, is there universal one?
[19:06:48 CET] <JEEB> the manifest should also have an initialization segment
[19:07:11 CET] <JEEB> that's the thing that gets fed to the decoder first
[19:07:27 CET] <JEEB> and then the rest of the fragmented ISOBMFF segments get fed afterwards
[19:07:45 CET] <JEEB> I have no idea how vimeo does it
[19:11:50 CET] <spirytusrektus> In the ffmpeg-filters documentation I found framerate filter but it's noted that that filter isn't intended for interlaced content but progressive content. It should be okay as long as I deinterlace the source and interlace it as stated in the documentation
[19:18:08 CET] <spirytusrektus> My actual objective is receiving 1080i50 content from a decklink card. We have a sony camera which gives 1080i60 output and I'm searching a way to t
[19:18:36 CET] <spirytusrektus> convert it to 1080i50 on the go
[19:18:49 CET] <furq> you probably want the fps filter
[19:18:54 CET] <Guest67252> JEEB! manifest, really!!! and it is) https://paste.debian.net/912932  thanks to you it now seems possible! Yuu hu!
[19:19:03 CET] <furq> Guest67252: does youtube-dl not work
[19:19:42 CET] <JEEB> Guest67252: right, so the init segment is base64 :P
[19:19:54 CET] <JEEB> nice idea that is, since init segments usually aren't too big
[19:20:02 CET] <JEEB> and you need that anyways to play
[19:20:05 CET] <spirytusrektus> Is fps filter different from framerate filter or are they the same thing?
[19:20:10 CET] <furq> they're different
[19:20:11 CET] <JEEB> furq: probably does, and would have worked out of the box :D
[19:20:22 CET] <furq> !filter fps
[19:20:22 CET] <nfobot> furq: http://ffmpeg.org/ffmpeg-filters.html#fps-1
[19:20:38 CET] <JEEB> Guest67252: also if that doesn't contain DRM then there's no protection in that at all :P it's just fragmented ISOBMFF
[19:23:40 CET] <spirytusrektus> thanks @furq I'll check it out
[19:25:13 CET] <ChocolateArmpits> I'm getting errors over 2 pass libvpx encoding. I tried and earlier build that used 1.5.0 and that too threw and error. Anyone know what's up ?
[19:25:40 CET] <JEEB> t/22
[19:26:16 CET] <ChocolateArmpits> huh ?
[19:26:31 CET] <Guest67252> o... really youtube-dl has --video-password option but and it download fragments too. Thank you man!
[19:27:05 CET] <furq> yeah youtube-dl is pretty grat
[19:27:13 CET] <furq> pretty grat.
[19:35:54 CET] <xtina> hey guys. i have a static build of ffmpeg, the ARMEL build from here: https://www.johnvansickle.com/ffmpeg/, and i need ALSA support
[19:36:11 CET] <xtina> can i add ALSA support to my current ffmpeg build?
[19:39:22 CET] <ChocolateArmpits> ok figured it out, realtime doesn't support 2 pass encoding
[19:46:50 CET] <c_14> xtina: if the builds don't support it, not without recompiling.
[19:49:08 CET] <xtina> c_14: gotcha. can i find an ARMEL build that supports ffmpeg, or do i have to go from scratch? i'm a noob at this stuff :
[19:50:03 CET] <xtina> i wanted to see if it would be easier to get alsa working in avconv, but got this error:
[19:50:03 CET] <xtina>  $ avconv -f alsa -i hw:1,0 alsaout.wav  avconv version 11.8-6:11.8-1~deb8u1+rpi1, Copyright (c) 2000-2016 the Libav developers   built on Oct  8 2016 02:37:00 with gcc 4.9.2 (Raspbian 4.9.2-10) [alsa @ 0xb25400] cannot set sample format 0x10000 2 (Invalid argument) hw:1,0: Input/output error
[19:50:44 CET] <xtina> however, this cmd works:
[19:50:45 CET] <xtina> arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav -d10 -Vstereo test.wav
[19:51:09 CET] <c_14> Those are the only armel builds I know of, so you'd have to recompile
[19:51:33 CET] <xtina> but i'm not sure how to convert arecord parameters like -D to avconv or ffmpeg parameters?
[19:52:09 CET] <c_14> You could try setting -sample_fmt s32 -ar 48k before -i
[19:52:19 CET] <c_14> And you can always just pipe arecord output to ffmpeg
[19:53:48 CET] <xtina> oh piping arecord in sounds appealing.. trying now
[19:54:15 CET] <c_14> you might still have to set input audio codec etc though
[20:00:51 CET] <xtina> OK, here's my latest:
[20:00:51 CET] <xtina> $ arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav -d10 | sudo ffmpeg -i - -acodec libmp3lame -ab 32k -f flv rtmp://209.85.230.23/live2/xbjs-a3gp-0yvk-ftdg ffmpeg version 3.1.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers   built with gcc 5.4.1 (Debian 5.4.1-2) 20160904   configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libwe
[20:01:03 CET] <xtina> ah.. it cut off.
[20:01:06 CET] <xtina> Recording WAVE 'stdin' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, wav, from 'pipe:':   Duration: N/A, bitrate: 3072 kb/s     Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s32, 3072 kb/s [NULL @ 0x3deb3a0] Unable to find a suitable output format for 'flv' flv: Invalid argument
[20:02:12 CET] <c_14> check ffmpeg -formats | grep flv
[20:02:19 CET] <xtina> i was able to use -f -flv previously without error...
[20:02:34 CET] <c_14> And you probably don't want to run ffmpeg as root
[20:04:20 CET] <xtina> checking formats:
[20:04:20 CET] <xtina>  DE flv             FLV (Flash Video)  D  live_flv        live RTMP FLV (Flash Video)
[20:05:56 CET] <phillipk> what could cause my rendered videos to report a "start" time other than 0?
[20:05:57 CET] <phillipk>  (When using ffprobe I look at my renders and they often have seemingly random start times--other than zero which is what I expect.)
[20:07:18 CET] <c_14> xtina: can you add -loglevel debug and upload the output to a pastebin service?
[20:08:57 CET] <xtina> c_14: sure! here: http://pastebin.com/zxa9mT5g
[20:09:43 CET] <c_14> xtina: the thing between the k and - by 32K -f flv isn't a space
[20:09:47 CET] <c_14> It just looks like it
[20:10:43 CET] <c_14> It is in fact, U+00A0 NO-BREAK SPACE
[20:12:06 CET] <c_14> Which is why "Reading option '-ab' ... matched as option 'ab' (audio bitrate (please use -b:a)) with argument '32k -f'." happens
[20:18:10 CET] <xtina> c_14: good catch :)
[20:19:00 CET] <xtina> now my cmd is arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav  | ffmpeg -i - -acodec libmp3lame -ar 44100 -ab 32k -f flv rtmp://209.85.230.23/live2/KEY, and there are no errors
[20:19:16 CET] <xtina> i'm trying to pipe both audio (arecord) and video (raspivid) to ffmpeg
[20:20:08 CET] <furq> you should probably just build your own ffmpeg
[20:20:24 CET] <furq> you could get rid of raspivid then as well
[20:20:56 CET] <xtina> previously i had the following video-only cmd, which worked. how would i pipe in the arecord as well..? raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | ffmpeg -f lavfi -re -i anullsrc -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/xbjs-a3gp-0yvk-ftdg
[20:23:21 CET] <c_14> If your shell is bash(ish) you can use <() replacement
[20:23:29 CET] <c_14> otherwise, possible fifos
[20:23:34 CET] <Kadigan_KSB> Hey. Listen, sometimes when I convert .avi files into .mkv with full re-compression (since avi doesn't support timestamps IIRC), I get a notice that the video uses packed B-frames and I should consider using some tool to fix it. Since I'm re-encoding (-c:v libx246 -crf 21), do I still need to do that?
[20:23:42 CET] <furq> no
[20:24:01 CET] <Kadigan_KSB> So in that case I can safely ignore that warning?
[20:24:11 CET] <furq> yes
[20:24:14 CET] <Kadigan_KSB> Thanks.
[20:24:15 CET] <thebombzen> Kadigan_KSB: packed B-frames are something that old mpeg4 encoders used to do
[20:24:35 CET] <thebombzen> if you're re-encodng the bitstream then you're not "packing bframes"
[20:24:35 CET] <Kadigan_KSB> Yeah, I read up on what it was. I just wanted to be sure that I don't need to do anything else about it
[20:24:43 CET] <Kadigan_KSB> since I'm already transcoding.
[20:24:57 CET] <faLUCE> which containers other than matroska can contain raw video frames?
[20:25:07 CET] <thebombzen> yuv4mpegpipe
[20:25:08 CET] <furq> nut
[20:25:12 CET] <thebombzen> but only in yuv color spaces
[20:25:16 CET] <furq> avi, but don't use that
[20:25:25 CET] <thebombzen> avi supports concatenation tho doesn't it
[20:25:30 CET] <furq> shrug
[20:25:34 CET] <furq> just use nut
[20:25:50 CET] <faLUCE> thebombzen: but yuv4mpegpipe is not a standard container
[20:25:51 CET] <thebombzen> I've sometimes had issues with nut that don't pop up in matroska
[20:25:54 CET] <faLUCE> it's  a ffmpeg's one
[20:26:07 CET] <thebombzen> faLUCE: so? it's rawvideo
[20:26:15 CET] <JEEB> not many containers are standardized :P
[20:26:26 CET] <faLUCE> thebombzen: my question has to be restricted to standard containers
[20:26:27 CET] <JEEB> I would probably use NUT if libavformat is used on both sides
[20:26:31 CET] <furq> define "standard"
[20:26:41 CET] <thebombzen> "standard" containers
[20:26:42 CET] <JEEB> oh, then you don't even have matroska
[20:26:45 CET] <furq> also y4m isn't specific to ffmpeg
[20:26:47 CET] <JEEB> it's still not standardized
[20:26:54 CET] <thebombzen> faLUCE: well you're using rawvideo
[20:27:01 CET] <thebombzen> so I think you can kind of take "standard" out the window
[20:27:12 CET] <thebombzen> given that rawvideo is somewhat useless
[20:27:18 CET] <thebombzen> for anything other than transcoding immediately
[20:27:31 CET] <faLUCE> thebombzen: a standard is something with published API, specifics or whatsoever
[20:27:48 CET] <faLUCE> like matroska, mpegts, ogg etc.
[20:27:55 CET] <furq> https://wiki.multimedia.cx/index.php/YUV4MPEG2
[20:27:57 CET] <furq> hf
[20:28:01 CET] <JEEB> matroska is not standardized, nor is ogg
[20:28:11 CET] <JEEB> mpeg-ts and isobmff are one of the few actually standardized
[20:28:37 CET] <furq> anyway just use nut
[20:28:53 CET] <JEEB> if you are piping or so raw video and audio, yes. nut.
[20:29:02 CET] <JEEB> y4m is limited to constant rates while NUT has proper timestamps
[20:29:15 CET] <JEEB> also keeps audio
[20:29:19 CET] <JEEB> y4m is video only
[20:29:25 CET] <furq> https://www.ffmpeg.org/~michael/nut.txt
[20:29:28 CET] <furq> it even has these nice specs
[20:29:47 CET] <faLUCE> ok, thanks
[20:29:48 CET] <JEEB> I'm not sure if that matches reality which is why you generally just use lavf on both sides, but that's not any worse than matroska :P
[20:31:00 CET] <faLUCE> anyway, this containers for raw video must have packed frames, right?
[20:31:08 CET] <faLUCE> or they can manage planar as well?
[20:31:18 CET] <JEEB> NUT wouldn't care I think
[20:31:35 CET] <JEEB> also planar is the usual thing with raw YCbCr
[20:31:46 CET] <JEEB> you first get all of the Y, then Cb and then Cr
[20:32:14 CET] <faLUCE> JEEB: but this implies a conversione from planar to packed, even if it's a trivial one
[20:32:19 CET] <xtina> hey, just had another question. i've read reports that people are unable to sync audio and video streaming with ffmpeg. i just want to make sure that it is possible to get them in sync?
[20:32:29 CET] <xtina> (e.g. https://www.element14.com/community/thread/33132/l/wolfson-audio-stream-with-ffmpeg-help?displayFullThread=true)
[20:32:41 CET] <faLUCE> YCbCr can be both planar and packed
[20:32:56 CET] <JEEB> I don't think NUT cares, I think lavf will just write the pix_fmt identifier there
[20:33:05 CET] <thebombzen> yea nut doesn't care
[20:33:11 CET] <faLUCE> what is NUT ?
[20:33:15 CET] <thebombzen> -f nut
[20:33:20 CET] <thebombzen> what we'ret rying to tell you
[20:33:27 CET] <thebombzen> the format you should be using
[20:33:35 CET] <durandal_1707> nut is ffmpeg container
[20:33:49 CET] <faLUCE> thebombzen: I'm not goind to use any format, my question is theoretical
[20:33:52 CET] <furq> https://ffmpeg.org/nut.html https://www.ffmpeg.org/~michael/nut.txt
[20:33:55 CET] <faLUCE> *going
[20:33:58 CET] <thebombzen> if your question is theoretical
[20:34:15 CET] <thebombzen> then why are you saying "no I can't do that" "no it has to be 'standard'"
[20:34:25 CET] <thebombzen> what's with the arbitrary design restrictions if you're not actually doing anything
[20:34:26 CET] <faLUCE> thebombzen: because I have to write an API
[20:34:36 CET] <thebombzen> so your question is NOT theoretical
[20:34:55 CET] <faLUCE> thebombzen: let's say my question is not associated to ffmpeg
[20:35:05 CET] <faLUCE> (I know it's off topic)
[20:35:36 CET] <thebombzen> if you're interesting in commonly used rawvideo containers, you could use yuv4mpeg, avi, or matroska
[20:35:45 CET] <thebombzen> although rawvideo-in-matroska has some issues
[20:35:58 CET] <faLUCE> I see
[20:39:58 CET] <durandal_1707> it is broken
[20:47:01 CET] <xtina> hey guys, i don't know if there is a good way to paste code here. but my raspivid+arecord to ffmpeg cmd is:
[20:47:09 CET] <xtina> sudo rm temp.wav mkfifo temp.wav arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.wav & \ raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | \ ffmpeg \     -i temp.wav \     -i - \     -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/xbjs-a3gp-0yvk-ftdg
[20:47:12 CET] <xtina> yikes
[20:50:51 CET] <xtina> sorry. here is my current raspivid+arecord+ffmpeg command: http://pastebin.com/Hd4MF11H
[20:51:55 CET] <xtina> with this, video is getting recorded into temp.wav, but the stream doesn't start
[20:52:15 CET] <xtina> however, if i take my pre-recorded temp.wav file and pipe it in along with raspivid to ffmpeg, it seems to work
[20:53:30 CET] <xtina> this is the error log. i don't see any errors - i'm ctrl-c'ing which i guess interrupts the temp.wav system call http://pastebin.com/mHUMdixq
[20:54:42 CET] <xtina> on the successful run with the prerecorded temp.wav, the log says:
[20:54:43 CET] <xtina> Opening an input file: temp.wav. [file @ 0x2f31930] Setting default whitelist 'file,crypto' [wav @ 0x2f312c0] Format wav probed with size=2048 and score=99
[20:55:29 CET] <xtina> but on the run where i'm simultaneously recording temp.wav, nothing happens after Opening an input file: temp.wav. [file @ 0x2f31930] Setting default whitelist 'file,crypto' [wav @ 0x2f312c0]
[21:08:37 CET] <xtina> why would my command work when i'm piping in pre-recorded audio but not when i'm streaming live-recording audio?
[21:15:57 CET] <ChocolateArmpits> Is there any way to deteremine container overhead percentage wise ?
[21:16:36 CET] <DHE> there's a report output on my system on shutdown
[21:20:36 CET] <furq> video:44kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.271932%
[21:20:39 CET] <furq> that one
[21:26:53 CET] <durandal_1707> big overhead
[21:31:15 CET] <ChocolateArmpits> oh cool
[21:33:14 CET] <xtina> hey guys. when i try to video stream with ffmpeg, the fps starts off high, but quickly decreases below what i specified. why?
[21:33:15 CET] <xtina> raspivid -o - -t 0 -vf -hf -fps 20 -b 6000000 | ffmpeg -f lavfi -re -i anullsrc -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/xbjs-a3gp-0yvk-ftdg
[21:33:29 CET] <xtina> starts around 15fps. quickly decreases to <5fps
[21:39:33 CET] <ChocolateArmpits> xtina, are you sure your input is delivering the frames constantly and that the destination server is taking in the data at sufficient rate
[21:39:57 CET] <ChocolateArmpits> Also you don't need -g 20 for stream copy, it makes no difference
[21:40:39 CET] <xtina> the destination server is youtube live, it's taken 20+fps from me consistently before
[21:40:53 CET] <xtina> as for input delivery - do you mean from the camera or upload from my wifi?
[21:44:12 CET] <abd5932> Hello, the mp4 file with following specs: http://paste.debian.net/912940/ gets stuck periodically during streaming (nginx with mp4 module) sometimes even on a server with zero load. What is wrong with it and how can I convert it to something that works? Thank you!
[21:45:14 CET] <ChocolateArmpits> xtina, what's the latency between you and youtube ?
[21:46:29 CET] <ChocolateArmpits> You can try setting -rtmp_buffer_size parameter if the latency is high
[21:47:20 CET] <xtina> the latency is the standard, 10-15 seconds
[21:47:27 CET] <xtina> (standard for youtube)
[21:47:32 CET] <xtina> OK, i'll try that param :)
[21:47:40 CET] <ChocolateArmpits> I mean the latency between you and the server
[21:47:46 CET] <ChocolateArmpits> Not the stream delay
[21:48:36 CET] <ChocolateArmpits> Because if the latency is too high and the socket size isn't too big you end up not being able to send the data
[21:49:03 CET] <ChocolateArmpits> It's a problem on Windows
[21:49:39 CET] <xtina> hmm, do you have any suggestions for values to try for rtmp_buffer_size?
[21:49:58 CET] <BtbN> that's just the initial send queue emptying
[21:50:10 CET] <xtina> oh, i see, sorry. i'm not sure how to check that...
[21:50:26 CET] <BtbN> your system just can't sustain the target framerate at your settings.
[21:52:17 CET] <abd5932> could somebody point me to the right direction, please? Thanks...
[22:06:12 CET] <ChocolateArmpits> abd5932, does it play otherwise well?
[22:07:52 CET] <abd5932> ChocolateArmpits: you mean locally?
[22:08:22 CET] <abd5932> ChocolateArmpits: I didn't try to play it locally, but besides that - it is OK
[22:12:21 CET] <xtina> hey, i'm currently piping audio to a file and feeding that file to ffmpeg:
[22:12:26 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 \     -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
[22:12:58 CET] <abd5932> ChocolateArmpits: it plays otherwise well.
[22:13:07 CET] <xtina> i wish there were some way to paste code here. I'm doing this: arecord -Dmic_sv -c2 -r48000 -fS32_LE -twav temp.v &
[22:13:10 CET] <ChocolateArmpits> abd5932, can you give your command line ?
[22:13:56 CET] <abd5932> ChocolateArmpits: it was not me who converted it so I don't know... I just looked it with ffmpeg -i test.mp4
[22:13:58 CET] <xtina> and then simultaneously feeding temp.v to ffmpeg. this works, but also means there is a temp.v file in my directory. i don't want it because i don't want to take up space  if i do a very long stream
[22:14:35 CET] <xtina> can i avoid creating temp.v and pipe both the audio and video streams directly to ffmpeg?
[22:14:47 CET] <ChocolateArmpits> abd5932, so your command is only "ffmpeg -i test.mp4" ? That's has no output specified
[22:16:18 CET] <abd5932> ChocolateArmpits: correct. I just looked the info of the file that way. I have no idea how it was generated...
[22:17:07 CET] <abd5932> ChocolateArmpits: the output is here: http://paste.debian.net/912940/
[22:19:05 CET] <ChocolateArmpits> abd5932, well if the file plays back correctly locally, both audio and video streams are nothing out of the ordinary then I would guess you should address this question to nginx developers or the devs for that mp4 module
[22:25:34 CET] <ChocolateArmpits> abd5932, however if you want you can convert it again with something like ffmpeg -i input.mp4 -vcodec libx264 -vprofile main -g 50 -b:v 2000k -acodec aac -b:a 128k output.mp4
[22:26:18 CET] <abd5932> ChocolateArmpits: what did you change vs the original?
[22:26:38 CET] <ChocolateArmpits> nothing, it just re-encodes to same settings
[22:43:40 CET] <xtina> ChocolateArmpits: do you have any suggestion what value to set for rtmp_buffer_size?
[22:44:22 CET] <ChocolateArmpits> xtina, try 128kb
[22:44:32 CET] <ChocolateArmpits> that should be more than enough for most situations
[22:55:15 CET] <Bray90820> OFF TOPIC: Does anyone know if a channel I could get general help with burning DVD's
[23:12:05 CET] <xtina> ChocolateArmpits: Thanks for helping out!! I'm currently seeing that my video is speeding up much faster than realtime. I thought the -re param prevented that?  here is my command: http://pastebin.com/QYtvGaqF
[23:13:50 CET] <furq> -re is useless if you're reading from a pipe
[23:14:32 CET] <furq> also if you build your own ffmpeg you can get rid of arecord and raspivid
[23:14:41 CET] <furq> that seems like it would be much simpler
[23:16:47 CET] <xtina> furq: does it offer performance improvements if i build my own ffmpeg vs piping in arecord/raspivid?
[23:17:02 CET] <furq> shrug
[23:17:10 CET] <furq> it's less moving parts to juggle
[23:17:24 CET] <furq> i'd imagine it's less likely to desync as well
[23:18:23 CET] <xtina> gotcha. i hadn't done it because i don't know how to compile ffmpeg with raspivid/arecord. i was reading this site but don't see mention of either one: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
[23:18:46 CET] <furq> http://vpaste.net/cXV9F
[23:18:49 CET] <furq> that should be all you need
[23:19:21 CET] <furq> if you have a desktop linux box it's much faster to cross-compile but it's more work to set up
[23:19:28 CET] <xtina> oh, that covers both raspivid/arecord? ok, will try now :)
[23:19:53 CET] <furq> omx-rpi is the rpi's h264 encoder
[23:20:11 CET] <furq> and alsa support will be automatically included if you have libasound2-dev installed
[23:20:45 CET] <xtina> cool
[23:21:31 CET] <xtina> is that second one correct? i get E: Unable to locate package libfdk-aac-dev
[23:22:04 CET] <furq> you probably don't have non-free in your sources.list
[23:22:58 CET] <furq> raspbian has been on jessie for a while so it should be there
[23:23:26 CET] <furq> you don't strictly need that but i assume it's faster than the native aac encoder because it's optimised for mobile
[23:23:32 CET] <furq> i've not benchmarked it though
[23:42:59 CET] <xtina> OK, i'm building ffmpeg now, but i excluded libfdk-aac-dev. time to wait :)
[00:00:00 CET] --- Mon Feb  6 2017


More information about the Ffmpeg-devel-irc mailing list