some help for capturing live webcam video using vp8

161 views
Skip to first unread message

Joony

unread,
Apr 9, 2012, 4:48:48 AM4/9/12
to Codec Developers
Hello.

I have been working on vp8 encoding on my demo application.
previously, I wrote a code that generates test video images using QT
framework(Qimage,QPainter, QPixel etc).. I used small single memory
space(not buffering) with msleep(x) to get synchronization with actual
playing time. it was working ok. ( there is no ffmpeg or other middle
interface )

Recently, I moved on using circular buffering to take live video
capture using openCV and circular buffer using QT mutex. but the vp8
encoded frame looks awkward;some discoloration, fast playing back on
VLC player after video recording ( I found there is no I frames on
libwebm sample code(demuxer). only first one is V.I and all of them
are V.P blocks); timestamp looks monotonically increasing.

I posted this problem on application forum. No one have told me
clearly so far. .
https://groups.google.com/a/webmproject.org/group/apps-devel/browse_thread/thread/f16b858298d1e437#

I don't have much deep knowledge of video encoding,color space and
related. I confirmed the circular buffering is working fine;
otherwise it will have deadlock. The conversion RGB888 to I420 looks
fine; it may produce wrong color space and affect VP8 encoding ?

I cannot find root causes to generate missing I frame with
discoloration( more like blue color space, or missing red color
space ).

On your request, I put more detailed information or code later; I
cannot paste bunch of codes here to mess up the forum. Looking
forward to hearing some from you.

I forgot mention that I upgraded libvpx from v0.9.7-p1 to v1.0.0 too.

Thanks & regards
joon




Ronald S. Bultje

unread,
Apr 9, 2012, 3:53:54 PM4/9/12
to codec...@webmproject.org
Hi,

On Mon, Apr 9, 2012 at 1:48 AM, Joony <hi.j...@gmail.com> wrote:
> Recently, I moved on using circular buffering to take live video
> capture using openCV and circular buffer using QT mutex. but the vp8
> encoded frame looks awkward;some discoloration,  fast playing back on
> VLC player after video recording ( I found there is no I frames on
> libwebm sample code(demuxer). only first one is V.I and all of them
> are V.P blocks); timestamp looks monotonically increasing.

Can you post some screenshot of the type of artifact you think you're
having? Also, your encoding settings would be useful to know (as James
pointed out on the forum). Perhaps posting an actual sample video file
would help also.

Ronald

Joony

unread,
May 8, 2012, 1:10:46 AM5/8/12
to Codec Developers

Hello. Ronald and All

I apologize for my very belated responds. I have been busy with some
other projects. I put two video clips. Instead of using webcam
device. I just use my image generator using a circular queue using QT
mutex. VP8 take each frame converted from RGB32 to I420 and it encodes/
writes webmfile. ( I did not include vorbis audio at this moment)

Desktop screen screen capture recording, using camstudio software.
https://docs.google.com/open?id=0BwdHLqwtsfb2WmdiWUs0RG84OWs
* my application is displaying RGB using QT image and pixmap on
application windows


this link is webm file after recording using vp8 1.0.0
https://docs.google.com/open?id=0BwdHLqwtsfb2cGl3bGI5TUg4cVE

when you watch the webm file, you will all blue color changed into red
at a certain point. I still cannot figure it out in my application.

I hope that I can hear some from you.

thanks & regards
joon


On Apr 10, 3:53 am, "Ronald S. Bultje" <rsbul...@gmail.com> wrote:
> Hi,
>

Ronald S. Bultje

unread,
May 8, 2012, 2:32:34 PM5/8/12
to codec...@webmproject.org
Hi,

On Mon, May 7, 2012 at 10:10 PM, Joony <hi.j...@gmail.com> wrote:
>
> Hello. Ronald and All
>
> I apologize for my very belated  responds. I have been busy with some
> other projects.  I put two video clips. Instead of using webcam
> device. I just use my image generator using a circular queue using QT
> mutex. VP8 take each frame converted from RGB32 to I420 and it encodes/
> writes webmfile. ( I did not include vorbis audio at this moment)
>
> Desktop screen screen capture recording, using camstudio software.
> https://docs.google.com/open?id=0BwdHLqwtsfb2WmdiWUs0RG84OWs
> * my application is displaying RGB using QT image and pixmap on
> application windows
>
>
> this link is webm file after recording using vp8 1.0.0
> https://docs.google.com/open?id=0BwdHLqwtsfb2cGl3bGI5TUg4cVE
>
> when you watch the webm file, you will all blue color changed into red
> at a certain point. I still cannot figure it out in my application.
>
> I hope that I can hear some from you.

Can we see the code? In particular, the RGB to I420 conversion might be suspect.

Ronald
Reply all
Reply to author
Forward
0 new messages