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

burek burek021 at gmail.com
Mon Nov 21 02:05:02 CET 2011


[00:01] <Xd7mT> (8000 /( 60 * 60)) * 8 = 17,77 isnt it?
[00:02] <Mavrik> 8000kbit/s = ~1000kB/s = ~1MB/s
[00:04] <Xd7mT> yea
[00:04] <Xd7mT> inderstood
[00:07] <colemana> I record streaming video from over the air, and I need to cut it in certain places.
[00:07] <colemana> I have used the -ss to mark the beginning time.
[00:08] <colemana> But I end up with a video that has audio/video out of sync
[00:08] <colemana> http://pastebin.com/qKUeUmLn
[00:08] <colemana> I have tried it with and without the -async 1 command.
[00:08] <Mavrik> colemana, put -ss after -i
[00:09] <Mavrik> that should help
[00:09] <colemana> okay.  I'll try it.
[00:46] <FunkyELF> the ffmpeg in fedora 16 (via rpm fusion) doesn't have faac support even after I install faac.  So I need to compile ffmpeg.  Are the git repo's fairly stable or should I go with a release tarball?
[01:40] <FunkyELF> I just rebuild ffmpeg with faac and I still get Unknown encoder 'libfaac'
[01:41] <FunkyELF> when I do ffmpeg --version 2>&1 | grep libfaac .... I see it was built with --enable-libfaac
[01:55] <zzuper> hey guys,   im trying to play a stream that dies every 15 seconds
[01:55] <zzuper> you got any ideas on how to play it?
[01:55] <zzuper> http://pastebin.com/2edN6xDY
[01:56] <zzuper> so far
[01:57] <iive> i don't see ffmpeg in there. I see wget and mplayer.
[01:59] <zzuper> i know
[01:59] <zzuper> im working with ffmpeg now
[02:21] <FunkyELF> I just rebuild ffmpeg with faac and I still get Unknown encoder 'libfaac'.  --enable-libfaac shows up when I do ffmpeg --version and it shows how it was built
[02:21] <FunkyELF> any ideas?
[02:37] <iive> FunkyELF: does the output of configure list libfaac as detected?
[02:38] <iive> can you take a look of config.log and the test for libfaac in there?
[02:59] <FunkyELF> iive, sorry, was afk
[02:59] <FunkyELF> iive, I rebuilt it using some rpm stuff with rpmbuilt
[02:59] <FunkyELF> *rpmbuild
[03:03] <FunkyELF> iive, aac shows up under Enabled encoders
[03:04] <iive> FunkyELF: there is some experimental native aac encoder... so check twice.
[03:06] <FunkyELF> I'm running again and logging output
[03:11] <FunkyELF> iive, how would I specify one vs. the other?
[03:11] <iive> aac vs libfaac
[03:11] <iive> i'm off, n8 ppl.
[03:11] <iive> sorry FunkyELF , keep asking
[03:13] <FunkyELF> libfaac enabled           yes
[03:13] <FunkyELF> libaacplus enabled        no
[03:14] <FunkyELF> this might be the problem libvo-aacenc support      no
[03:14] <pasteeater> what are you trying to do?
[03:14] <FunkyELF> pasteeater, trying to get an ffmpeg with faac on Fedora 16
[03:16] <pasteeater> looks like you got it: libfaac enabled           yes
[03:17] <FunkyELF> but when I try to use it it doesn't work
[03:20] <pasteeater> i don't know your command, so i can't give you a suggestion
[03:21] <FunkyELF> pasteeater, http://fpaste.org/Iuu2/
[03:21] <FunkyELF> pasteeater, ;-)
[03:21] <pasteeater> i don't see the command in that paste
[03:21] <FunkyELF> pasteeater, sorry.....
[03:21] <FunkyELF> ffmpeg -i input.flv -acodec libfaac -ab 96k -vcodec libx264 -crf 25 -threads 0 output.mp4 > /tmp/out 2> /tmp/err
[03:22] <pasteeater> why are your ffmpeg libraries configured differently?
[03:23] <FunkyELF> pasteeater, what do you mean?
[03:23] <pasteeater> WARNING: library configuration mismatch
[03:23] <FunkyELF> pasteeater, I installed ffmpeg on Fedora using rpmbuild
[03:23] <pasteeater> i don't know what that is.
[03:23] <FunkyELF> rpmbuild --rebuild ffmpeg-0.8.5-2.fc16.src.rpm --with=faac
[03:24] <FunkyELF> pasteeater, me neither... I'm new to Fedora
[03:24] <pasteeater> but your ffmpeg libraries don't contain --enable-libfaac
[03:25] <pasteeater> can you simply ./configure and make?
[03:25] <pasteeater> and then intergrate it into packagement system with checkinstall or whatever fedora uses?
[03:25] <FunkyELF> hmmm there is another package called ffmpeg libraries?
[03:26] <FunkyELF> I will try rebuild ffmpeg libs with that same --with libfacc
[03:27] <pasteeater> you'll need --enable-nonfree for that too
[03:27] <pasteeater> then, i assume, the library mismatch message will go away.
[03:27] <shevy> hmm interesting
[03:28] <shevy> I have library mismatch messages too sometimes
[03:29] <pasteeater> Fedora too?
[03:29] <shevy> hmm no... oddly enough, I have that in a self-compiled ffmpeg :\
[03:30] <FunkyELF> pasteeater, I try to install ffmpeg-libs the same way I install ffmpeg and it says the rpm already existed
[03:30] <FunkyELF> maybe they're part of the same rpm
[03:30] <shevy> are enable-nonfree and enable-gpl compatible options?
[03:30] <shevy> or exclusive
[03:30] <pasteeater> FunkyELF: i don't know. this is more of a fedora issue than a ffmpeg issue
[03:32] <shevy> well ok... it seems that both --enable-gpl and --enable-nonfree does not make a lot of sense?
[03:32] <shevy> pasteeater if I can choose only one, what should I pick? nonfree?
[03:32] <shevy> (for my local desktop system)
[03:34] <FunkyELF> pasteeater, I just thought it weird that it built with --enable-libfaac ... yet it says unknown encoder.  but you're saying this may be due to the config mismatch?
[03:34] <pasteeater> FunkyELF: yes
[03:35] <FunkyELF> so the ffmpeg-libs and ffmepg come from the same src.rpm.  I added --with nonfree and compiled... lets see what happens
[03:37] <pasteeater> shevy: non-free means just means you can't distribute your ffmpeg. i think libfaac is the only thing that uses it, but i may be wrong.
[03:37] <FunkyELF> pasteeater, still no go.  what is avutil?
[03:38] <pasteeater> why not just get ffmpeg from ffmpeg.org, ./configure, and make isntead of fighting with rpmbuild?
[03:38] <shevy> ok pasteeater
[03:39] <FunkyELF> Pasteeater, because I'm affraid of installing something not using the package manager
[03:39] <FunkyELF> pasteeater, I like the idea of being able to uninstall it using "yum erase".
[03:40] <pasteeater> as would i, but i'm wondering if there is a more sane way of achieving that
[03:40] <pasteeater> as in something like ubuntu's checkinstall, or arch linux build scripts. as you can see i'm fedora ignorant.
[03:41] <sacarasc> I think checkinstall can make RPMs.
[03:41] <sacarasc> I know it can make .tgz for slack...
[03:42] <pasteeater> i recall a -R option or something like that.
[03:43] <zzuper> trying to play http://testmlg-f.akamaihd.net/SC2blue_MQ_2@37325
[03:43] <zzuper> cuts off at 15 seconds
[03:43] <zzuper> : S
[03:56] <FunkyELF> what is libvo?    libvo-aacenc support      no
[03:58] <pasteeater> another aac encoder
[04:47] <FunkyELF> pasteeater, I'm getting somwhere
[04:48] <zzuper> so im trying to get a stream that stops every 15sec to run smoothly..
[04:49] <FunkyELF> I took the configure line that rpmbuild used to generate the ffmpeg that didn't work with libfaac.  I removed all the options that mentioned /usr (because I'm building it as a regular user) and used it to compile the latest .tar.gz from ffmpeg's website.  after setting PATH and LD_LIBRARY_PATH I ran it and it worked.
[04:51] <pasteeater> i guess it should work then
[05:00] <FunkyELF> pasteeater, think libraries are being cached somehow?
[05:00] <FunkyELF> maybe if I log out and back in it'll work
[05:05] <LikWidChz> Hollah people!
[05:07] <LikWidChz> I have somewhat of a noob question... I installed ubuntu server and apt-get installed ffmpeg, although when I try to use libx264 to encode it says unknown encoder
[05:08] <teratorn> LikWidChz: do you have libx264 installed and is ffmpeg linked with it?
[05:08] <LikWidChz> well is the package called libx264? ubuntos nonsense wont find it... or im typing it in wrong
[05:09] <teratorn> apt-cache search libx264
[05:09] <LikWidChz> libx264-116 - x264 video coding library
[05:09] <LikWidChz> libx264-dev - development files for libx264
[05:09] <LikWidChz> guessing its the 116 right?
[05:09] <teratorn> yes
[05:10] <teratorn> apt-cache policy libx264-116
[05:10] <teratorn> ldd `which ffmpeg` | grep x264
[05:11] <teratorn> LikWidChz: the grep should print one line if it's linked in
[05:11] <LikWidChz> that ldd command dumps nothing
[05:11] <teratorn> well your ffmpeg isn't packaged with x264 support, probably due to licensing concerns
[05:11] <LikWidChz> is this the problem with pre compiled shit?
[05:11] <LikWidChz> in the back of my head I should have stuck with gentoo :)
[05:11] <LikWidChz> either or! I have the source
[05:12] <LikWidChz> ffmpeg-0.8.6.tar.bz2 
[05:12] <teratorn> they don't want to give you an ffmpeg with a more restrictive license - to me that is a service
[05:12] <teratorn> at least that is what I assume
[05:12] <LikWidChz> well I have the source unpackaged, although when I do a ./configure it gives me the middle finger
[05:12] <teratorn> yeah, so you can build it yourself without too much hassle
[05:13] <teratorn> sudo apt-get build-dep ffmpeg
[05:13] <LikWidChz> just one sec
[05:13] <teratorn> will pull in all build-time dependencies for the ffmpeg package, which should take you a long way towards building it yourself
[05:14] <LikWidChz> alright but why does it do this 
[05:14] <LikWidChz> root at Mini:/usr/src/ffmpeg-0.8.6# ./configure
[05:14] <LikWidChz> yasm not found, use --disable-yasm for a crippled build
[05:14] <LikWidChz> If you think configure made a mistake, make sure you are using the latest
[05:14] <LikWidChz> version from Git.  If the latest version fails, report the problem to the
[05:14] <LikWidChz> ffmpeg-user at ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
[05:14] <LikWidChz> Include the log file "config.log" produced by configure as this will help
[05:14] <LikWidChz> solving the problem.
[05:14] <teratorn> becase it wan'ts yasm and you don't have it
[05:14] <teratorn> *want's
[05:15] <LikWidChz> alright got yasm, did ./configure, doing a make, going to try this then Ill try your suggustion above... which im not sure what your idea does??
[05:16] <teratorn> just do the build-dep first
[05:16] <teratorn> you'll get all the features that way
[05:16] <teratorn> then do ./configure again
[05:16] <LikWidChz> ok
[05:16] <LikWidChz> that would be in the directory of the source?
[05:16] <teratorn> you may need ./configure --enable-shared --enable-gpl --enable-libx264
[05:17] <teratorn> I'm not sure it will build GPL-having libraries by default
[05:17] <teratorn> the configure, yes
[05:17] <LikWidChz> haha I love that you know more about this then I do... but back up a second
[05:17] <LikWidChz> how do I run build-dep?
[05:18] <teratorn> type the command I showed you above
[05:18] <LikWidChz> 0./configure --enable-shared --enable-gpl --enable-libx264 = build-dep?
[05:18] <teratorn> nope
[05:18] <teratorn> <teratorn> sudo apt-get build-dep ffmpeg
[05:18] <teratorn> that first
[05:18] <teratorn> ./configure --enable-shared --enable-gpl --enable-libx264
[05:18] <teratorn> that next
[05:19] <teratorn> wel
[05:19] <teratorn> sudo apt-get install libx264-dev
[05:19] <LikWidChz> alright so its downloading 121 megs worth of shit, but basicly since this is ubuntu I should stay within its source and not go external correct?
[05:19] <teratorn> do that too, after the build-dep but before the configure
[05:20] <teratorn> it's easier to work with packages than to compile stuff yourself, so yes
[05:20] <LikWidChz> thats really one of the things I have never understood about linux and its many distros
[05:22] <LikWidChz> im still not sure what build-dep command is??
[05:23] <LikWidChz> wait nevermind does that just build a package with every option?
[05:24] <LikWidChz> which path am I running this .configure command in?
[05:27] <teratorn> <teratorn> <teratorn> sudo apt-get build-dep ffmpeg
[05:28] <teratorn> it installs the things that are needed to build a package - that is all
[05:29] <LikWidChz> root at Mini:/home/share# sudo apt-get build-dep ffmpeg
[05:29] <LikWidChz> Reading package lists... Done
[05:29] <LikWidChz> Building dependency tree
[05:29] <LikWidChz> Reading state information... Done
[05:29] <LikWidChz> Picking 'libav' as source package instead of 'ffmpeg'
[05:29] <LikWidChz> 0 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
[05:29] <LikWidChz> root at Mini:/home/share#
[05:31] <teratorn> OK, so you ran it once already and now you have all the stuff
[05:31] <teratorn> and you installled libx264-dev package too?
[05:31] <teratorn> LikWidChz: 
[05:31] <LikWidChz> I'm going to take a look at the guide in the url and touch bases with you in a couple moments so I know whats happening
[05:31] <LikWidChz> yes I installed that
[05:45] <LikWidChz> looks like its almost done compiling from source, on a side note.. im very impressed by how good CBR stuff looks its crazy
[05:49] <LikWidChz> teratorn haha you almost should have just told me to rtfm on the top link ;\ funny stuff, it works
[05:49] <LikWidChz> whopping 16fps!
[07:22] <ak_mentor> guys i wanted to stream my webcam.....i installed and started ffserver... 
[07:22] <ak_mentor> this is the log
[07:22] <ak_mentor> http://pastebin.com/vdt4tkTx
[07:31] <ak_mentor> i got this when i started ffmpeg ::http://pastebin.com/xWrMjwMn
[12:52] <kkk> Hello Guys
[12:52] <kkk> I have some problems i cant solve .... 
[12:52] <kkk> [libaacplus @ 0x2d66900] libaacplus doesn't support this output format!
[12:53] <kkk> libaacplus: bad aac setting: br:64000, AACch:65536, AACsr:22050
[12:53] <kkk> ffmpeg -i file.dat -re -threads 2 -acodec libaacplus -ac 2 -ab 64k -ar 22050 -vcodec libx264 -b 600k ....
[12:53] <Mavrik> what's unclear about that
[12:53] <kkk> whats wrong abot that?
[12:53] <Mavrik> your encoder doesn't support the parameters you chose
[12:53] <Mavrik> probably sampling rate
[12:54] <Mavrik> or channels :)
[12:54] <Mavrik> try removing ac
[12:54] <kkk>  -acodec libaacplus -ac 2 -ab 64k -ar 22050 
[12:54] <kkk> ac?
[12:54] <kkk> no dont work
[12:55] <kkk> I'm using aacplus very often, first time now i got any problems
[12:55] <kkk> from mp3 to libaacplus
[12:57] <kkk> What confusing is is this: AACch:65536
[13:02] <Mavrik> good question, it seems the channel setting isn't set correctly in the encoder
[13:02] <Mavrik> which ffmpeg version are you running?
[13:02] <kkk> the newest
[13:02] <Mavrik> git or stable?
[13:02] <kkk> 0.8.6 git
[13:24] <kkk> So
[13:24] <kkk> Any Ideas ?
[13:28] <kkk> please any?
[13:30] <kkk> And the new libvo_aacenc
[13:30] <kkk> gives me following problem:
[13:30] <kkk> Press [q] to stop, [?] for help
[13:30] <kkk> ffmpeg: bitbuffer.c:269: WriteBits: Assertion `hBitBuf->cntBits <= (hBitBuf->pBi
[13:30] <kkk> tBufEnd - hBitBuf->pBitBufBase + 1) * 8' failed.
[13:30] <kkk> Aborted
[14:18] <kkk> Thanks that ffmpeg can handle m3u8 now !
[14:18] <kkk> Big thanks !
[15:35] <gst-kaps> is there a way to read a mpegts file with raw aac ?
[18:04] <tmkt> Hey hey - is there an easy answer to "incompatible pixel format 'yuv420p' for codec 'mjpeg'" ? can't seem to find a solution to this anywhere
[18:05] <tmkt> creating thumbnails from an flv
[18:06] <Mavrik> hmm... most likely ffmpeg update :)
[18:07] <tmkt> i've tried a rebuild from the most recent code without luck
[18:08] <tmkt> thought it was an problem with the flv...so i converted the flv to x264/faac, and tried..same error
[18:10] <Mavrik> tmkt, try setting -pix_fmt option to convert video to RGB
[18:10] <tmkt> ok...one sec
[18:11] <Mavrik> use -pix_fmts will output the names of pixelformats :)
[18:14] <tmkt> doesn't seem to have any effect
[18:14] <tmkt>  /usr/bin/ffmpeg -y -i /home/converter-cache/5097143.flv -ss 4 -vframes 1  /tmp/5097143_14.jpg -pixel_format rgb24
[18:14] <tmkt> tried that
[18:14] <tmkt> and  /usr/bin/ffmpeg -y -i /home/converter-cache/5097143.flv -ss 4 -vframes 1  /tmp/5097143_14.jpg -pixel_fmt rgb24
[18:14] <tmkt> and pix_fmt
[18:14] <Mavrik> tmkt, yeah, put the output file last
[18:15] <Mavrik> ffmpeg is sensitive to switch order
[18:15] <tmkt> yeah
[18:15] <tmkt> just thought of that
[18:16] <tmkt> different error..:) 
[18:16] <tmkt> Incompatible pixel format 'rgb8' for codec 'mjpeg', auto-selecting format 'yuvj420p'
[18:17] <Mavrik> O.o
[18:17] <drv> you shouldn't even need to specify a pix fmt - it will automatically convert if needed
[18:18] <Mavrik> yeah, that's wierd as well
[18:22] <tmkt> any other thoughts? anything else you'd recommend trying?
[18:25] <zzuper> trying to play this, http://testmlg-f.akamaihd.net/SC2blue_MQ_2@37325  from http://pro.majorleaguegaming.com/live/starcraft_2?slug=scRed    cuts out every 15 seconds..    any ideas on how to manually buffer it or something?
[18:29] <tmkt> ok..so just recompiled ffmpeg..and using pix_fmt..gives a new error.. Option pixel_format not found.
[18:29] <tmkt> at least something new to google
[18:29] <tmkt> never mind..that was easy..just wrong spot in the command line
[18:30] <tmkt> doesn't really even seem to error out
[18:30] <tmkt> just no output file
[18:37] <tmkt> got it
[18:38] <tmkt> it seems to be not liking the -ss
[18:38] <tmkt> i remove the -ss 2 thumbnail is created
[18:38] <Mavrik> huh
[18:39] <tmkt> even though the video is longer then 10 seconds
[18:39] <Mavrik> now that's interestring
[18:40] <tmkt> yeah...so i guess i have a fix to stop all these files from failing
[18:40] <tmkt> but ugly
[18:42] <Mavrik> tmkt, try also putting -ss before the input file, it uses a different seek mode
[18:55] <tmkt> ok
[18:56] <tmkt> no diference
[19:15] <fris> what are the major differences between compiling the tarball from the ffmpeg download page, and using git://git.videolan.org/ffmpeg.git, what would be recommneded
[19:16] <Mavrik> fris, git versions are bleeding edge, you get the latest version but they can break alot
[19:16] <Mavrik> so I suggest you grab latest stable (0.8.6)
[20:38] <pasteeater> fris: the releases are mostly for distros because they seem to be OCD with "releases". git can usually be considered stable, and if not fixes come quickly.
[20:39] <Mavrik> um, there was a problem where you couldn't set profile in x264 for about a month
[20:39] <Mavrik> so no, fixes "don't come quickly", much less is it stable
[20:40] <Mavrik> git is nowhere near stable enough to use in production
[20:51] <pasteeater> tell that to the developers
[20:51] <pasteeater> or arch linux
[20:51] <Mavrik> hmm, why?
[20:52] <Mavrik> the situation is fine as it is: git is the "unstable" development branch as it should be
[20:52] <Mavrik> stable releases are those that work
[20:52] <Mavrik> that's how it's supposed to work
[20:56] <pasteeater> then tell the devs to stop recommending git to maintainers
[20:57] <Mavrik> I did.
[20:58] <Mavrik> even in the times when I had to have SVN versions pinned so I didn't have to change half of my apps API calls every three weeks
[21:05] <foo-nix> I am trying to encode the mp4 *format* using some random codec (let's say mpeg4). I assume I first need to allocate an AVFormatContext using avformat_alloc_output_context2, thenw rite the header using avformat_write_header, and then
[21:06] <foo-nix> write the frames (AVPictures) with avformat_write_frame. Finally, I need to use avformat_write_trailer and close the file (somehow).
[21:07] <foo-nix> is this right? And how can I use avformat_write_frame to write AVPictures's/AVFrame's, as it needs AVPacket's. I assume an AVPacket is a piece of a picture of frame which is encoded using some codec, instead of only a pix_fmt.
[21:07] <Mavrik> mhm
[21:08] <Mavrik> avpacket is what you get when you read data from a demuxer, and you pass it to an encoder
[21:09] <foo-nix> Mavrik, what is the difference between a demuxer and a decoder?
[21:09] <foo-nix> i.e. several methodes match in name .*(de|en)code.*
[21:09] <foo-nix> but I never found one with demux.
[21:09] <Mavrik> demuxer splits a file into separate streams 
[21:09] <Mavrik> na muxer remuxes it into anotherone
[21:10] <foo-nix> Mavrik, i.e. audio/video (or multiple of them).
[21:10] <Mavrik> I suggest you read up on basics before going into C coding :\
[21:10] <Mavrik> yes
[21:11] <foo-nix> Mavrik, Are you suggesting me to read up onto 'howto code C' or on how ffmpeg works? because any documentational guide would be welcome :)
[21:11] <foo-nix> Mavrik, I found no up-to-date one which describes encoding.
[21:11] <Mavrik> foo-nix, video encoding basics actually :)
[21:11] <Mavrik> foo-nix, at least the formats you want to encode
[21:11] <Mavrik> difference between container and streams, different time-bases and what muxers, decoders and encoders do
[21:12] <Mavrik> otherwise you'll have some problems :)
[21:12] <Mavrik> foo-nix, what's your objective? :)
[21:12] <foo-nix> Mavrik, I have some gut intuition what those are.
[21:13] <foo-nix> Mavrik, I have decoded a .flv frame by frame into AVPicture's or AVFrames, whatever I like, and passed the data into a Mat datastructure (opencv) and back.
[21:13] <Mavrik> mhm
[21:13] <foo-nix> now I need to encode it again, to the mo4 format.
[21:13] <Mavrik> and now you want to re-encode the video back?
[21:13] <Mavrik> which codec?
[21:14] <foo-nix> exactly, but to m4 (format) and mpeg4 (codec) (or some other mp4-supported codec which is cool and widely-supported)
[21:14] <foo-nix> *mp4 format ^^
[21:15] <foo-nix> Mavrik, but I assume you are correct by saying I need to learn how to handle different streams
[21:15] <foo-nix> Mavrik, since I also need to transcode the audio, which I just neglected for the moment.
[21:15] <Mavrik> foo-nix, you probably found the api-example.c already right?
[21:16] <foo-nix> Mavrik, from nelly moser to ... :) ?
[21:16] <foo-nix> Mavrik, yes, but the thing with that tutorial/example is....
[21:16] <foo-nix> it uses very low level stuff.
[21:16] <foo-nix> one moment
[21:16] <foo-nix> I wil clarify
[21:16] <Mavrik> foo-nix, more importantly, it's not muxing the result into mp4 :)
[21:17] <foo-nix> http://ffmpeg.org/doxygen/trunk/api-example_8c-source.html     line 292
[21:17] <Mavrik> foo-nix, yeah, it doesn't use libavformat for muxing, it just dumps the stream to fil
[21:17] <Mavrik> e
[21:18] <foo-nix> which is lowlevel, and not 'muxing :)' into mp4, so probably this is some trailer needed for MPEG1_VIDEO, but not for mp4.
[21:18] <foo-nix> Mavrik, yes, I understood the difference between avformat and avcodec.
[21:18] <foo-nix> At least, I think
[21:18] <foo-nix> the format is the file format, typicallt based uppon extension
[21:19] <foo-nix> it can be mp4 or mkv
[21:19] <foo-nix> which in turn can 'wrap' the same or different codecs.
[21:19] <Mavrik> exacly
[21:19] <Mavrik> splitting/putting streams together is called (de)muxing
[21:20] <foo-nix> so there are basically 3 sets: the formats, the codecs and pixel-formats. And each one supports different subsets of a set to the right.
[21:20] <Mavrik> yeah, each are different layers of a puzzle
[21:20] <foo-nix> Mavrik, so muxing for formats basically is what encoding is for codecs.
[21:20] <Mavrik> pixel format describes how picture is represented
[21:21] <foo-nix> Mavrik, so it's basically a 'stack'
[21:21] <Mavrik> codec is how a sequence of pictures (or audio samples) are then encoded and compressed into a stream
[21:21] <Mavrik> and format then joins different streams into a single stream with sync information
[21:21] <foo-nix> Mavrik, so a format only cased about such streams, and not exacly how they work. The format only specifies a subset of supprted codecs, to make it possible for the implementer to work with them.
[21:22] <foo-nix> *cased=cares
[21:22] <Mavrik> usually the format shouldnt care with which codecs the streams are encoded
[21:22] <Mavrik> but there are some that do (like .avi)
[21:22] <foo-nix> wait, the synch information, that would be hinting and such
[21:23] <Mavrik> no, it's just timestamps on the separate stream pakets
[21:23] <Mavrik> so that the players know how to sync audio and video (and other) streams when playing
[21:23] <foo-nix> Mavrik, but is the core concept of:  write header -> while(have frames) write frame -> while(have sound) write sound -> write trailer
[21:24] <foo-nix> hmm, wait. the header probably needs to know how many streams you have, what size and codec they are.
[21:24] <foo-nix> so this can't work.
[21:24] <Mavrik> foo-nix, you write them together
[21:24] <Mavrik> in form of packets
[21:24] <Mavrik> usually it's 1 video frame per packet and 1 audio sample (but that may vary)
[21:25] <foo-nix> Mavrik, is a packet on codec of on format level?
[21:25] <Mavrik> on format level
[21:25] <foo-nix> *of-or
[21:25] <foo-nix> Mavrik, that's where I was wrong.
[21:25] <Mavrik> it takes whatever the encoder returned, timestamps it and saves it into a file
[21:26] <foo-nix> so the encoder should go from frame to packet.
[21:26] <foo-nix> or frame(s) to packet(s)
[21:26] <foo-nix> wait, let me see how that flows with the ffmpeg api.
[21:28] <foo-nix> the avcodec_encode_* go to (unsigned char) array.
[21:28] <foo-nix> which is raw data
[21:28] <Mavrik> foo-nix, the format things are the ones that start with avformat_
[21:28] <foo-nix> which I need to plug into a packet myself I assume.
[21:28] <Mavrik> basically you need to initialize a new AVFormatContext
[21:29] <foo-nix> Mavrik, I know, but befor I format, I need to encode, right?
[21:29] <Mavrik> then add a new AVStream to it
[21:29] <Mavrik> and afterwards you run a loop
[21:29] <Mavrik> where you call avcodec_encode
[21:29] <Mavrik> and for each thing you get returned you do a 
[21:29] <Mavrik> AVPacket 
[21:29] <Mavrik> and you set the data and size for that AVPacket... and then you call avformat_write_frame
[21:29] <Mavrik> or that's the idea, it's been awhile since I did that
[21:30] <Mavrik> maybe you need to make an AVFrame instead of packet, check the datatypes
[21:30] <foo-nix> Mavrik, how do I go from a buffer, avcodec_encode fills, to a AVPacket
[21:30] <foo-nix> just by setting the data field?
[21:30] <Mavrik> foo-nix, I think I just said AVPacket *packet = av_init_packet
[21:30] <Mavrik> packet->data = data
[21:30] <Mavrik> packet->size = size
[21:31] <foo-nix> Mavrik, thats feels ok.
[21:32] <foo-nix> Mavrik, I think this explains it quite well.
[21:33] <foo-nix> Thank you so extremely very much
[21:33] <Mavrik> foo-nix, http://pastebin.com/74z7Xvu0
[21:33] <Mavrik> here's an example
[21:34] <Mavrik> it's much too large for what you need, but check the part where it stores data from encode_video to a packet
[21:34] <Mavrik> foo-nix, you don't need most of those things since yo're not doing audio and sync
[21:36] <stryker> hi all, I'm trying to install zoneminder on ubuntu 11.04 64bit using the wiki instructions. it gets to a certain point and drops an error saying that libfaac cannot be found. I have the log on hand
[21:36] <stryker> (error is dropped during ffmpeg portion of the install)
[21:37] <foo-nix> Mavrik, but it's a nice start off :)
[21:38] <foo-nix> Mavrik, is the code using the newest standards of ffmpeg (8.6) ? Or something quite recent, not deprecated?
[21:38] <Mavrik> foo-nix, I think it's obsolete as hell :P
[21:38] <bunkka_> I have a question regarding ffmpeg and encode-handheld-5.6.pl
[21:38] <Mavrik> foo-nix, but most calls should still be there just with numbers at the end
[21:39] <foo-nix> Mavrik, ack, I think I can manage a bit of api-tetris :)
[21:39] <foo-nix> thanx :)
[21:40] <pasteeater> bunkka_: just ask and if someone knows they will probably try to help
[21:41] <foo-nix> Mavrik, Wait, of course, I need to call thw write_header right after adding all the streams :)
[21:41] <Mavrik> yes, if the format uses a global header :)
[21:41] <Mavrik> (which mp4 does iirc)
[21:41] <foo-nix> Mavrik, meaning the header is not all of the place :) ?
[21:42] <Mavrik> er?
[21:42] <stryker> my config.log paste is here: http://pastebin.com/ujjLQ4FB
[21:42] <Mavrik> foo-nix, not all output formats have a header at start :)
[21:42] <foo-nix> Mavrik, the header is actually not just at the start, it's all over the file
[21:42] <Mavrik> stryker, apt-get install libfaac-dev
[21:43] <bunkka_> In terminal: encode-handheld-5.6.pl -t appletv -pbIM -f /Users/My/Desktop/road.mkv , however all I get is command not found.
[21:43] <Mavrik> foo-nix, some formats have a "global" header, meaning they have a header describing which streams (audio and video) are inside and how long it is only at start of file
[21:44] <Mavrik> foo-nix, others (like MPEG2-TS) don't have such header, put mix that data every now and then so you can stream it
[21:44] <foo-nix> Mavrik, how will write_header know the length of the streams, If I didn't write them yet? It only takes a AVCoded, not a AVCodecContext, so it knows very little about the stream.
[21:44] <Mavrik> foo-nix, from codec context
[21:44] <Mavrik> foo-nix, sorry, format context
[21:45] <Mavrik> meaning you have to set it manually or it won't be set :)
[21:45] <foo-nix> Mavrik, format context does not store the width and height, as multiple streams may have different resolutions I guess.
[21:45] <Mavrik> foo-nix, yeah, and audio streams don't even have that concept :)
[21:45] <pasteeater> bunkka_: we don't support third-party apps here, but do you know what command is not found? ffmpeg?
[21:46] <Mavrik> foo-nix, width and height is something a stream has, so it's part of a codec context, format context describes other things
[21:46] <foo-nix> Mavrik, I know, but: avformat_new_stream(format_context, codec);    takes a codec, and not a codec context.
[21:47] <bunkka_> ah okay! i believe it just doesn't recognize encode-handheld-5.6.pl . I don't know how to have it properly execute. but if third party apps aren't supported, thats completely understandable. thanks
[21:47] <foo-nix> So in this case the format context does not get enough information about the stream, or does it?
[21:47] <Mavrik> foo-nix, format context doesn't care about resolutions
[21:47] <Mavrik> it only cares about which streams it has and what their IDs are
[21:49] <foo-nix> Mavrik, of course, I specify the codec context when calling encode_video. Still, doesn't the format context want to know how long the stream will be (in bytes) ?
[21:50] <Mavrik> foo-nix, depends on format.
[21:50] <Mavrik> and no, usually not
[21:50] <Mavrik> size information is only required for seeking and nothing else
[21:50] <foo-nix> Mavrik, ok, let me just assume everything works like magic. Although I would think the format will have a nice time allocating the streams, when it doesn't know the size.
[21:51] <foo-nix> but I will just 'take that for granted' :)
[21:51] <Mavrik> foo-nix, think more like "internets" not like "static files"
[21:51] <Mavrik> foo-nix, format just takes in frame data and audio samples and stores them into packets into file one after another
[21:51] <Mavrik> the player then just reads them in that order and shows them on screen
[21:52] <Mavrik> nowhere in that process anyone is really required to know how long the file is... when data runs out that's it
[21:53] <Mavrik> foo-nix, and for seeking you really care about duration of the video, not filesize, which is written in AVFormatContext->duration field
[22:04] <LikWidChz> anyone got a way of batch encoding some files? perhaps in windows
[22:09] <foo-nix> Mavrik, so do I need to specify stuff like duration by hand?
[22:10] <Mavrik> if you want seeking
[22:10] <Mavrik> but it'll work without 
[22:13] <foo-nix> Mavrik, In the end, I also want streaming
[22:41] <pasteeater> LikWidChz: WinFF might allow you to do that
[23:02] <foo-nix> Mavrik, if av_interleaved_write_frame(format_context, &packet); signals a SIGFPE, what could be wrong? A lot of values in te format_context are set to 0.
[23:03] <foo-nix> Unfortunatly, my debugger won;t point me to where the signal originates in the ffmpeg library.
[23:06] <LikWidChz> it seems like linux is the best solution for really batch encoding
[23:08] <foo-nix> LikWidChz, linux is the best solution for lot's of automizing quirks :)
[23:08] <LikWidChz> yeah I figured, however the nas I just built with a budget cpu gets crap fps.... I mean what do you expect for a $29 cpu
[23:10] <LikWidChz> Infact the only other solution I think that would be good would be to just build a ubuntu virtual pc... I have an e8500 and it gets about 31fps using this " -s 720x400 -vcodec libx264 -b 1700k -acodec libmp3lame -ab 128k "
[23:11] <LikWidChz> its too bad ffmpeg can be threaded onto multiple pcs
[23:11] <LikWidChz> someone should make that happen :P
[23:16] <DrSlony> Hey, ffmpeg spits out "File for preset 'veryslow' not found", have presents been changed?
[23:17] <DrSlony> 0.7.7
[23:19] <foo-nix> LikWidChz, your nas is streaming video?
[23:19] <LikWidChz> no I just have a bunch of mp4/wmv content I would like to batch convert using the above syntax
[23:20] <sacarasc> DrSlony: -preset veryslow
[23:20] <sacarasc> They're built in to ffmpeg now, not external files.
[23:21] <DrSlony> sacarasc oh, nice, thanks!
[23:21] <DrSlony> does ffmpeg support any video antishaking/stabilization filters?
[23:23] <pasteeater> yes. it's called deshake.
[23:24] <pasteeater> see 
[23:24] <pasteeater> ffmpeg -filters
[23:27] <DrSlony> awesome!
[23:33] <LikWidChz> how shakey is the video? id be curious to see the before and after just to humor myself
[23:34] <pasteeater> DrSlony: i doubt 0.7.7 contains deshake (also i've never tried this filter myself).
[23:59] <teratorn> does ffmpeg contain any code for image rotation?
[00:00] --- Mon Nov 21 2011


More information about the Ffmpeg-devel-irc mailing list