List Info

Thread: A/V sync issues with multiple dv1394src sources




A/V sync issues with multiple dv1394src sources
user name
2007-04-03 07:02:20
Hi there,

as part of my Boxtream project (http://corte
x.unice.fr/~jerome/boxtream/)
I've encountered an A/V sync problem which happens in some
cases only,
but is easily reproductible.

Basically I've got one dv1394src which is always active and
onto which
is plugged both the output of a scan converter and an audio
feed.
I've got another dv1394src onto which is plugged the very
same audio
feed (through an Y cable), and the output of a composite
video switcher
(through an analog-to-dv converter)

Both DV input streams are first saved into DV files
(filesink) and
at the same time split (tee) and feed into a set of
Ogg/Theora + 
Ogg/Vorbis encoders and streamers.

Whenever I use both DV inputs, and I switch from one input
to another 
one on the video switcher, a small A/V sync problem is
introduced,
which grows each time I switch to another input. This is
probably
because despite me setting the analog-to-dv converter into
always-on
mode, the video switch introduces a glitch in the stream but
only
on only one of the DV inputs, so both of them are from then
on not in sync
anymore. It is remarkable to note that both DV files on disk
are
perfectly in sync.

When I use a single dv1394src there's no problem at all,
even if I 
switch analog inputs on the switcher like I'm crazy, so
clearly
the problem seems to be in gstreamer sync handling somewhere
where several
dv1394src are used.

Alternatively, if instead of using two dv1394src I use a
single one 
and an analog frame grabber through v4l2src (even if it is
not the 
one used to capture the output of the composite video
switcher),
then there's no problem either.

Finally, if I still use the two dv1394src inputs but don't
switch
anymore on the video switcher, there's no A/V sync issue
either.

So the problem is linked to the use of two (or more?)
dv1394src.

I've noticed a big improvement on the situation when using
better
analog-to-dv converters, where the A/V sync gap is much
smaller
with more costly products, but still not perfect.

The obvious but costly solution is to genlock all sources
before 
plugging them into the composite video switcher, and in fact
it 
works perfectly fine with no A/V sync issue if I plug them
into a 
video mixer (Panasonic MX50) and use the mixer's output as
the
input to my analog-to-dv converter. So I could genlock all
inputs
or add a TBC stage and all would be fine, excepted for one
thing :
the cost. Also not all sources we want to use have genlock
input,
so the multi-input TBC might be the only hardware solution
possible,
just in front of the composite video switcher.

So my question is : I know the problem might be more an
hardware 
problem than a gstreamer-only problem, but anyway is there a

gstreamer solution for such a problem ? 

Could this be that one of the dv1394src is not temporarily
stopped
while the other receives a new input from the video switcher
(which
probably arrives sometimes during a frame because there's no
genlock) ?

Thanks in advance for any help on this issue.

Bye

Jerome Alet

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel

Re: A/V sync issues with multiple dv1394src sources
country flaguser name
Germany
2007-04-04 18:09:39
Jerome,

Jerome Alet <aletlibrelogiciel.com> (on Tue, 3 Apr 2007
14:02:20 +0200):
  > as part of my Boxtream project (http://corte
x.unice.fr/~jerome/boxtream/)
  > I've encountered an A/V sync problem which happens in
some cases only,
  > but is easily reproductible.

it's a while back that i've had a hack on dv1394src and it
changed since. one thing i remembered though was that my
pcmcia firewire card would sometimes/often produce
incomplete frames when i put my camera to play a tape
fast-forward, or pause and such, so i would drop those
frames with dv1394src.

try setting drop_incomplete=false on your dv1394src. maybe
the missing frames are the cause of your sync trouble...

-dan

-- 
http://0xDF.com/
http://iterative.org/

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel

Re: A/V sync issues with multiple dv1394src sources
user name
2007-04-05 10:22:52
Hi,

On Thu, Apr 05, 2007 at 01:09:39AM +0200, daniel fischer
wrote:
> 
> Jerome,
> 
> Jerome Alet <aletlibrelogiciel.com> (on
Tue, 3 Apr 2007 14:02:20 +0200):
>   > as part of my Boxtream project (http://corte
x.unice.fr/~jerome/boxtream/)
>   > I've encountered an A/V sync problem which
happens in some cases only,
>   > but is easily reproductible.
> 
> it's a while back that i've had a hack on dv1394src and
it changed 
> since. one thing i remembered though was that my pcmcia
firewire 
> card would sometimes/often produce incomplete frames
when i put my 
> camera to play a tape fast-forward, or pause and such,
so i would 
> drop those frames with dv1394src. 
> 
> try setting drop_incomplete=false on your dv1394src.
maybe the 
> missing frames are the cause of your sync trouble... 

Very good idea !

Unfortunately this didn't help.

I've now checked again with a different analog-to-dv
converter
placed between the switcher and the gstreamer PC, and
result
is far better : not a single A/V sync problem after having
switched hundreds of times. Of course the switch is not
smooth,
but at least there's not A/V sync issues anymore.

What is strange is that the other day I've done the very
same test 
with this equipment (Canopus ADVC700) and it was better but
not 
perfect, today it's perfect, so maybe I changed some
hardware 
settings on it... So the sync problem might have come from
the Canopus ADVC55 I used before, which probably disturbed
GStreamer when it was missing some frames.

In any case I've now ordered a multi-channel TBC to put in
from of 
the video switchers (because some of our potential sources
are 
unknown and can't be genlocked : it's mobile equipment we
plan to 
move everywhere and use whichever sources are available),
and I
think this will definitely fix the problem.

Thanks for your help.

Jerome Alet

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )