Hi Joakim,
Joakim Tysseng wrote:
> Hi everyone, and pardon me for mass-mailing my problems...
>
> I have some problems using ARToolKit with a PAL firewire/DV camcorder.
>
right before dv_init you should add the following lines:
if(vid->mode == VIDEO_MODE_PAL)
{
vid->dv_decoder->height = 576;
vid->dv_decoder->arg_video_system=2;
}
and donīt forget to add -mode=PAL to your ARToolKit options
in simpleTest.c this would be:
char *vconf = "-mode=PAL"
Uwe
This is how my video.c looks like:
if (raw1394_set_port(vid->handle, 0) < 0) {
free( vid );
perror("raw1394 - couldn't set port");
return NULL;
}
if( (vid->dv_decoder = dv_decoder_new(0,0,0)) == 0 ) {
return NULL;
}
vid->dv_decoder->quality = 5;
if(vid->mode == VIDEO_MODE_PAL)
{
vid->dv_decoder->height = 576;
vid->dv_decoder->arg_video_system=2;
}
dv_init(0,0);
> When running the simpleTest (or any other example), ART detects the input
> video as NTSC instead of the correct, PAL. The result of this is that the
> image gets garbled, i can still recognise what's on screen but its very
> distorted. Also, it appears that some of the lines/blocks of the image
> are shown twice (screenshot at
> http://www.stud.ntnu.no/~tysseng/snapshot2.png).
>
> I have tried setting the default video in config.h to PAL, the result
> being that ART complains about wrong video format.
>
> When running "kino", a linux DV editing package, the video input works
> fine and is autodetected as PAL.
>
> I am using version 2.61 of ART on a RedHat 7.3 (tried on 8.0 as well)
> installation, using
> libDV v0.98 (libdv-0.98-1.i586.rpm & libdv-devel-0.98-1.i586.rpm)
> libraw1394 v0.9.0 (libraw1394-0.9.0.i386.rpm &
libraw1394-devel-0.9.0-1.i386.rpm).
> libdc1394 v0.8.1
>
> The camera used is a Sony DCR-TRV900E PAL camera, I have however tried
> another camera with the same result.
>
> To make ART work at all with the mentioned version of libDV i had to do
> some slight modifications to lib/SRC/VideoLinuxDV/video.c
>
> in ar2VideoOpen, line 171 was changed from
>
> if( (vid->dv_decoder = dv_decoder_new()) == null ) {
>
> to
>
> if( (vid->dv_decoder = dv_decoder_new( 1, 1, 1 )) == null ) {
>
> Similarly, line 175 was changed from
>
> dv_init();
>
> to
>
> dv_init( 1, 1 );
>
>
> Any help or ideas will be greatly appreciated. I wish to use ART in a
> master thesis at the Norwegian University of Science and Technology but
> time is running short, making me more and more desperate :-))
> --
> sincerely,
> Joakim Tysseng
--
\\\|/// *Rechenzentrum Universitaet Stuttgart*
_I_ ( o o ) *Visualisierung* _I_
(_@_)----oo0O--(_)--O0oo----------------------------------------(_@_)
| | Uwe Woessner woessner@r ................... | |
| | .ooo0 http://www.hlrs.de/people/woessner/ | |
|_| ( ) Oooo. Phone: +49-711-685-5790 |_|
(_@_)---------\ (---( )---------------------------------------(_@_)
I \_) ) / I
(_/
|