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

burek burek021 at gmail.com
Sun Jun 3 02:05:03 CEST 2012


[00:13] <burek> just one more question about h264 and v4l2 though
[00:13] <burek> I was talking with one guy from #v4l channel
[00:13] <burek> and he told me it is possible to change the encoding bitrate of the camera itself
[00:13] <burek> when using MJPG or H264
[00:14] <burek> is it possible to somehow tell ffmpeg to do the same, basically something like this: ffmpeg -f v4l2 -vcodec mjpeg -b:v 512k -i /dev/video0 ...
[00:15] <burek> meaning that we need ffmpeg to tell the wev cam to use more compression and give a lower bitrate then it usually does by default
[01:57] <michaelni> burek, currently i think our v4l* doesnt support that but it should be easy to add via private options
[01:58] <burek> michaelni, ok :) it would be really cool, since it's a new type of usb web cam and it encodes everything using it's own hardware
[01:58] <burek> so you only need linux machine to remux/stream it :)
[01:58] <burek> I got it for testing for a couple of days and I'm already thinking of buying myself one of those :)
[02:00] <michaelni> what i meant is adjusting bitrate should be easy to add to v4l2
[02:01] <michaelni> also adding another format like h264 is easy if its not funnily packed
[02:02] <iive> burek: it is board with encoder, or it captures digital signal?
[02:04] <burek> iive, it's a typical usb web cam
[02:04] <burek> logitech c920
[02:05] <burek> michaelni, if there is a need for some tests to be run, feel free to say so, while I have it here :)
[02:05] <iive> the mplayer v4l driver uses parameter "quality".
[02:06] <iive> so there is definitely standard way to change the bitrate, even if it is still vbr.
[02:07] <burek> iive, does ffmpeg support that with mjpeg cameras
[02:08] <burek> like ffmpeg -f v4l2 -vcodec mjpeg -b:v <rate> -i /dev/video0
[02:08] <iive> no idea. i should check what options does v4l2 driver expose.
[02:12] <iive> i can't see anything like that in the options. unless it uses standard lavc options, like vqscale . but this is quite unlikely
[02:14] <iive> nope.
[02:29] <michaelni> burek, also might be worth contacting luca abeni (our v4l2 maintainer) he might be able to help get the h264 variant and bitrate stuff supported
[02:31] <burek> ok, I'll do that
[02:56] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * r97c281d5b7 10ffmpeg/libavcodec/ffv1.c: 
[02:56] <CIA-119> ffmpeg: ffv1: fix crash caused by version becoming inconsistent
[02:56] <CIA-119> ffmpeg: Fixes part of Ticket1372
[02:56] <CIA-119> ffmpeg: Found-by: Piotr Bandurski <ami_stuff at o2.pl>
[02:56] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[02:57] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * r9ebe6e3910 10ffmpeg/libavcodec/ffv1.c: 
[02:57] <CIA-119> ffmpeg: ffv1: fix integer overflow in quant table initialization
[02:57] <CIA-119> ffmpeg: Fixes part of Ticket1372
[02:57] <CIA-119> ffmpeg: Found-by: Piotr Bandurski <ami_stuff at o2.pl>
[02:57] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[05:23] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * rdebbcfae60 10ffmpeg/libavcodec/bmv.c: 
[05:23] <CIA-119> ffmpeg: bmv: fix apparent sign error in the frame_off check
[05:23] <CIA-119> ffmpeg: Fixes part of Ticket1373
[05:23] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[05:23] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * r679c578cb8 10ffmpeg/libavcodec/bmv.c: 
[05:23] <CIA-119> ffmpeg: bmv: fix integer overflows in vlc decoder.
[05:23] <CIA-119> ffmpeg: Fixes part of Ticket1373
[05:23] <CIA-119> ffmpeg: Found-by: Piotr Bandurski <ami_stuff at o2.pl>
[05:23] <CIA-119> ffmpeg: Based-on-patch-by: Paul B Mahol <onemda at gmail.com>
[05:23] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[10:29] <ubitux> vf select doesn't work with a single image :(
[10:49] <ubitux> that scenedetect algorithm is not that bad with some videos
[10:49] <ubitux> http://blackhole.ubitux.fr/scenedetect.png :p
[10:52] <ubitux> (e tile filter btw)
[10:55] <ubitux> http://blackhole.ubitux.fr/scenedetect2.png
[10:55] <ubitux> ok let's try a nice algorithm now.
[11:15] <cbsrobot> ubitux: looks nice !
[12:09] <CTPAX> Hi. I have a question regarding I/O. Is there a workaround of function 'avformat_open_input'. Can I somehow send raw data instead of filepath. The problem is because I'm using Native Client port of FFMpeg and file I/O is forbidden there so I can't let FFMpeg to deal with reading input.
[12:12] <michaelni> CTPAX, yes
[12:12] <michaelni> there are several ways to do that
[12:13] <michaelni> one way is over AVIOContext the other is over URLProtocol
[12:13] <michaelni> see mplayer/libmpdemux/demux_lavf.c for an example 
[12:13] <CTPAX> ok, thank you very much!
[16:33] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * rfb4e434cfb 10ffmpeg/libavcodec/h264.c: 
[16:33] <CIA-119> ffmpeg: h264: log debug output for slightly truncated streams
[16:33] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[16:33] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * rcd0f9f00a2 10ffmpeg/libavcodec/h264.c: 
[16:33] <CIA-119> ffmpeg: h264: try to better handle h264 streams that are slightly truncated
[16:33] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[17:09] <CIA-119> ffmpeg: 03Marton Balint 07master * ra6f51de3bf 10ffmpeg/ffplay.c: 
[17:09] <CIA-119> ffmpeg: ffplay: add pause audio feature in the middle of a packet
[17:09] <CIA-119> ffmpeg: Fixes ticket 215.
[17:09] <CIA-119> ffmpeg: Signed-off-by: Marton Balint <cus at passwd.hu>
[17:09] <CIA-119> ffmpeg: 03Marton Balint 07master * rd872e11300 10ffmpeg/ffplay.c: 
[17:09] <CIA-119> ffmpeg: ffplay: remove VideoPicture duration field
[17:09] <CIA-119> ffmpeg: We are not using it.
[17:09] <CIA-119> ffmpeg: Signed-off-by: Marton Balint <cus at passwd.hu>
[17:09] <CIA-119> ffmpeg: 03Marton Balint 07master * rf1a75aa033 10ffmpeg/ffplay.c: 
[17:09] <CIA-119> ffmpeg: ffplay: remove VideoPicture pix_fmt and use frame pixel format instead
[17:09] <CIA-119> ffmpeg: VideoPicture pixel format is set at allocation time, therefore it is not
[17:09] <CIA-119> ffmpeg: reflecting the proper value.
[17:09] <CIA-119> ffmpeg: Fixes files with changing pixel format in the avfilter disabled case.
[17:09] <CIA-119> ffmpeg: Signed-off-by: Marton Balint <cus at passwd.hu>
[17:09] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * r1bf22c3a8f 10ffmpeg/: (log message trimmed)
[17:10] <CIA-119> ffmpeg:  ffplay: only request 4 or 6 channels from SDL, if SDL version is at least 1.2.8
[17:10] <CIA-119> ffmpeg:  ffplay: add pause audio feature in the middle of a packet
[17:10] <CIA-119> ffmpeg:  ffplay: remove VideoPicture duration field
[17:10] <CIA-119> ffmpeg: 03Marton Balint 07master * r15751e3fdd 10ffmpeg/ffplay.c: 
[17:10] <CIA-119> ffmpeg: ffplay: only request 4 or 6 channels from SDL, if SDL version is at least 1.2.8
[17:10] <CIA-119> ffmpeg: Signed-off-by: Marton Balint <cus at passwd.hu>
[18:43] <ubitux> do i need to call emms_c() after DSPContext.sad[1]()?
[18:44] <ubitux> afaict ATM there is only a C version (but maybe i'm wrong)
[18:44] <ubitux> also, that can not be true in the long run
[18:49] <michaelni> ubitux, yes you need to call emmc
[18:49] <michaelni> emms
[18:49] <michaelni> theres a sad*_mmx in libavcodec/x86/motion_est_mmx.c
[18:52] <ubitux> oh, ok
[18:52] <ubitux> thanks
[19:54] <ubitux> maybe i'm doing it wrong, but i'm not able to get good results from publik.tuwien.ac.at/files/pub-et_9739.pdf :/
[20:12] <burek> does ffmpeg support extracting subs as text
[20:13] <burek> i.e. if -scodec copy is used and output set to, say, out.srt
[20:13] <burek> or similar
[20:23] <ubitux> burek: depends on the sub
[20:24] <ubitux> burek: what's the input?
[20:24] <ubitux> you will likely need to "encode" it as srt
[20:25] <burek> ubitux, ffmpeg -i anything.m2ts out.srt
[20:25] <burek> should work right? :)
[20:25] <ubitux> assuming it's not bitmap sub
[20:25] <ubitux> yes
[20:26] <burek> http://pastebin.com/2vaC0A0p
[20:26] <burek> hdmv_pgs_subtitle
[20:26] <ubitux> Unknown Paste ID
[20:27] <ubitux> pgs is the blu ray subtitles
[20:27] <ubitux> it's a bitmap based sub
[20:27] <ubitux> just like the dvd (vobsub)
[20:27] <burek> http://pastebin.com/qh7QuSuA
[20:27] <burek> so no conversion possible?
[20:28] <ubitux> i'm afraid not
[20:28] <ubitux> it needs OCR tools to do so
[20:28] <ubitux> there might be a way to extract the bitmaps though
[20:29] <burek> hm, I understand
[20:29] <burek> didn't know there are bitmap subs :)
[20:29] <ubitux> that's not a good thing :(
[20:30] <burek> well, when people want to "keep their beautiful design" :) then you get all sort of problems, like this one :)
[20:30] <burek> but ok, I'll tell the guy it can't be done, so that he doesn't waste his time on it
[20:31] <ubitux> this can't be done with ffmpeg yes
[20:31] <ubitux> there are tools for this though
[20:31] <burek> hm.. could those subs then be "converted"/encoded into a video stream of some sort? :)
[20:32] <burek> if they are already a graphic thing, I mean.. can it be converted to a separate video stream, with subs only? :)
[20:33] <burek> just ignore me, I realized it's a nonsense anyway :)
[20:54] <ubitux> burning them onto the video stream should be possible (ffplay might even be able display them), but afaik it's not possible atm :p
[20:55] <burek> ok :) thanks :)
[21:07] <burek> michaelni, I've contacted luca abeni and waiting for his reply, meanwhile I've found out it is possible to control the encoding bitrate of an usb webcam (if it has an internal encoder) using v4l2, so this could be possibly added to ffmpeg one day: http://hverkuil.home.xs4all.nl/spec/media.html#mpeg-controls
[21:07] <burek> to use it like: ffmpeg -f v4l2 -vcodec <codec> -b <bitrate> -i /dev/video ...
[21:20] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * rb3675f890a 10ffmpeg/libavcodec/bink.c: 
[21:20] <CIA-119> ffmpeg: bink: fix out of reference frame read
[21:20] <CIA-119> ffmpeg: Fixes Ticket1374
[21:20] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[21:20] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * r5665674b55 10ffmpeg/libavformat/utils.c: 
[21:20] <CIA-119> ffmpeg: lavf: use input keyframe flag when muxer does not provide keyframe flags.
[21:20] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[21:20] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * r82570d2f09 10ffmpeg/libavcodec/png_parser.c: 
[21:20] <CIA-119> ffmpeg: png_parser: dont falsely mark frames as keyframes
[21:20] <CIA-119> ffmpeg: Fixes Ticket1381
[21:20] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[21:54] <ubitux> i think i'll stay with the first algorithm...
[21:55] <ubitux> http://blackhole.ubitux.fr/scenedetect-bbb.png
[21:55] <ubitux> the results looks good enough to me...
[21:55] <ubitux> but i'm still unsure about the 2 threshold requirement
[21:55] <ubitux> i can easily make 2 or 0 input
[21:55] <ubitux> but not one :(
[22:14] <Daemon404> ubitux, why not just use libxvid's
[22:14] Action: Daemon404 hasnt found a foss algo that is better than libxvid yet
[22:14] <Daemon404> but a few proprietary ones
[22:15] <ubitux> is there a description of the algorithm somewhere?
[22:15] <Daemon404> in teh source code i guess
[22:15] <Daemon404> lol
[22:16] <Daemon404> ive always just done an xvid first pass to collect scene change metrics
[22:16] <Daemon404> ive also used an app called handysaw ds t
[22:16] <Daemon404> with good success
[22:16] <ubitux> ttp://blackhole.ubitux.fr/scenedetect-gn.png
[22:16] <ubitux> http://blackhole.ubitux.fr/scenedetect-gn.png
[22:16] <ubitux> i'm really happy of these results =)
[22:16] <Daemon404> :P
[22:16] <Daemon404> btw i just remembered
[22:17] <ubitux> (sorry for the spoil :p)
[22:17] <Daemon404> there's a plugin that would be awesome for lavfi to have
[22:17] <ubitux> oh?
[22:17] <Daemon404> something like vlc's mosiac
[22:17] <ubitux> another one? :D
[22:17] <Daemon404> which is insanely hard to use
[22:17] <ubitux> like the tile filter?
[22:17] <ubitux> (the mosaic i'm printing is done with the tile filter)
[22:18] <ubitux> s/printing/showing/
[22:18] <Daemon404> ubitux, mosiac takes multiple input sources
[22:18] <Daemon404> and tiles them in an arbitrary way
[22:18] <Daemon404> for example like picture-in-picture
[22:18] <ubitux> overlay then?
[22:19] <Daemon404> taht doesnt work if you wanna stitch two things otgether
[22:19] <Daemon404> liek side-by-side
[22:19] <Daemon404> at least nto trivially
[22:19] <ubitux> you have access to various variable to do that
[22:19] <ubitux> that should be possible :p
[22:20] <Daemon404> ubitux, i think it would be a great example for the docs :)
[22:21] <ubitux> you're trying to deviate me from my original quest!
[22:21] <ubitux> that won't work!
[22:22] <Daemon404> lol
[22:22] <Daemon404> just tryign to add a todo for Later (TM)
[22:22] <Daemon404> [16:21] <@Daemon404> especially PiP would be a common use case
[22:22] <Daemon404> accidentally said that in libav and confused people
[22:22] <ubitux> :DD
[22:35] <ubitux> Daemon404: do you have an example of the output you want?
[22:35] <ubitux> just two input side by side?
[22:37] <Daemon404> http://wiki.videolan.org/Mosaic
[22:47] <ubitux> Daemon404: ./ffplay -f lavfi -i 'color=pink:900x600[x]; testsrc[a]; mptestsrc[b]; [x][a]overlay=550[o1]; [o1][b]overlay'
[22:47] <ubitux> quick & dirty
[22:48] <Daemon404> i have no idea what is going on there
[22:49] <Daemon404> ive always found lavfi 'scripts' very harde to read
[22:49] <ubitux> i'm creating a pink source video of size 900x600
[22:49] <ubitux> it outputs to "x"
[22:49] <ubitux> then two video sources are created
[22:49] <ubitux> testsrc and mptestsrc (generating each one a video of different sizes)
[22:50] <ubitux> outputing respectively to 'a' and 'b'
[22:50] <ubitux> then a first overlay takes 'x' (global pink plane) and 'a' (testsrc) and overlay them at x=550
[22:50] <ubitux> the resulting output goes to 'o1'
[22:50] <ubitux> then the last overlay takes that 'o1' and 'b' (mptestsrc)
[22:51] <Daemon404> i already see that this is in no way usable for varying widths/heights tiling
[22:51] <ubitux> and since there is no output label, it goes to the default video output
[22:51] <Daemon404> because you have to make the bg size manually
[22:51] <Daemon404> (mosiac has teh same problem)
[22:52] <ubitux> maybe overlay could be improved to enlarge the source if necessary
[22:52] <ubitux> but it would need a color parameter to fill the blanks
[22:53] <ubitux> you have access to the overlay size and input size
[22:53] <ubitux> (in the overlay context)
[22:53] <Daemon404> avs just doesnt allow blacks
[22:53] <Daemon404> blanks*
[22:53] <Daemon404> <_< bad typo
[22:53] <ubitux> :D
[22:54] <ubitux> you mean the video must have the exact same size?
[22:54] <ubitux> in that case it's also possible.
[22:54] <Daemon404> depemding on whether yo uuse stackhorizontal() or stackvertical()
[22:54] <ubitux> if they have the same size it's easy to make it flexible
[22:57] <ubitux> ./ffplay -f lavfi -i 'color=pink:1024x512[x]; testsrc=s=512x512[a]; mptestsrc[b]; [x][a]overlay=W/2[o1]; [o1][b]overlay'
[22:57] <ubitux> you need to specify the size of the global area only
[22:58] <ubitux> then it is assumed width(a) == width(b)
[23:00] <ubitux> (ou can also use 'w' instead of W/2)
[23:00] <ubitux> you*
[23:05] <Daemon404> [16:57] <@ubitux> you need to specify the size of the global area only <-- thats not very flexible still
[23:05] <Daemon404> without external scripting
[23:05] <ubitux> you can do something a bit slow then
[23:06] <ubitux> mmh let me try something.
[23:09] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * re0eaf10049 10ffmpeg/libavformat/oggdec.c: 
[23:09] <CIA-119> ffmpeg: oggdec: fix regression that caused reading the whole file during open
[23:09] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[23:09] <ubitux> Daemon404: ./ffplay -f lavfi -i 'testsrc=s=512x512[src0_nopad]; mptestsrc[src1]; [src0_nopad]pad=2*iw:ih:0:0:pink[src0]; [src0][src1]overlay=w'
[23:09] <Daemon404> whats with the 512x512
[23:10] <ubitux> just to create a 512x512 video source
[23:10] <ubitux> because mptestsrc is a 512x512 video source
[23:10] <ubitux> ./ffplay -f lavfi -i 'testsrc=s=512x512[src0_nopad]; mptestsrc[src1]; [src0_nopad]pad=2*iw:ih[src0]; [src0][src1]overlay=w'
[23:10] <ubitux> (this is a bit simpler)
[23:11] <ubitux> do you understand how it works?
[23:14] <ubitux> Daemon404: and here is the vertical version: ./ffplay -f lavfi -i 'testsrc=s=512x512[src0_nopad]; mptestsrc[src1]; [src0_nopad]pad=iw:2*ih[src0]; [src0][src1]overlay=0:h'
[23:15] <Daemon404> mostly
[23:16] <ubitux> it can be simplified but well
[23:16] <ubitux> if you have 2 videos: ./ffplay -f lavfi -i 'movie=a.avi,pad=2*iw:ih[a]; movie=b.avi[b]; [a][b]overlay'
[23:17] <ubitux> Daemon404: is that simple enough?
[23:17] <Daemon404> aye
[23:17] <ubitux> and with the filter complex option of ffmpeg you can get rid of the movie=
[23:18] <Daemon404> ubitux, itll simplify my use a lot instead of usinf cvlc, thanks
[23:18] <Daemon404> and als oavoiding teh abomination known as avxsynth
[23:19] <ubitux> great :)
[23:19] <ubitux> (oups it should be ./ffplay -f lavfi -i 'movie=a.avi,pad=2*iw:ih[a]; movie=b.avi[b]; [a][b]overlay=w')
[23:19] <Daemon404> been able to replace a lot of stuff with ffmpeg or ffprobe
[23:19] <Daemon404> still need to fallback on mediainfo for some stuff
[23:19] <ubitux> :)
[23:20] <ubitux> oh speaking of ffprobe, did you see the flat output?
[23:20] <ubitux> http://pastie.org/private/d6ybrvoynmo2f5gd9dknrw
[23:20] <Daemon404> not sure what benefits from parsing that
[23:20] <ubitux> you can eval() the output
[23:21] <ubitux> and also get a very specific value easily
[23:21] <Daemon404> ah.
[23:21] <Daemon404> i just use teh json :D
[23:21] <Daemon404> one line of code
[23:21] <ubitux> like | grep 'stream.*tags.language'
[23:21] <ubitux> anyway, the idea is not from me
[23:21] <ubitux> it comes from your best buddy
[23:21] <Daemon404> from_json(output);
[23:23] <ubitux> btw, if you get used to the filtergraph above, or are able to make something fun with lavfi, feel free to send a patch for doc/filters.texi :)
[23:23] <Daemon404> btw
[23:23] <Daemon404> eval.texi needs a name
[23:23] <Daemon404> not "Untitled Document"
[23:24] <ubitux> most of the texi needs it
[23:24] <ubitux> Daemon404: you're talking about "warning: Must specify a title with a title command or @top"?
[23:24] <ubitux> make doc/eval.html, make doc/filters.html, etc need that :p
[23:24] <Daemon404> ubitux, well i noticed it on http://ffmpeg.org/eval.html
[23:25] <ubitux> heh indeed :)
[23:25] <ubitux> Daemon404: don't miss https://ffmpeg.org/trac/ffmpeg/wiki/FancyFilteringExamples btw ;)
[23:26] <Daemon404> :P
[23:50] <CIA-119> ffmpeg: 03Michael Niedermayer 07master * re95233789c 10ffmpeg/libavcodec/mpc7.c: 
[23:50] <CIA-119> ffmpeg: mpc7: fix handling of last frame
[23:50] <CIA-119> ffmpeg: Fixes heap buffer overflow
[23:50] <CIA-119> ffmpeg: Fixes ticket1393
[23:50] <CIA-119> ffmpeg: Found-by: Piotr Bandurski <ami_stuff at o2.pl>
[23:50] <CIA-119> ffmpeg: Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
[00:00] --- Sun Jun  3 2012


More information about the Ffmpeg-devel-irc mailing list