diff --git a/sw/in_progress/videolizer/README b/sw/in_progress/videolizer/README index 5a0a1be6bb..0161574432 100644 --- a/sw/in_progress/videolizer/README +++ b/sw/in_progress/videolizer/README @@ -19,17 +19,25 @@ with (maybe adjust the NORM) mplayer tv:// -tv driver=v4l2:width=320:height=240:norm=NTSC:input=0:device=/dev/video0:noaudio -ao noalsa -nolirc -nomouseinput -really-quiet -or build spook and use it to distribute through rtsp +or build spook and use it to distribute through rtsp, get Debian package +libxvidcore4-dev before configuring it + apt-get install libxvidcore4-dev cd spook + ./configure make -as the v4l-dvb-kernel updates some parts of the video4linux interface, just -building wis does not work. if you want to use the Plextor M402U you have to -use a patched (this is evil) Module.symvers. Either use the one provided or -copy the symbol hashes over from the *.mod.c files. generate the headers +start spook and watch video through vlc (mplayer) from it + + vlc rtsp://localhost:7070/webcam + +for the Plextor, it can NOT be used at the same time as the Pollin, +v4l changes the kernel symbols and wis can not work with that +re-install the kernel if you want to use it + +changing the kernel symvers somehow does not work cd v4l-dvb-kernel sudo make kernel-headers -then build wis-go7007 +build wis-go7007 diff --git a/sw/in_progress/videolizer/spook/encoder-mpeg4.c b/sw/in_progress/videolizer/spook/encoder-mpeg4.c index 0469b3e0b5..3bfc35e851 100644 --- a/sw/in_progress/videolizer/spook/encoder-mpeg4.c +++ b/sw/in_progress/videolizer/spook/encoder-mpeg4.c @@ -1,3 +1,4 @@ +#define SPOOK_DEINTERLACE 1 /* * Copyright (C) 2004 Nathan Lutchansky * @@ -67,7 +68,11 @@ static void mpeg4_start( struct mpeg4_encoder *en, struct frame *f ) en->reset_pending = 0; en->width = f->width; +#ifdef SPOOK_DEINTERLACE + en->height = f->height/2; +#else en->height = f->height; +#endif memset( &xvid_enc_create, 0, sizeof( xvid_enc_create ) ); xvid_enc_create.version = XVID_VERSION; @@ -128,6 +133,24 @@ static void *mpeg4_loop( void *d ) if( en->reset_pending && en->xvid_handle ) mpeg4_stop( en ); if( ! en->xvid_handle ) mpeg4_start( en, input ); +#ifdef SPOOK_DEINTERLACE + if( input->width != en->width || input->height != en->height*2 ) + { + spook_log( SL_WARN, + "mpeg4: image size changed midstream!" ); + unref_frame( input ); + continue; + } + + { + int lines; + char *YUY2 = input->d; + for (lines = 0; lines < en->height; lines++) + { + memcpy(YUY2 + (lines * en->width * 2), YUY2 + (lines * en->width * 2 * 2), en->width*2); + } + } +#else if( input->width != en->width || input->height != en->height ) { spook_log( SL_WARN, @@ -135,6 +158,7 @@ static void *mpeg4_loop( void *d ) unref_frame( input ); continue; } +#endif mpeg = new_frame();