Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Out of synch when deinterleaving DV tapes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sun Oct 27, 2013 4:11 pm    Post subject: Out of synch when deinterleaving DV tapes Reply with quote

Hi.

I've been recording a bunch of DV tapes in order to convert them to a more useable format. I'm using dvgrab to save the contents of the tapes to a RAW file format (it's an exact copy of the tape, not an avi). This works fine and when I play the file (mplayer) it's all nice and smooth.

However, when i try using ffmpeg to encode the file into any other codec or container the audio and video go out of synch. This is caused by the extraction of streams - even if I extract the streams without encoding it's still out of sync.

Also using dvgrab in any other mode than RAW makes it out of sync.

I've tried millions of combinations and I'm out of ideas. Please help.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Mon Oct 28, 2013 3:25 pm    Post subject: Reply with quote

Can you supply a small example of the file (or make a new one)
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Mon Oct 28, 2013 3:58 pm    Post subject: Reply with quote

does the same happen when you use kino?
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Wed Nov 13, 2013 11:39 pm    Post subject: Reply with quote

I cannot give you a sample, because it's a family video of a friend of mine.

Kino works... kinda... It can only export to dv type 2 files (deinterleaved), but the sync is correct. After starting a conversion there's a phase called "Locking audio" on the status bar. I think this is the key, but I was unable to reproduce this effect with ffmpeg.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Thu Nov 14, 2013 3:43 am    Post subject: Reply with quote

ffmpeg has various a/v sync options (like -async 1024 but the syntax changed at least twice in the last few versions), not sure if they would actually help in this case....
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Thu Nov 14, 2013 10:53 am    Post subject: Reply with quote

Gabriel_Blake wrote:
I cannot give you a sample, because it's a family video of a friend of mine.

Kino works... kinda... It can only export to dv type 2 files (deinterleaved), but the sync is correct. After starting a conversion there's a phase called "Locking audio" on the status bar. I think this is the key, but I was unable to reproduce this effect with ffmpeg.


No parts where just the floor is filmed or something? Or a possibility to make new footage of something.
Otherwise it's just guessing with all the options, delays and whatnot media files can have.

Luckily DV is interleaved so every audiopart should align with a videopart and desynchronisation is due to wrong encoding or capturing from tape.
Some DV camera's also have a "long play" function in which the tape just turns slower and records audio at 32khz instead of 48khz.

You could try to remux/interleave the file in a new container without transcoding :
ffmpeg -i INFILE -c:v copy -c:a copy OUTFILE

It would also help if you could post Mediainfo output on the file. It's just too much guessing. Yes I know DV is standard, tell that to the manufacturers
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Thu Nov 21, 2013 9:42 pm    Post subject: Reply with quote

frostschutz wrote:
ffmpeg has various a/v sync options like -async 1024 b

I've tried it previously... a million times... doesn't work at all.

Maitreya wrote:
Luckily DV is interleaved so every audiopart should align with a videopart and desynchronisation is due to wrong encoding or capturing from tape.
Some DV camera's also have a "long play" function in which the tape just turns slower and records audio at 32khz instead of 48khz.

You could try to remux/interleave the file in a new container without transcoding :
ffmpeg -i INFILE -c:v copy -c:a copy OUTFILE


This it exactly the point. The original DV is fine. The moment you deinterleave it (pull out separate audio and video streams) it goes out of sync. Kino seems to do it properly, but not dvgrab nor ffmpeg.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 441

PostPosted: Sun Nov 24, 2013 10:39 am    Post subject: Reply with quote

Gabriel_Blake wrote:
frostschutz wrote:
ffmpeg has various a/v sync options like -async 1024 b

I've tried it previously... a million times... doesn't work at all.

Maitreya wrote:
Luckily DV is interleaved so every audiopart should align with a videopart and desynchronisation is due to wrong encoding or capturing from tape.
Some DV camera's also have a "long play" function in which the tape just turns slower and records audio at 32khz instead of 48khz.

You could try to remux/interleave the file in a new container without transcoding :
ffmpeg -i INFILE -c:v copy -c:a copy OUTFILE


This it exactly the point. The original DV is fine. The moment you deinterleave it (pull out separate audio and video streams) it goes out of sync. Kino seems to do it properly, but not dvgrab nor ffmpeg.


Well with no demo example or mediainfo we can only guess.
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1972

PostPosted: Mon Nov 25, 2013 9:11 am    Post subject: Reply with quote

I don't understand the details of DV, so this might be miles off, but would Project X be useful?
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum