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

burek burek021 at gmail.com
Tue Apr 1 02:05:01 CEST 2014


[00:00] <jnvsor> klaxa: Now this is wierd... The program I'm using to send zmq messages to ffmpeg (To turn the mic stream on/off via the volume filter) is being triggered when expected but the actual audio from the mic when I start speaking "Arrives" later so it recieves my zmq commands on time but the audio is delayed
[00:02] <klaxa> huh? that's weird, audio should be in sync in any case
[00:03] <active8> I keep getting a grey picture no matter what I do with the first command. The mkv file isn't right
[00:03] <jnvsor> klaxa: Is there any way ffmpeg could get "Behind" at recieving input from pulseaudio?
[00:03] <klaxa> not really
[00:03] <klaxa> is the delay constant?
[00:03] <jnvsor> klaxa: No, it increases over time
[00:04] <klaxa> geh, that's bad
[00:11] <jnvsor> klaxa: I've been running it for a while now but can't reproduce - why would the position of -framerate matter? Aren't all the device options instantiated from cli at creation?
[00:11] <klaxa> ffmpeg syntax is: ffmpeg -f <input format> <input options> -i <input> <output options> <output>
[00:12] <klaxa> you don't want to set the input option to a fixed framerate especially when using x11grab because you cannot be sure that it is fast enough with providing frames
[00:12] <klaxa> instead you just take it as it arrives and force it to be 24 fps as an output option
[00:17] <jnvsor> klaxa: -framerate is an x11grab device setting that states the desired framerate
[00:17] <jnvsor> it causes x11grab to duplicate frames when it can't reach the desired framerate
[00:17] <klaxa> ah, maybe use -r 24 additionally to that then?
[00:17] <jnvsor> Not sure what that would do
[00:17] <klaxa> maybe it's some kind of edge-case bug
[00:18] <klaxa> that would set the output fps to 24 too
[00:18] <klaxa> i mean trying it is better than doing nothing
[00:18] <jnvsor> klaxa: I believe I used to use -r 24 on the output codec too
[00:19] <klaxa> not in the paste at least
[00:20] <jnvsor> Yeah I removed it since it seemed redundant (And iirc it didn't fix the problem
[00:20] <jnvsor> But now I can't seem to reproduce the issue
[00:20] <jnvsor> Annoying
[00:20] <jnvsor> Here's something wierd
[00:21] <jnvsor> twitch says my keyframe interval is drifting from 2s towards almost 4s now
[00:21] <jnvsor> Even though I set -g 48
[00:21] <klaxa> that's weird indeed
[00:23] <jnvsor> klaxa: It's drifted about 1/5s over the last 10 mins
[00:24] <jnvsor> So moving -framerate didn't do anything
[00:27] <jnvsor> Yeah, it's definitely the audio. The zmq filter is turning the volume on/off at the correct time but the audio that's recorded when the volume is on is late
[00:31] <jnvsor> klaxa: Looks like I'm going to need to set it to loglevel 99 cause the behaviour is just plain wierd
[00:41] <klaxa> did you only move -framerate or also change it to -r?
[00:42] <klaxa> that's the way it has always worked for me, correct framerate and synchronized audio
[01:02] <jnvsor> klaxa: I just moved it. There's a quick way to test it on your system
[01:02] <jnvsor> Give ffmpeg sigstop (Ctrl + Z in terminal) and resume with `fg` while recording
[01:03] <jnvsor> with -r it will skip the blank space, with -framerate it will freeze for the blank space
[02:20] <Jim-> hey everybody, I'm trying to do rtmp streaming via the libavformat library, but a problem on windows in particular is if you don't increase the socket send buffer size with setsockopt, the rate at which you're actually able to send data is drastically reduced in many situations (SO_SNDBUF often defaulting to 8192), preventing an outgoing stream from sending without constantly stalling
[02:20] <Jim-> I was curious if there was a way to access the network socket via the libraries so I could set the socket option or something
[03:17] <Snaggle> anyone been able to compile the new QTKit support from earlier today?  I keep getting a compile failure (qtkit.o is never made), but I want to see if it's reproducible elsewhere before filing a trac item
[07:53] <sinclair|work> Jim-: considered using nodejs?
[09:22] <stev3n> i try to grab stream from ip camera with this command:
[09:23] <stev3n> openRTSP -b 500000 -v rtsp://192.168.0.159:554/h264 | ffmpeg -i - -re -vcodec copy -map 0 -f segment -segment_time 60 0159out%03d.mp4
[09:23] <stev3n> and it say me "pts has no value", and out video is not segmented
[09:23] <stev3n> what should i do?
[09:25] <stev3n> ffmpeg version: 1.2.5
[09:31] <Jack64> stev3n: does it give any error?
[09:31] <Jack64> something you can paste here
[09:31] <Jack64> (not over 3 lines)
[09:33] <Jack64> pts has no value probably means your input is not correctly set up
[09:33] <stev3n> Jack64: it's just grab stream, but without segmenting
[09:33] <stev3n> pts has no value 80 q=-1.0 size=N/A time=00:00:05.68 bitrate=N/A
[09:33] <stev3n> [NULL @ 0x24d7750] Current profile doesn't provide more RBSP data in PPS, skipping
[09:33] <stev3n> [mp4 @ 0x24dd2b0] pts has no value
[09:33] <stev3n>     Last message repeated 5 times
[09:33] <stev3n> pts has no value 57 q=-1.0 size=N/A time=00:00:05.96 bitrate=N/A
[09:34] <Jack64> stev3n: not really sure about this one... maybe someone else can help
[09:34] <stev3n> it is possible to force creating pts ?
[09:35] <Jack64> actually this : " [NULL @ 0x24d7750] Current profile doesn't provide more RBSP data in PPS, skipping " does hint that maybe the input stream is not properly encoded
[09:35] <Jack64> perhaps you should google that error
[09:36] <stev3n> unfortunately i can not change video options of input stream
[09:37] <Jack64> but you can output video correctly with ffmpeg?
[09:38] <stev3n> yes, ffplay or mplayer correctly play input ctream
[09:38] <Jack64> no, I mean if you don't segment can you grab the stream?
[09:39] <stev3n> yes, i can
[09:40] <stev3n> without segmentation it work very well
[09:41] <Jack64> then your ffmpeg syntax must be wrong, I'm not sure because I never used -f segment
[09:41] <Jack64> but it seems right according to the manual
[09:41] <Jack64> ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.list out%03d.nut
[09:41] <stev3n> there are other cameras, and the script works correctly on it
[09:42] <stev3n> with segmentation
[09:42] <Jack64> hmm that's strange
[09:42] <Jack64> and the cameras are all the same?
[09:42] <Jack64> or different makes/models?
[09:43] <stev3n> it;s different, and i think input h264 stream also different
[09:43] <Jack64> that must be it then, the encoding from the camera must be improper, if that ffmpeg syntax works on other cameras
[09:44] <Jack64> if you can't change the output of the camera then I can't help you
[10:34] <termos> I'm trying to encode some audio with fdk_aac but the output sound is covered with lots of noise, but I can make out the underlying dialogue. Any ideas?
[11:24] <abique_> Hi, can I use ffmpeg to crop a rectangle from an image? If yes, which API? is it sws_scale? Thanks!
[12:04] <barnoux> hello, i contact you because i have a problem of server reboot on debian wheezy and it seems to happen when i launch my ffmpeg command
[12:06] <barnoux> how i can be sure it is ffmeg which make those reboot or other thing
[12:06] <barnoux> i ever read the logs but i don't find something explicit
[12:21] <pkvid_> how do I set the starttime of an mp3?
[12:23] <superware> I've been trying something similar to https://gist.github.com/krieger-od/1950618 but avformat_write_header returns -1094995529, any help will be highly appreciated.
[12:34] <superware> JEEB, hi. following your yesterday's help, can you please take a look?
[13:55] <pkvid_> how do I set the starttime of an mp3? Does anyone got clue?
[14:01] <superware> JEEB: hi, are you here?
[14:09] <relaxed> pkvid_: with -ss
[14:09] <relaxed> if you mean seeking to a specific time, that is
[14:10] <pkvid_> relaxed are you talking to  me?
[15:18] <pkvid_> When I run: ffprobe -i ../001-a.mp3     I get this:  Duration: 00:00:05.04, start: 0.023021, bitrate: 321 kb/s
[15:18] <pkvid_> Where can I get and set the starttime? Does anyone know?
[15:18] <pkvid_> I'm not usre where to look in the sourcecode
[15:19] <pkvid_> Could not find anything in the documents
[15:23] <pkvid_> Found the better question: How can I set/get/remove cuepoints?
[15:27] <superware> I'm trying to mux an h.264/RTP stream to mp4 without transcoding http://pastebin.com/KG7mHA7M but the resulting file video plays very fast, while the audio sounds normal. I'm looking for something generic that will output an mp4, any ideas?
[15:30] <Bumble-Bee> superware : "avconv -i <in> -map 0:0 -map 0:3 -strict experimental -c:a libvo_aacenc -ac 2 -c:v libx264 -preset:v superfast -f mp4 -movflags isml+frag_keyframe <out>"
[15:30] <Bumble-Bee> s/avconv/ffmpeg
[15:31] <superware> Bumble-Bee: I'm using libav* directly
[15:31] <Bumble-Bee> ahh ok
[15:32] <Bumble-Bee> i had then "video plays very fast" without -movflags isml+frag_keyframe
[15:32] <superware> any libav* knowledge?
[15:33] <superware> :)
[15:33] <Bumble-Bee> hardly any :P
[15:34] <Mavrik> superware, well it's rather easy to look up what does flags do
[15:34] <Mavrik> copy that from ffmpeg source.
[15:35] <Mavrik> hrm, even tho
[15:35] <Mavrik> those flags have nothing to do with playback really
[15:36] <Bumble-Bee> they are the container
[15:36] <Bumble-Bee> if thats wrong the playback would be broken
[15:36] <superware> please see http://pastebin.com/KG7mHA7M
[15:36] <Mavrik> Bumble-Bee, those flags are for live streaming segmentation
[15:37] <Bumble-Bee> yep
[15:37] <Mavrik> superware, I don't see you setting timebase on output streams
[15:37] <superware> output_stream->codec->time_base = input_stream->time_base; ?
[15:38] <Mavrik> note how you're not setting the same fields.
[15:39] <Mavrik> you probably should interleave the output with av_interleaved_write_frame
[15:41] <Mavrik> hmm, also PSS/SPS data might be missing if you're not using an encoder
[15:41] <superware> should it be output_stream->codec->time_base = input_stream->codec->time_base; ?
[15:44] <superware> Mavrik: setting the same fields + using av_interleaved_write_frame didn't help, video still plays as fast as possible, audio ok
[15:44] <superware> what's PSS/SPS?
[15:45] <superware> does it make sense to av_read_frame and av_interleaved_write_frame the same AVPacket?
[15:50] <superware> Mavrik? :)
[16:01] <jnvsor> So last night I was talking about desync in streaming to twitch. Yeah using -r didn't change anything. The video is in sync, it's the audio that's desyncing
[16:20] <superware> Mavrik can you please help?
[17:30] <luc4> Hello! I'm using ffmpeg to mux a h264 stream into an mp4 container. Everything works, but I would like to avoid including the x264 library. The problem is that in my code I have to instantiate AVCodec to add the new stream. My AVCodec is created with the function avcodec_find_encoder, for which I set AV_CODEC_ID_H264. At this point, of course, the library fails to find x264 and the rest fails. Any idea if it is possible to mux the h264 stream into the mp4
[17:30] <luc4> without actually needing libx264?
[17:48] <superware> luc4: can I /msg you?
[17:49] <superware> luc4?
[17:49] <luc4> yes
[17:50] <sacarasc> luc4: Try mp4box.
[17:51] <luc4> sacarasc: isn't that an application?
[17:51] <sacarasc> Yes.
[17:51] <luc4> I'm writing C code.
[17:55] <TekniQue> quick question, when using libavformat in an application to decode a video stream, how do I apply the equivalent of the -map option in the ffmpeg executable?
[18:00] <Mavrik> luc4, you could prepopulate AVCodec structure with what mp4 needs
[18:00] <Mavrik> TekniQue, when doing av_read_packet you ignore packets with stream ids you're not interested in
[18:01] <TekniQue> I'm reading a multi program transport stream and need to filter out the uninteresting services
[18:01] <luc4> Mavrik: ok, so I dump the values in AVCodec, I thought about that, but then won't avcodec_open2 fail as well?
[18:02] <TekniQue> currently, it seems to be random which service the decoder chooses to decode
[18:02] <TekniQue> when I start it up, it'll start decoding any one of the 4 available services on that stream
[18:03] <Mavrik> luc4, you don't have to open the codec if you're not doing any de/encoding
[18:03] <Mavrik> TekniQue, you'll always get _all_ services
[18:03] <Mavrik> e.g. all packets in the stream
[18:03] <Mavrik> when calling av_read_packet
[18:04] <TekniQue> but I've read that when using the ffmpeg executable, the service can be selected by -map 0:p:sid
[18:04] <TekniQue> where sid is the program ID
[18:04] <Mavrik> and_
[18:04] <Mavrik> ?
[18:04] <Mavrik> you can't selectively demux a stream
[18:04] <Mavrik> you CAN however then choose which packets to decode
[18:07] <luc4> Mavrik: thanks, I'll try that way!
[18:07] <TekniQue> I'm just slightly confused, how do I find the service of the packet returned by av_read_frame before I call decode_packet?
[18:09] <Mavrik> TekniQue, each stream gets assigned id
[18:09] <Mavrik> TekniQue, and if I remember correctly it's somewhere in the AVProgram inside AVStream structure
[18:09] <luc4> Mavrik: do I also have to manually fill AVCodecContext?
[18:23] <Wulf> Hi
[18:24] <Wulf> my camera creates for each 5 minutes one video file. I'd like to create a single video from a part of file#1, complete file#2 and parts of file#3. How would I go about that?
[18:28] <klaxa> Wulf: http://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files if they share the same codec (which they will) look at the concat demuxer
[18:28] <klaxa> i use it a lot
[18:28] <Wulf> klaxa: thanks
[18:59] <Wulf> klaxa: works good
[18:59] <Wulf> how can I add a blur effect (or black rectangle) to hide someone's face in a portion of the video?
[19:02] <klaxa> Wulf: http://stackoverflow.com/questions/9093549/ffmpeg-how-to-add-pixellate-effect
[19:02] <klaxa> also maybe make use of google
[19:03] <Wulf> google? what's that? :)
[19:03] <sacarasc> It's like Bing, but more!
[19:04] <klaxa> also, end of the line is: maybe ffmpeg is not the best choice for that
[19:04] <klaxa> you can probably do it, but it will get complicated fast
[19:04] <Wulf> I'm open for suggestions
[19:05] <Wulf> I'll try a video editor, starting with OpenShot..
[19:57] <hdevo> hey guys, I'm having a problem with a h264 video stream crashing both VLC and Chromium and as both are ffmpeg-based, I figured it's some problem with ffmpeg
[19:58] <hdevo> I don't know whether this is a problem of the stream or of ffmpeg itself
[19:58] <hdevo> the URL is: http://kokodzambo.com/ffmpeg/badaccess.mp4
[19:58] <hdevo> could you help me out?
[19:59] <klaxa> works in firefox at least
[20:01] <hdevo> yeah, it crashes chromium on mac, shows with artifacts or crashes in a non-deterministic way in chromium/linux, works on chrome/windows BUT not in a VM, always crashes VLC
[20:01] <klaxa> and in mpv and vlc
[20:01] <klaxa> oh wait
[20:01] <klaxa> now there's stuff in vlc
[20:01] <klaxa> that doesn't look too good
[20:03] <hdevo> yeah it's quite bizarre
[20:04] <hdevo> I tried to debug it with ffmpeg-git, but ffplay seems to just hang on it
[20:05] <klaxa> ffplay plays it fine for me
[20:05] <klaxa> remuxing it to mkv doesn't fix the vlc issue
[20:05] <klaxa> mpv has no problems whatsoever, but timestamp warnings
[20:05] <klaxa> so does ffplay, probably because both use avformat
[20:07] <hdevo> could you post you command line for remuxing? will try to do some testing here
[20:08] <klaxa> ffmpeg -i badaccess.mp4 -map 0 -c copy badaccess.mkv
[20:09] <hdevo> ok, so the thing is, ffplay plays it happily for me as a local file
[20:09] <hdevo> but when I pass in the URL, it hangs after ~5 seconds
[20:11] <klaxa> i get >[tcp @ 0x7fe21809dbe0] Connection to tcp://kokodzambo.com:80 failed: Network is unreachable
[20:14] <hdevo> works for me: ffplay "http://kokodzambo.com/ffmpeg/badaccess.mp4"
[20:15] <klaxa> ah didn't specify it properly, i get the error about 10 seconds into the file
[20:19] <hdevo> and this URL? https://s3.amazonaws.com/ffmpeg-testing/badaccess.mp4
[20:22] <klaxa> seems kinda broken in ffplay too
[20:22] <klaxa> in mpv the cache keeps not getting filled
[20:22] <klaxa> once it's filled plays fine
[20:22] <klaxa> or so i thought
[20:27] <hdevo> well, I'm getting really low framerates on ffplay, but I think it's due to problems with streaming, as each GUI player I've tested plays it smoothly
[20:27] <hdevo> any ideas what's wrong here?
[20:31] <klaxa> not really, especially regarding the incorrect decoding in vlc
[20:35] <hdevo> ok, are there any tools that'll help me determine if it's the video's fault?
[20:36] <hdevo> beside compiling vlc and running it under gdb, of course
[20:36] <klaxa> dunno
[20:37] <klaxa> i mean apparently the file is more or less valid
[20:37] <klaxa> firefox and mpv play it fine
[20:37] <klaxa> i'll try with chromium on linux
[20:37] <klaxa> same decoding errors as in vlc
[20:38] <klaxa> also crashes chromium
[20:41] <hdevo> I'd really want to file a bugreport, but I still fell like having not enough data :/
[20:42] <klaxa> describe the problem, upload sample
[20:42] <klaxa> if people ask for more information provide it
[20:44] <hdevo> ok, will do, thanks for help :)
[22:53] <superware> I'm dumping h.264 to mp4, is there a way to embed a secondary data-stream with my own custom data, so that a dedicated player will be able to extract it while playing?
[22:55] <sacarasc> What kind of data?
[22:56] <superware> a short binary or text
[22:58] <superware> I actually don't want to use OSD, I rather do it in the player if required by the user
[22:59] <superware> I'm using libav*...
[23:00] <superware> sacarasc?
[23:00] <sacarasc> You're using libav* rather than the ffmpeg binary?
[23:00] <sacarasc> I have no idea!
[23:02] <esrax> does ffmpeg allow you to loop audio yet?
[23:02] <superware> are you asking me?
[23:03] <esrax> asking the channel
[23:05] <llogan> esrax: it is possible with concat demuxer
[23:05] <llogan> see this non-CamelCased link: https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files
[23:05] <llogan> search for "loop a video"
[23:05] <esrax> hmm interesting
[23:06] <llogan> that could use a windows example too, but i don't know how to do that in windows
[23:09] <esrax> how would that behave if i'm trying to loop audio i'm muxing with a video stream?
[23:09] <esrax> the stream is of an unknown length (webcam)
[23:12] <llogan> i'm not sure
[23:12] <esrax> alright, well thanks for the info :) i'll have to test
[23:14] <superware> or... is it possible to create and embed a CODEC_TYPE_DATA stream while muxing to mp4?
[23:17] <llogan> you can always try it with the ffmpeg cli tool: ffmpeg -i input -map 0:v -map 0:a -map 0:d -codec:d copy output.mp4
[23:17] <llogan> i'm unsure if MP4 can handle it
[23:19] <superware> llogan: I'm asking about libav*
[23:21] <superware> sorry for the misunderstanding
[23:24] <llogan> superware: i know, but if it works with the cli tool then it is more likely to be possible via the libraries
[23:24] <llogan> it was just supposed to be a simple test
[23:26] <superware> I have no experience with the cli tool
[00:00] --- Tue Apr  1 2014


More information about the Ffmpeg-devel-irc mailing list