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

burek burek021 at gmail.com
Fri Jul 31 02:05:01 CEST 2015

[00:05:34 CEST] <prelude2004c> sonds good
[00:05:42 CEST] <prelude2004c> what do you think is the best way to dump files into the UDP stream?
[00:05:45 CEST] <prelude2004c> cat or something like that ?
[00:05:53 CEST] <prelude2004c> has to be in realtime of course
[00:06:04 CEST] <c_14> Whatever you have lying around.
[00:06:12 CEST] <prelude2004c> i want to plya one file , one after the other or simply one file in a loop which i can do in some script like " while [ 1 ]; do , etc etc
[00:06:12 CEST] <c_14> You could just use ffmpeg
[00:06:30 CEST] <prelude2004c> ya the only problme is ffmpeg takes forever to startup .. i do't wnat to have lag betwen content
[00:06:38 CEST] <prelude2004c> i want to basically end 1 packet and start another
[00:07:08 CEST] <c_14> The problem with other solutions is going to be keeping it realtime and not faster than realtime.
[00:08:01 CEST] <prelude2004c> yup
[00:08:15 CEST] <prelude2004c> it is a problem.. but having ffmpeg stop and then start new session again will delay 1 - 2 seconds
[00:08:23 CEST] <prelude2004c> doesn't sound like much but after 10 files.. everything will be out of sync
[00:09:56 CEST] <c_14> I don't know about your PC, but ffmpeg starts pretty much instantaneously on my system even when reading from a network source.
[00:16:05 CEST] <prelude2004c> just tried it
[00:16:09 CEST] <prelude2004c> lost like 3 seconds of time
[00:16:19 CEST] <prelude2004c> it stoped.. then started.. took 1 or 2 seconds to get going again
[00:16:29 CEST] <prelude2004c> also, nothing in the UDP stream for some reason .. which sux
[00:37:15 CEST] <bencc1> what format I can use to capture and read RTP packets?
[00:37:25 CEST] <bencc1> I mean read with ffmpeg
[00:44:13 CEST] <kepstin-laptop> really depends how you captured them, I assume you have a pcap file or something?
[00:44:33 CEST] <kepstin-laptop> iirc, wireshark might have some stuff to extract some formats from an rtp stream in a pcap file
[00:45:49 CEST] <kepstin-laptop> you can't really have a raw "rtp" file, because rtp normally requires being held in something that specifies packet size, it doesn't have a "raw" form.
[00:46:53 CEST] <bencc1> kepstin-laptop: I'm using a simple script to save to pcap. the pcap file format is simple
[00:47:07 CEST] <bencc1> just save Ethernet, IP and UDP frames and than the RTP packet
[00:47:27 CEST] <bencc1> I can easily extract the RTP packet and the payload with a post processing script
[00:47:52 CEST] <bencc1> how can I create a vp8 stream from the payload?
[00:48:07 CEST] <bencc1> do I just need to reorder packets?
[00:48:13 CEST] <kepstin-laptop> it requires knowledge of the destination format
[00:48:20 CEST] <kepstin-laptop> read the specs, such as they are.
[00:48:29 CEST] <bencc1> the RTP payload is already vp8
[00:48:30 CEST] <kepstin-laptop> usually the rtp encapsulation spec has enough info to reverse it
[00:48:41 CEST] <bencc1> I can extract the vp8 payload
[00:48:46 CEST] <bencc1> is this enough?
[00:48:59 CEST] <bencc1> I also need to reorder the packets because it's send over udp
[00:49:10 CEST] <kepstin-laptop> ... or you could just use wireshark to do it.
[00:49:18 CEST] <bencc1> I need a script
[00:49:27 CEST] <bencc1> wireshark is gui, right?
[00:49:57 CEST] <kepstin-laptop> yeah, their command line stuff doesn't have the rtp stream dumping feature
[00:51:08 CEST] <bencc1> any other option
[00:51:31 CEST] <kepstin-laptop> it doesn't look like vp8 has a raw stream, so if you parse it out yourself you will either need to hand the individual packets directly to libavcodec or mux them to some container.
[00:51:56 CEST] <kepstin-laptop> I suppose you could probably do something fun and replay the stream into ffmpeg's own rtp parsing code...
[00:52:40 CEST] <bencc1> how?
[00:52:46 CEST] <bencc1> by writing C code?
[00:54:07 CEST] <kepstin-laptop> if you wanted to do something really crazy, use tcpreplay on the pcap file to stream it to an ffmpeg listening on localhost
[00:54:17 CEST] <kepstin-laptop> not sure i'd advise actually doing that, but it might work ;)
[00:55:12 CEST] <bencc1> how do I know how fast to replay?
[00:57:22 CEST] <kepstin-laptop> not sure it matters, the rtp packets should  have timestamps.
[00:58:06 CEST] <kepstin-laptop> but there probably are some tools around already designed to extract media from rtp in pcap files. I'm just not sure where to look.
[00:58:30 CEST] <kepstin-laptop> most of them would be designed for telephony stuff, so support for vp8 might be a bit iffy - that's pretty recent.
[00:59:00 CEST] <kepstin-laptop> (and it's mostly used in webrtc, which mandates dtls encryption, which makes stream dumping stuff less useful...)
[01:01:09 CEST] <bencc1> My pcap is raw rtp without encryption
[01:01:16 CEST] <bencc1> I'm just trying to understand the logic
[01:01:39 CEST] <bencc1> how do I convert raw rtp with vp8 payload to a webm file
[01:01:48 CEST] <bencc1> what do I do with missing packets
[01:02:25 CEST] <kepstin-laptop> if you want to know the theory of that, you want to be reading https://tools.ietf.org/html/draft-ietf-payload-vp8-16
[01:02:39 CEST] <kepstin-laptop> if you just want a tool to do it... well, i don't know of any offhand :/
[01:04:11 CEST] <bencc1> this tool does it
[01:04:11 CEST] <bencc1> https://github.com/meetecho/janus-gateway/blob/master/postprocessing/janus-pp-rec.c
[01:04:17 CEST] <bencc1> but with a custome format
[01:05:59 CEST] <kepstin-laptop> that tool is probably assuming that things like packet reordering were done before the stream was saved (i'd assume janus server bits are running a jitterbuffer)
[01:07:18 CEST] <kepstin-laptop> but yeah, other than that it's following the rtp vp8 spec to depacketize the vp8, then the webm specs to packetize it as webm (probably via a library)
[01:07:30 CEST] <bencc1> it does reordering too
[01:08:04 CEST] <kepstin-laptop> hmm? i didn't see any reordering in there, only some stuff for handling timestamp resets.
[01:08:58 CEST] <kepstin-laptop> oh, i guess it does
[01:09:06 CEST] <kepstin-laptop> didn't look at it that hard
[01:09:48 CEST] <kepstin-laptop> so yeah, you probably could adapt that code to pcap input without too much trouble.
[01:09:52 CEST] Action: kepstin-laptop is off now.
[01:10:04 CEST] <bencc1> ok
[04:25:54 CEST] <JimmySlice17_> would anyone be familiar with optimal x264 codec settings which adapt quantization per bitrate
[05:42:39 CEST] <prelude2004c> hey everyone
[05:42:44 CEST] <prelude2004c> can someone help me out ... while [ 1 ]; do ls /home/content/* > /scripts/files.txt; ffmpeg -re -f concat -i files.txt -codec copy  -bsf:v h264_mp4toannexb -f mpegts udp://localhost:5000;done
[05:42:47 CEST] <prelude2004c> whats wrong with that ?
[05:42:54 CEST] <prelude2004c> plays just fine if i just play the file over and over
[05:43:08 CEST] <prelude2004c> but soon as i use the concat with the files.txt it start to act a little crazy
[05:45:12 CEST] <prelude2004c> nehhhh " -bsf:v h264_mp4toannexb " removed seems ok now
[05:53:43 CEST] <prelude2004c> hey, anyone know a good resource to have someone help with some scripting?
[06:17:02 CEST] <relaxed> prelude2004c: http://mywiki.wooledge.org/BashGuide
[11:26:24 CEST] <Neepu> Hey! I'm looking into video & audio synchronization, do anyone know a good place to look for resources? Have very limited knowledge about the subject. Not looking for actual software doing it, but rather how it is implemented
[11:30:56 CEST] <JEEB> Neepu: most sane containers have per-sample timestamps
[11:31:36 CEST] <JEEB> so you have a sample (frame) of video, that has a timestamp, then you have a sample (frame) of audio and that usually is coded and after you decode it you get N samples of raw audio (so you have the start timestamp and the duration)
[11:31:50 CEST] <JEEB> some containers also have the duration timestamp, like MP4
[11:32:01 CEST] <JEEB> others just have the sample's start timestamp
[11:32:52 CEST] <Neepu> okay
[11:33:44 CEST] <JEEB> then there's ancient stuff like AVI which just has a "sample rate"
[11:34:01 CEST] <JEEB> but thankfully those are not the majority
[12:09:03 CEST] <benschwarz> I want to add a timer text to a video, using a filter, I've been messing around with timecode=, but I was wondering if I'd be able to format the text to only display "Seconds.Milliseconds", eg "10.4", "3.2", etc
[12:09:16 CEST] <benschwarz> The docs aren't super& great in that area
[12:32:08 CEST] <raminious> Hi, I wrote a Linux shell script ( https://gist.github.com/raminious/de84575a7a5aca255c4d ) that concatenate two MP4 video file, first video file (prefix) only has Video Stream, and second mp4 file (main) has Video and Audio, it works fine on PC, but on Android default player, Audio not sync. can you take a look at my script and say what is the mistake
[12:33:20 CEST] <Rumbles> Hello, I'm trying to convert some CCTV footage, stored in dav format, using ffmpeg. if I use "ffmpeg -i in.dav out.avi" the command completes, but the footage quality seems quite poor and the footage is faster than the original. I tried using the -vcodec copy flag, but that gave me an error, (H.264 bistream malformed) has anyone experience converting dav video to some other format (doesn't have to be avi, as long as something like VLC can handle it) wh
[12:33:21 CEST] <Rumbles> o would care to offer some advice?
[13:09:40 CEST] <KarlFranz> Rumbles: Reading the docs is good advice.
[13:10:28 CEST] <KarlFranz> Rumbles: Docs say that if you don't set a bitrate, the output will use the default bitrate, which is bad as taxes.
[13:11:45 CEST] <KarlFranz> That for the quality problem.
[13:12:41 CEST] <KarlFranz> YOu might need to set the fps manually if you are encoding at wrong speed.
[13:13:46 CEST] <chungy> also AVI is quite an ancient format and ffmpeg's defaults for it are very old codecs too. You'd probably get a significant improvement just by changing the output to *.mkv (which uses h264 by default for video)
[13:14:34 CEST] <chungy> people shove more modern stuff into AVI but the support for such things is poor, you're better off moving onto a modern container. :P
[13:14:56 CEST] <benschwarz> can I use `expr_int_format` within text='pts' to format the time into something like 2.3 (2 seconds, 3 tenths)
[13:30:40 CEST] <Rumbles> thanks
[14:05:22 CEST] <zugzwang> Is there a way to read from a file which is dynamically increasing its size?
[14:05:28 CEST] <zugzwang> like a stream?
[14:10:57 CEST] <DHE> best to present it as a stream. feed it via stdin or a named pipe, connect to it by network using a protocol that's for streaming, etc
[14:40:35 CEST] <edoardo> Hello!
[14:40:58 CEST] <edoardo> I can't seem to find a way to send custom headers to an icecast server
[14:41:05 CEST] <edoardo> i'm using ffmpeg and this command:
[14:41:17 CEST] <edoardo> ffprobe -headers 'Icy-MetaData:1\r\n\r\n' -print_format json -show_format -show_streams
[14:41:35 CEST] <edoardo> but the command hangs and outputs: [http @ 0x14a1c80] No trailing CRLF found in HTTP header.
[14:42:19 CEST] <edoardo> there's a ticket but i didn't quite understand the workaround https://trac.ffmpeg.org/ticket/3268
[14:42:24 CEST] <edoardo> #3268
[14:53:29 CEST] <c_14> edoardo: ffmpeg automatically sends Icy-MetaData: 1
[14:53:31 CEST] <c_14> My version at least
[14:53:48 CEST] <edoardo> c_14: it was an icecast missconfiguration, sorry
[15:25:55 CEST] <prelude2004c> hey, anyone very familiar with nginx ?
[15:35:01 CEST] <c_14> The people in #nginx?
[15:37:59 CEST] <prelude2004c> tried that
[15:38:02 CEST] <prelude2004c> no response :(
[15:38:12 CEST] <prelude2004c> well nothing yet really with answers anways
[15:38:18 CEST] <prelude2004c> :) thought i would ask twice
[15:38:26 CEST] <prelude2004c> sort of stuck at the moment :)
[15:38:55 CEST] <DHE> #nginx would be best, but if you're asking about the RTMP module that's 3rd party so even their support might be limited
[15:39:36 CEST] <prelude2004c> nope.. asking about why i can't seem to be running two sessions at the same time.. eg.. server on port 8080 and port 8082
[15:39:46 CEST] <prelude2004c> the config is correct.. 8080 starts but 8082 does not
[15:39:54 CEST] <prelude2004c> and there is no conflict anywhere
[15:42:45 CEST] <bencoh> nginx-rtmp-module is works (or at least used to work, here)
[15:43:17 CEST] <bencoh> what do you mean by "two sessions" ? http+rtmp ?
[15:48:13 CEST] <prelude2004c> no like... just straight up listen 8080 and listen 8081
[15:48:21 CEST] <prelude2004c> i have both directives inside the config.. one starts the other does not
[15:48:22 CEST] <prelude2004c> no errors
[17:04:21 CEST] <ChazNunz> Hello - working on a ffmpeg filterchain with drawtext to timestamp a video.  filter is successful at adding timecode to video. However, the video is stamped with hh:mm:ss:ff where h is hours, m = mins, s = secs, and f = frames.  Is it possible to not include the frames in the timecode?  Just stamp with hh:mm:ss?
[17:13:49 CEST] <ChazNunz> Here's a pastebin of the drawtext filter i'm working with.
[17:13:51 CEST] <ChazNunz> http://pastebin.com/nvqFXKDy
[18:19:10 CEST] <Fyr> guys, how to split a FLAC having CUE?
[18:20:26 CEST] <c_14> You usually use something like shnsplit. I don't think ffmpeg supports cue
[18:22:43 CEST] <Fyr> =(
[19:09:27 CEST] <edoardo> how reliable is the p2p tcp streaming using ffmpeg?
[19:12:59 CEST] <c_14> As reliable as tcp
[19:13:14 CEST] <edoardo> cool
[19:13:28 CEST] <edoardo> how can i strip all the data from a stream - but the audio?
[19:13:36 CEST] <c_14> -map 0:a
[19:13:40 CEST] <edoardo> cool!
[19:14:03 CEST] <edoardo> and it works perfectly as always
[19:16:22 CEST] <edoardo> hmm, it has a lot of latency tho
[19:16:32 CEST] <edoardo> any way to reduce the buffer size client side?
[19:16:37 CEST] <edoardo> i'm using ffplay as a client
[19:16:44 CEST] <edoardo> tcp has no options
[19:17:35 CEST] <c_14> Mainly just what ffmpeg uses interally for buffering + encoder buffering.
[19:18:19 CEST] <edoardo> i get ~3s of latency, the opus codec has way less latency
[19:18:28 CEST] <edoardo> so there's a buffer somewhere i guess
[19:19:42 CEST] <DHE> the latency won't be in TCP. that's a different kind of buffer. (unless you're getting your feed from the other side of the earth)
[19:19:55 CEST] <edoardo> i'm working in local just for testing
[19:20:21 CEST] <edoardo> i know it's not in tcp, but i was wondering about a buffer editable in the tcp plugin
[19:20:54 CEST] <edoardo> sorta like buffer_size=size in udp
[20:10:25 CEST] <astroty> Hello there, someone here could help? I have a big delay problem while streaming to a rtmp server on localhost. I noticed that the delay normally happens when someone connects to the server with the stream midsession, so there are timing differences. When they connect and then the stream starts, the delay is far lower (still 2-3 secs).
[20:19:15 CEST] <astroty> latency*
[20:22:44 CEST] <KarlFranz> Hey guys. When encoding video with lbvpx, I understand that -minrate and -maxrate set a floor and a ceiling for "instantaneous" bitrates, instead of constraining the average bitrate of the output only. Is that correct?
[20:23:17 CEST] <JEEB> generally you never, ever use minrate
[20:23:22 CEST] <JEEB> you should only care about maxrate and bufsize
[20:23:32 CEST] <Nolski> ChocolateArmpits: awesome nick
[20:26:02 CEST] <KarlFranz> JEEB: Ok, but that does not answer the question :-)
[20:26:39 CEST] <KarlFranz> JEEB: During some tests, I have found some videos subjetively improved when using minrate, so ti has a place.
[20:27:57 CEST] <JEEB> KarlFranz: in that case you are better off adjusting your general rate control mode
[20:28:03 CEST] <JEEB> rather than trying to play around with minrate
[20:28:40 CEST] <JEEB> and yes, maxrate+bufsize limit average bit rate over bufsize
[20:29:09 CEST] <JEEB> while the actual rate control mode you set is doing the base rate control, which maxrate+bufsize is limiting
[20:29:21 CEST] <JEEB> if it's ABR then it's the average rate over the whole clip
[20:29:35 CEST] <JEEB> if it's constant quantizer / constant rate factor that's that
[20:31:23 CEST] <KarlFranz> Ok, so setting a maxrate for X and an average for Y does not mean the encoder is gonna use X as a ceiling for limited bunches of frames while keeping Y at any cost.
[20:31:33 CEST] <Chocola3> Nolski: why ?
[20:32:24 CEST] <KarlFranz> I was asking because, in my tests, using a minrate didn't prevent some parts of the video from being encoded way bellow that limit.
[20:34:46 CEST] <JEEB> KarlFranz: also depending on the version and the output format with libvpx the rate control for it can be quite a bit less fabulous than you'd expect
[20:36:03 CEST] <JEEB> buut yeah, if you have set bit rate as your general rate control mode, then it's ABR over the whole clip (if you are doing one-pass it's a best effort guessing thing, basically). and then maxrate+bufsize limit that by trying to make sure you don't go over maxrate when you calculate average rate over bufsize
[20:36:31 CEST] <JEEB> (also I have no idea how good VBV libvpx is [VBV is how the thing maxrate+bufsize do together is called])
[20:36:37 CEST] <JEEB> s/is/has/
[20:38:12 CEST] <KarlFranz> The videos don't look bad so I suppose it is ok.
[20:38:28 CEST] Action: KarlFranz USES 2-PASS FOR ABR
[20:40:57 CEST] <DHE> KarlFranz: black images will be encoded at whatever bitrate they end up as.
[20:41:33 CEST] <DHE> the maximum settings are intended for use when you have devices with specific decoding capabilities or when you have to deal with streaming scenarios and limited size buffers. (for x264 see vbv_bufsize as well)
[20:43:09 CEST] <KarlFranz> Noticed
[20:50:41 CEST] <KarlFranz> Last line I have tried is: "ffmpeg -i input.x264 -c:v libvpx -b:v 1200k -minrate 1000k -maxrate 4800k -bufsize 9600k -pass 2 -an -sn out.webm". I suppose the limits could be wiser.
[20:55:26 CEST] <slacker> Hi, is it possible to use harware accleration to accelrate video encoding using ffmpeg?  I haven't installed proprietary drivers.  VAAPI with intel intregrated graphics a good idea?
[20:55:30 CEST] <slacker> 00:18 -!- jamrial [jamrial at] has joined #ffmpeg-devel
[21:00:06 CEST] <DHE> while x264 has opencl support, it's not really that great and whether it actually helps will vary
[21:00:26 CEST] <DHE> AFAIK that's all the hardware acceleration there is in ffmpeg. some companies have commercial encoders that do better.
[21:03:40 CEST] <slacker> DHE, Is installing an fglrx driver worth it?
[21:04:42 CEST] <DHE> if you mean to get opencl support, I'm going to say No in the general case
[21:07:31 CEST] <slacker> Okay.  But I'm not able to get VAAPI working either.  ffmpeg is build using --enable-vaapi, but the get the below error while trying to use it.
[21:07:34 CEST] <slacker> http://pastebin.com/H3u7HN1b
[21:08:15 CEST] <slacker> DHE, Am I right in understanding that hwaccel applied only for decoding and not encoding?
[21:19:04 CEST] <DHE> slacker: currently accelerated decoding in ffmpeg is limited to VDPAU. there may be libvo support but I've not tried it myself.
[21:19:21 CEST] <DHE> even then VDPAU is really only good for sending to the screen - the ordinary playback scenario
[21:24:33 CEST] <slacker> DHE: That is really usefull information, thank you!  I have rebuild ffmpeg from sources atleast 10 times trying to get VAAPI working, lol!
[21:27:10 CEST] <slacker> I have an ATI Radeon based grphics card and I don't encode videos all that much. Just wanted video encoding on linux to be as fast as in Windows.
[21:36:46 CEST] <astroty> Hello there, someone here could help? I have a latency problem while streaming to a rtmp server on localhost. I noticed that the delay normally happens when someone connects to the server with the stream midsession, so there are timing differences. When they connect and then the stream starts, the delay is far lower (still 2-3 secs).
[22:28:36 CEST] <explodes> This is killing me- and I hate that it is such a niche question, but hopefully someone has some useful information for me:
[22:29:41 CEST] <explodes> The video decoder in my android app is ffmpeg. Functions such as play/pause, and speed adjustment work fine. However, when the video begins, it starts between 8 and 16 seconds into the clip, not at the zero mark.
[22:37:29 CEST] <explodes> I also cannot seek to position 0
[22:45:39 CEST] <ChazNunz>  Hello - working on a ffmpeg filterchain with drawtext to timestamp a video.  filter is successful at adding timecode to video. However, the video is stamped with hh:mm:ss:ff where h is hours, m = mins, s = secs, and f = frames.  Is it possible to not include the frames in the timecode?  Just stamp with hh:mm:ss?
[22:45:48 CEST] <ChazNunz> http://pastebin.com/nvqFXKDy
[22:50:41 CEST] <Nolski> ChazNunz: Don't think so. I've seen a bunch of other people ask that same question but never received an answer
[22:50:48 CEST] <Nolski> but citation is needed
[22:54:16 CEST] <ChazNunz> Bummer.  Thanks for reply.
[00:00:00 CEST] --- Fri Jul 31 2015

More information about the Ffmpeg-devel-irc mailing list