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

burek burek021 at gmail.com
Tue May 7 02:05:01 CEST 2013


[00:04] <mapreduce> On that same question, I've now recompiled ffmpeg with mjpeg enabled, and avcodec_find_decoder_by_name("mjpeg") still gives NULL.  How can I do something like ffmpeg -codecs from code?
[00:05] Action: mapreduce examines ffmpeg.c
[00:06] <ubitux> i think it's in cmdutils.c
[00:10] <durandal_1707> mapreduce: "jpeg" also gives null?
[01:45] <mapreduce> durandal_1707: Correct.
[01:46] <mapreduce> I copied the cmdutils.c code into my program, and it only gives the headers; it shows no decoders at all.
[01:46] <mapreduce> yet ffmpeg -codecs shows what I expect, including mjpeg.
[01:47] <BtbN> Is it possible to use lame presets when transcoding to mp3 with ffmpeg?
[02:12] <BtbN> Hm, and it is possible to keep the metadata of a file when transcoding m4a -> mp3?
[02:12] <BtbN> "-map_metadata 0" does not work
[02:15] <BtbN> The output #0 ffmpeg gives looks ok and contains all the metadata. But the resulting mp3 file does not contain any metadata.
[02:26] <BtbN> Hm, seems like the tags are copied, but somehow broken. At least VLC can't read them.
[02:26] <BtbN> ffplay displays them correctly
[05:17] <mapreduce> If anyone cares about my earlier problem, it was that I had not called avcodec_register_all();
[05:17] <mapreduce> and so no codecs had been registered.
[05:49] <Astin> Um ..
[05:50] <Astin> How can I split rtmp to file for every 7 seconds?
[05:51] <Astin> when rtmp with live T.T
[05:55] <Fjorgynn> loops?
[06:05] <Astin> yes
[06:05] <Astin> i will loop
[06:05] <Astin> but what is option for ffmpeg
[06:05] <Astin> I tried -t
[06:06] <Astin> but I think -t donen't
[06:06] <Astin> work
[06:06] <Astin> I want to chunk rtmp to files.
[07:55] <smj> How do I use x264's vbv-maxrate and vbv-bufsize options with ffmpeg?
[07:58] <smj> -x264opts "vbv-maxrate=5000:vbv-bufsize=200:slice-max-size=1500" there it is
[08:02] <smj> hm? "[libx264 @ 0x2c925e0] bad option '"vbv-maxrate': '800'"
[08:05] <smj> oh nevermind, too many " in the script
[08:08] <JEEB> smj, for just maxrate and bufsize there are the -bufsize and -maxrate mappings just fyi
[08:08] <JEEB> if you need slice-max-size and stuff, then yes -- you will have to use x264opts
[08:08] <smj> thanks
[08:39] <smj> wasn't it supposed to work like ABR? it's encoding at about half the maxrate
[08:46] <JEEB> maxrate and bufsize just make sure that you do not go over those limitations
[08:46] <JEEB> so that if a decoder buffers bufsize amount of video, and has at least the bandwidth of maxrate, it should only need to buffer once during the whole playback session
[08:51] <smj> so if I set bufsize of 1600 and maxrate 800, shouldn't the buffer of two seconds have an average bitrate of 800?
[08:52] <JEEB> yes, but it will only limit the encoder's other rate control functions, not blow up the bit rate :)
[08:53] <JEEB> so if your source doesn't need much bits or you have instructed it to keep at some other bit rate, it will just keep a check on the stream to be under those limits
[08:54] <smj> so should I use CRF in addition if that's what I want?
[08:54] <JEEB> yes, if you want to set your rate control via crf (closest to "constant quality" we currently have), then that's the way
[08:55] <JEEB> if you haven't set any rate control yet, then the default is crf 23
[09:16] <smj> What happens if I use -crf 1 with the limiting options?
[09:16] <JEEB> x264 should keep it all within the maxrate/bufsize
[09:18] <JEEB> (and it will yell at you loudly if it couldn't, although that should never happen with relatively new x264 versions, as about a year+ ago an emergency mode was added for things that wouldn't compress no matter what that filters stuff to keep it within limits, so you could encode /dev/urandom and still keep VBV alright)
[09:18] <JEEB> in general I just recommend using the highest crf value that still looks good to you, so you don't overuse rate and leave room for possibly harder-to-compress pictures
[09:19] <smj> okay
[09:35] <EvilTengil> Hello everyone! I'm still looking for a way to send data (6 doubles) bundled with each frame. Im using JMPEG as a codec but I could use any container. I'm writing both the sender and receiver of the video so it doesn't have to be a proper standard way of doing it.
[11:07] <kornerr> hi
[11:23] <Astin> Hello ~~
[11:23] <Astin> Can I ask that how can I split rtmp to files ?
[11:24] <Astin> When I read the data from rtmp, ffmpeg wait till stop.
[11:25] <Astin> I just want to chop the rtmp to file .
[11:25] <Astin> Somebody help me .
[11:42] <Astin> ^^
[11:49] <kornerr> there's nobody here to help
[11:49] Action: kornerr wants help too
[11:49] <kornerr> this is a god forsaken channel
[11:51] <JEEB> (says someone who doesn't even note his problem or what he wants help with)
[11:51] <kornerr> hehe
[11:52] <kornerr> i want to stream to android like here: http://ffmpeg.org/pipermail/ffmpeg-user/2013-January/012825.html
[11:52] <JEEB> and no Astin, I have no idea how to split output between files of a certain length in ffmpeg as you highlighted me elsewhere probably trying to bring it up :P
[11:52] <kornerr> and it doesn't work
[11:52] <kornerr> either ffmpeg is developing fast, but almost none of the examples i find on the net works
[11:53] <kornerr> or my setup is different
[11:53] <JEEB> at the point that you are using ffserver I can't help you
[11:53] <JEEB> sorry
[11:53] <kornerr> yeah, ffserver
[11:53] <kornerr> curses!
[11:53] <JEEB> try VLC's rtsp encoding or something?
[11:53] <JEEB> it has command line interface as well
[11:53] <kornerr> well, actually my basic task is to display UDP on Android
[11:53] <JEEB> while the encoder settings are at times crazy, setting up just an rtsp stream with VLC was rather simple
[11:53] <kornerr> so i thought ffmpeg could convert it to something Android understands
[11:53] <JEEB> tried it locally the other day
[11:54] <kornerr> hm
[11:54] <kornerr> ok
[11:55] <JEEB> also that sample seems surprisingly sane at the mailing list, but to be honest I don't really want to go into ffserver stuff :s
[11:55] <JEEB> it seems like it's one of those Dark Tomes from the Cthulhu Mythos
[11:56] <JEEB> mostly unmaintained thing that someone made back in the days
[11:56] <JEEB> stuff that ffmpeg can do by itself is awesome tho :D
[12:04] <kornerr> :)
[12:16] <kornerr> looks like every open source project needs moar ppl
[13:15] <Astin> Thanks for answering
[13:15] <Astin> JEEB,
[13:15] <Astin> some of part, I did it
[13:15] <Astin> but
[13:16] <Astin> I wanna .. Um ..
[13:16] <Astin> Okay anyway thanks
[13:16] <Astin> I want to http to client from rtmp and ffmpeg by chopping the rtmp live protocol.
[13:17] <Astin> I have to see the source code more I think
[14:18] <abhilashtt01> Hi Guys
[14:18] <abhilashtt01> I am tring to install ffmpeg
[14:19] <abhilashtt01> getting the following error
[14:19] <abhilashtt01> /usr/bin/ld: /usr/local/lib/libvorbisenc.a(vorbisenc.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
[14:19] <abhilashtt01> /usr/local/lib/libvorbisenc.a: could not read symbols: Bad value
[14:19] <abhilashtt01> collect2: ld returned 1 exit status
[14:19] <abhilashtt01> make: *** [libavcodec/libavcodec.so.52] Error 1
[14:19] <abhilashtt01> any  ideas?
[14:20] <JEEB> abhilashtt01, static library being used to build shared? Re-compile it with PIC enabled (the dependency that is)
[14:23] <abhilashtt01> how to enable PIC
[14:23] <abhilashtt01> ?
[14:23] <JEEB> if the configuration script for that library doesn't have --enable-pic or something as an option, then you would have to add the -fPIC option to the cflags used during compilation
[14:27] <abhilashtt01> ok
[15:00] <abhilashtt01> @JEEB ,  I had recompiles with  --enable-pic   --extra-cflags=' -fPIC'
[15:00] <abhilashtt01> Still same error
[15:02] <zozo> Good day! I have many wav files with phone conversations and I want to convert all this files to mp3. But after I did it with ffmpeg or lame (tried many different parameters) I've got an mp3 with strange noise like UFO :) Does anybody know what it could be? Thanks in advance!
[15:04] <retard> zozo: what is the sampling rate and bit depth of the files you begin with?
[15:05] <zozo> You mean source wav files?
[15:05] <retard> yes
[15:05] <zozo> how can I get it?
[15:05] <retard> ffprobe should do it
[15:06] <zozo> anyway if I listening source wav files in player - no this kind on noise
[15:06] <zozo> https://gist.github.com/anonymous/bfbe2b9c61947cd60022
[15:06] <retard> yeah
[15:07] <retard> this is what i thought
[15:07] <retard> notice the 8000 hz
[15:07] <cbsrobot> zozo you are using a very old ffmpeg
[15:07] <zozo> yes - I see. What could it mean?
[15:07] <cbsrobot> and you are using the fork version
[15:08] <zozo> I use it from reps in linux mint 13 (ubuntu 12.04)
[15:08] <cbsrobot> compile ffmpeg on ubuntu yourself
[15:08] <cbsrobot> or see:
[15:09] <retard> try resampling to something higher
[15:09] <zozo> as I understand, ffmpeg now is just an alias to avconv in ubuntu?
[15:09] <zozo> how can I resample it?
[15:10] <retard> --resample in lame
[15:10] <retard> for instance
[15:11] <zozo> one second...
[15:11] <retard> not sure what the option is in ffmpeg
[15:11] <durandal_1707> zozo: ffmpeg is not alias for avconv, you are not using ffmpeg from FFmpeg but ffmpeg from Libav
[15:12] <zozo> ok, so If I install them from https://launchpad.net/~jon-severinsson/+archive/ffmpeg it should be not so old?
[15:13] <ubitux> these packages are still extremely old
[15:14] <zozo> ok, so the reason is the old version? or that I need to resample?
[15:15] <retard> strictly speaking you are in the wrong channel for the software you're using
[15:16] <durandal_1707> zozo: you can download/use static builds
[15:17] <JEEB> abhilashtt01, let me guess... you compiled ffmpeg with that instead of the actual dependency
[15:18] <zozo> I didn't compile it myself - I've just used from reps. Downloading static...
[15:18] <retard> this will most likely not do anything for the problem you're describing
[15:19] <abhilashtt01> JEEB: its fixed now. recompiled libvorbis with --enable-shared --with-pic
[15:19] <JEEB> yes, that is what I said you should do
[15:19] <abhilashtt01> Ok, ty.
[15:19] <abhilashtt01> I have a doubt about ffmpeg versions
[15:19] <abhilashtt01> FFmpeg version SVN-r26402,
[15:19] <abhilashtt01> FFmpeg version 0.6.5,
[15:19] <abhilashtt01> which one is latest?
[15:19] <JEEB> both are old as hell
[15:20] <JEEB> latest is 1.2 release-wise
[15:20] <abhilashtt01> ffmpeg version git-2013-05-03-f51aa92
[15:20] <durandal_1707> lame supports 8000 sample rate...
[15:21] <JEEB> abhilashtt01, that sounds like newer :P
[15:21] <abhilashtt01> our clients are using clipbucket and others s/w with latest ffmpeg those softwares not have compatibility issues
[15:22] <zozo> this commands fix the problem with my current (old) ffmpeg, but files size is not so small: sox test.wav -r 14400 test1.wav resample && lame test1.wav test1.mp3
[15:23] <retard> i think the problem is related to the psychoacoustics
[15:24] <retard> i would consider using a different codec altogether if possible, like say speex
[15:30] <zozo> ok, so as I see the problem is in the 8KHz. If I resample with 14400Hz and after that convert with lame - everything is ok. If I resample with 8000Hz - the same noise.
[15:31] <durandal_1707> use 44100
[15:31] <zozo> If I use '-b 32' in lame, file size is enough small and sound is enogh good
[15:32] <zozo> If I use 44100 it will increase result file size as I understand
[15:32] <retard> there's not much point in using 44100
[15:32] <zozo> I need this convertion to store many phone conversation
[15:32] <zozo> so the files size and enough quality - is two main requirements
[15:32] <retard> if the format is arbitrary, convert to speex codec
[15:33] <durandal_1707> use opus instead
[15:33] <retard> it is made for saving space and maintaining quality on human speech
[15:34] <zozo> actually, I just need format that has good compression and possible to easy play (googling about speex...)
[15:34] <durandal_1707> and lame does not suppoort 14400, but it supports (among others) 16000 and 11025
[15:34] <zozo> and one more requirements - easy integration :)
[15:35] <zozo> lame resample to 16kHz automatically
[15:35] <durandal_1707> than just zip wavs?
[15:35] <zozo> I'll try 11025 - thanks
[15:35] <durandal_1707> zozo: thing is you do upsampling twice
[15:35] <zozo> seems so
[15:35] <zozo> zip - is not good compression as I tested
[15:36] <durandal_1707> and you do not need sox to upsample, -ar 16000 should do same
[15:37] <durandal_1707> thought that old version may do it slowly...
[15:38] <zozo> seems like 11025 and 16000 gives almost the same file size at result
[15:39] <zozo> as I inderstand speex also need to be compiled manually under ubuntu?
[15:56] <hughmanwho> Hello, would anyone know why I'm getting this output when I try to stream h264 via rtsp and save the first 60 seconds as a file?   http://pastebin.com/j6N0WVX0
[16:01] <klaxa> unreliable server?
[16:03] <hughmanwho> Works fine when I use VLC player
[16:30] <hughmanwho> Is there a way to tell it to request PPS frames or something?  Just not sure why I'm getting all these error messages: http://pastebin.com/j6N0WVX0
[16:35] <JEEB> seems like you are missing packets and thus not being able to get enough of the H.264 stream to be able to start decoding it
[16:36] <JEEB> [h264 @ 00000000023cefc0] RTP: missed 158 packets
[16:50] Action: durandal_1707 swscale can't get uglier than it is
[16:51] <hughmanwho> Yeah, but it doesn't always miss packets
[16:51] <hughmanwho> And every once in say 10-20 times it'll actually work
[16:52] <hughmanwho> Also it works fine for mjpeg
[17:31] <xlinkz0> hughmanwho: try adding -rtsp_transport tcp before the input parameter
[17:32] <xlinkz0> might also run it higher verbosity
[17:32] <xlinkz0> something like -report
[17:51] <hughmanwho> Hey xlinkz0, nope still the same thing with '-rtsp_transport tcp'
[17:51] <xlinkz0> supply -report and see if you can find anything useful in the detailed output
[17:54] <hughmanwho> Here it is with -report, shows a little bit more about the SDP   http://pastebin.com/Rf7CrSTv
[18:00] <xlinkz0> hughmanwho: run again with tcp and "-c copy" to out.mp4
[18:04] <hughmanwho> Like this: C:\Tools\ffmpeg-20130428\bin>ffmpeg -report -rtsp_transport tcp -i rtsp://admin:admin@192.168.14.25/defaultPrimary?streamType=u -t 30 -analyzeduration 25000000 -c copy out.mp4
[18:06] <hughmanwho> Here's the pastebin: http://pastebin.com/Rf7CrSTv same thing basically
[18:08] <xlinkz0> so you say it works with vlc?
[18:09] <xlinkz0> did you compile ffmpeg yourself by any chance?
[18:10] <hughmanwho> It does work with vlc
[18:11] <hughmanwho> No this version if the latest version off of the zeranoe website, compiled on Apr 28th about a week ago
[18:15] <xlinkz0> idk
[18:16] <hughmanwho> Ok well thanks xlinkz0, I appreciate the suggestions!!
[18:17] <hughmanwho> Also what is DTS in regard to h264?  When I run with loglevel debug I get a whole bunch of errors along the lines of: [rtsp @ 00000000023a0420] Non-increasing DTS in stream 0: packet 2 with DTS 4294966984, packet 3 with DTS 4294966984
[18:17] <hughmanwho> [rtsp @ 00000000023a0420] Non-increasing DTS in stream 0: packet 3 with DTS 4294966984, packet 4 with DTS 4294966984
[18:17] <hughmanwho> [rtsp @ 00000000023a0420] Non-increasing DTS in stream 0: packet 4 with DTS 4294966984, packet 5 with DTS 4294966984
[19:08] <xlinkz0> DTS means decoding time-stamp
[19:08] <xlinkz0> read this if you want to learn a bit about video low level stuff : http://dranger.com/ffmpeg/ffmpeg.html
[19:09] <xlinkz0> @ hughmanwho
[19:26] <hughmanwho> Thanks again xlinkz0
[19:43] <hughmanwho> Anyone know if ffmpeg supports all h264 profiles?
[19:44] <JEEB> I'd say it supports everything you could come up with in the Real World, except MVC (the other views being encoded in a specific way from the main view, the main view being normal AVC/H.264)
[19:45] <hughmanwho> Is there a way I could determine which profile an incoming stream is?
[19:45] <JEEB> by parsing specific NAL units I would guess
[19:45] <JEEB> which would have that information
[19:46] <JEEB> also just going to note that if VLC worked with it, that uses the libavcodec library as well for decoding :P
[19:48] <hughmanwho> hmm..  so I guess I must be passing in different parameters than VLC?
[19:57] <hughmanwho> What does probesize change?  Could that be causing problems?
[19:58] <JEEB> probesize changes the amount of data libavformat reads to check what's coming in
[20:00] <hughmanwho> hmm.. ok well I'm off to a meeting.. thx I'll bbl
[20:00] <xlinkz0> hughmanwho: just a final thought, you should try sniffing the network traffic with both vlc and ffmpeg and see where they differ in the rtsp request
[20:01] <xlinkz0> the request is formatted similar to http so it's human readable
[21:02] <cbsrobot> is it known fact, that pure black won't be encoded as black in h264 ? see http://i.imgur.com/EvCnhHI.png (image with gain applied)
[21:02] <cbsrobot> ffmpeg using libx264 encoder
[21:04] <iive> cbsrobot: yes, yuv formats have dead-zones of about 10-16 values at each end
[21:05] <hughmanwho> Sounds like a good idea xlinkz0, how would I sniff the network traffic?
[21:05] <cbsrobot> because my projector setup was badly configured I spotted some artefacts in a bluray
[21:06] <xlinkz0> hughmanwho: wireshark on windows
[21:06] <cbsrobot> iive: I encode prores bure black to bluray and back to prores and I can see these artefacts on the filnal image aswell
[21:07] <cbsrobot> I'd had guessed, that pure black will remain pure black - even for a  lossy encoding like h264
[21:07] <cbsrobot> pure black in the sens of RGB 0 = YUV 16
[21:07] <iive> do you have idea what dct is used by prores?
[21:08] <cbsrobot> no - where can I find it out &. ?
[21:08] <iive> probably in the source
[21:09] <cbsrobot> could be a problem in yuv422p10 -> yuv420p .. no ?
[21:11] <iive> no idea... cutting bits is easy task, but if dither is involved then it could introduce some pattern, thanks to bad rounding.
[21:13] <iive> h264 have looseless mode, it should provide binary identical image
[21:15] <iive> afair h264 didn't had any magic rounding constants, so this is not likely to be problem.
[21:18] <cbsrobot> iive: good idea - i'll try that tomorrow
[21:19] <iive> i mean,t h264 (i)dct ...
[21:20] <cbsrobot> the values for pure black to one dot is just 1 - meaning RGB: 0 0 0 -> 0 0 1
[21:21] <iive> entirely reasonable for rounding error.
[22:31] <hughmanwho> Turns out the company that made the camera I'm trying to stream from uses UDP instead of TCP.. still hasn't fixed my problem but they sound like they will be helpful and have encountered this problem before, have gotten it to work with ffmpeg, and are willing to look at my code/give me some.. sweet!   Thanks again for the help, especially xlinkz0!
[22:33] <xlinkz0> np
[23:46] <trose> hey so I'm looking to make a video that is mostly static with only a fixed area containing animation. Is it possible to use a static image and then overlay each frame of a smaller video in a fixed location. I did some research into -vf but it appears that ffmpeg will not allow me to use an image as the primary input. Any ideas?
[23:47] <Mavrik> um, ffmpeg should allow image as primary input :)
[23:52] <trose> hmm okay
[23:52] <trose> so i already tried this..
[23:53] <trose> Mavrik: http://pastebin.com/vHrNfPDH
[23:53] <trose> i'm most likely missing something..
[23:54] <Mavrik> hmm
[23:54] <Mavrik> usually "-loop 1" is used as well
[23:54] <Mavrik> so it "loops" input
[23:56] <trose> ah...
[23:56] <trose> hmmm maybe i need to specify the length to loop
[23:58] <trose> oh snap! yeah i needed to specify a -t for my input image
[23:58] <trose> ty Mavrik :P
[00:00] --- Tue May  7 2013


More information about the Ffmpeg-devel-irc mailing list