Kino Video Editor
 
  Kino / dvgrab
Latest News
Download
Features
Requirements
Screen Shots
  Support
User Guide
HOWTOs
FAQ
Mailing Lists
Contributed Code
  Development
Project Vision
Developer Guide
Source Code
Current Developers
Report a Bug
  Community
Success Stories
Discussion
 

I have closed the forums to new postings because there was not enough discussion, I answered nearly all the questions, and I no longer work on Kino. Please use the forums provided by your Linux distribution. Meanwhile, I will leave this open in read-only mode to serve as a knowledge base.


Subject: "grab 2nd stereo track in 12bit 32kHz mode...?" Previous topic | Next topic
Printer-friendly copy
Top Linux Digital Video dvgrab Topic #1047
Show all folders | View messages in linear mode

torpSat Dec-06-08 07:40 PM
Member since Dec 06th 2008
2 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#1047, "grab 2nd stereo track in 12bit 32kHz mode...?"


          


In found this post from 2002:
http://www.kinodv.org/dcforum/dcforum?az=show_topic&forum=102&topic_id=438&mesg_id=438

I'm hoping things have improved for this issue since then...

I run dvgrab 1.8 on Debian Etch and it works very well... Thanks!

Unfortunately, I'm only able to grab the first stereo track...

I have a JVC GR-D30U camera that I can configure to do stand-alone play in "MIX" mode and the audio I hear from the camera includes a combination of the normal audio and my dubbed over commentary. My camera does not seem to mix the output over the firewire (would a different camera have that feature?).

When I use mplayer on my dvgrab output, I can only hear the first track. I do not know how to tell if the second track is being grabbed but just ignored by mplayer or maybe it's not being grabbed at all...?

My goal is to create a DVD w/ kino (awesome by the way!) that has the two stereo tracks on my DV tape overlayed into one (e.g. mixed)...

Thanks!

  

IP Printer Friendly copy | Reply | Reply with quote | Top

ddennedyMon Dec-08-08 05:55 AM
Member since Jun 26th 2006
1362 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#1048, "RE: grab 2nd stereo track in 12bit 32kHz mode...?"
In response to Reply #0


          

>
>In found this post from 2002:
> http://www.kinodv.org/dcforum/dcforum?az=show_topic&forum=102&topic_id=438&mesg_id=438
>
>I'm hoping things have improved for this issue since then...

libdv does mixing now but dvgrab does not save separate audio tracks in the AVI.

>I run dvgrab 1.8 on Debian Etch and it works very well...
>Thanks!
>
>Unfortunately, I'm only able to grab the first stereo
>track...
>
>I have a JVC GR-D30U camera that I can configure to do
>stand-alone play in "MIX" mode and the audio I hear from the
>camera includes a combination of the normal audio and my
>dubbed over commentary. My camera does not seem to mix the
>output over the firewire (would a different camera have that
>feature?).
>
>When I use mplayer on my dvgrab output, I can only hear the
>first track. I do not know how to tell if the second track is
>being grabbed but just ignored by mplayer or maybe it's not
>being grabbed at all...?

The second track is always grabbed. If you capture raw DV (recommended), then you do not need to worry about whether the AVI has separate stereo audio tracks. If dvgrab is built against libdv, then it should have the stereo tracks mixed in the single audio track of the AVI. However, I believe the default mplayer decoder is qdv.dll, and I do not know much of the details of mplayer and what may exactly be going on. I wonder if you use ffmpeg against raw DV, will you be able to access both audio tracks.

>My goal is to create a DVD w/ kino (awesome by the way!) that
>has the two stereo tracks on my DV tape overlayed into one
> e.g. mixed)...

Check dvgrab with ldd and see if it links against libdv. If so, then capturing to type 2 AVI should produce mixed audio. Let me know if dvgrab is using libdv and if does not work with type 2 AVI tested against multiple players (in particular ffplay).

+-DRD-+
Lead Kino Developer

  

IP Printer Friendly copy | Reply | Reply with quote | Top

    
torpMon Dec-15-08 01:41 AM
Member since Dec 06th 2008
2 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#1050, "RE: grab 2nd stereo track in 12bit 32kHz mode...?"
In response to Reply #1


          

Thanks for your reply!  I'm finally able to follow up...

My dvgrab is linked against libdv.so.4 and my package
management system shows these versions for some relevant
packages:

  dvgrab_1.8-4
  libdv4_1.0.0-1
  dvd+rw-tools_7.0-4
  kino_0.92-3
  ffmpeg_20070329-0.0etch1

Here's some of the results I received when using dvgrab with
the two output formats you mentioned:

  dvgrab --duration 10s --format raw raw_format-
  ffmpeg -i raw_format-001.dv 2>&1 | grep Stream

    Stream #0.0: Video: dvvideo, yuv411p, 720x480 ...
    Stream #0.1: Audio: pcm_s16le, 32000 Hz, stereo, 1024
    Stream #0.2: Audio: pcm_s16le, 32000 Hz, stereo, 1024

  dvgrab --duration 10s --format dv2 dv2_format-
  ffmpeg -i dv2_format-001.avi 2>&1 | grep Stream

    Stream #0.0: Video: dvvideo, yuv411p, 720x480 ...
    Stream #0.1: Audio: pcm_s16le, 32000 Hz, stereo, 1024

Two audio streams in the raw file (good!) and one audio
stream (as you predicted) in the dv2 file.  The question is,
for the dv2 file, are the two audio streams "mixed"
into one?

  ffplay dv2_format-001.avi

Unfortunately no...  Mplayer has the same result.  Kino's
Edit-->Play also has the same result.  I can only hear the
first stream during playback.

Happily, I discovered that I can extract the individual
streams from the raw file, like so:

  ffmpeg -i raw_format-001.dv          -an -vcodec copy -y \
    video_stream_0.avi
  ffmpeg -i raw_format-001.dv          -vn -acodec copy -y \
    audio_stream_1.wav
  ffmpeg -i raw_format-001.dv -map 0:2 -vn -acodec copy -y \
    audio_stream_2.wav

Then, I can mix the audio myself:

  soxmix audio_stream_1.wav audio_stream_2.wav \
    audio_stream_mix.wav

Then, I can recombine the mixed audio w/ the video:

  ffmpeg -i video_stream_0.avi -i audio_stream_mix.wav \
    -vcodec copy -acodec copy -y final.avi

From here I am able to make my dvd with the "mixed"
audio streams using kino on final.avi...  OR SO I THOUGHT!

Surprisingly, kino still only uses the first audio stream (in
both Edit-->Play and Export-->MPEG).  Both mplayer and
ffmplay behave differently than kino, they play the mixed
audio stream.

What this says to me is that ffmpeg's "audio no"
option (-an) does not really strip the audio out of the data,
and that kino does not honor the new stream layout (container
format) in final.avi the way mplayer and ffmplay do...

To give another example, if I use mplayer and ffmplay to play
video_stream_0.avi they both are silent (no audio, as
expected).  Kino's Edit-->Play for that file, however,
does have sound, but only that of the first audio track from
the DV data.

Since I still want to make a DVD w/ the mixed audio tracks, I
had to wander off the ranch a bit and figure out how to do it
outside of Kino.  I suspected that ffmpeg would interpret the
audio streams the same way ffmplay did and I eventually I was
able to figure this out:

  ffmpeg -i final.avi -target ntsc-dvd \
    -aspect 4:3 -sameq -y final.mpg

An additional problem I encountered was that the wav files
generated by ffmpeg had some mild audible artifacts (click
sounds) that are not heard when I play the raw dv file...  I
was able to eliminate them using this rather lossy technique:

  sox audio_stream_mix.wav -r 12000 /tmp/audio_stream_mix.wav
  sox /tmp/audio_stream_mix.wav -r 32000 audio_stream_mix.wav

Since the audio that I really care about is voice commentary
on stream 2, I am happy with this result.  But I think there
is a software glitch somewhere that is introducing those
clicks...

I also think my software is a bit old and I seem to have two
versions of (what I think) is an important library:

  ldd /usr/bin/kino | grep libavformat
    libavformat.so.0d => /usr/lib/libavformat.so.0d

  ldd /usr/bin/ffmpeg | grep libavformat
    libavformat.so.51 => /usr/lib/libavformat.so.51

So that might explain why kino and ffmplay are acting
differently...

The above library version situation is the result of running
Debian stable (etch) for kino and using the
http://debian-multimedia.org/ repository for ffmpeg...

Sorry for such a long post and thanks again for your helpful
response...

- Tor

  

IP Printer Friendly copy | Reply | Reply with quote | Top

        
ddennedyWed Dec-17-08 07:52 AM
Member since Jun 26th 2006
1362 posts
Click to send email to this author Click to send private message to this author Click to view this author's profile Click to add this author to your buddy list
#1052, "RE: grab 2nd stereo track in 12bit 32kHz mode...?"
In response to Reply #2


          

Your Kino version is extremely old. Since v1.0.0 it uses the
distinct audio track of a type 2 AVI instead of using the
audio inside the DV stream. This would have saved you a lot
of time!

+-DRD-+
Lead Kino Developer

  

IP Printer Friendly copy | Reply | Reply with quote | Top

Top Linux Digital Video dvgrab Topic #1047 Previous topic | Next topic
Powered by DCForum+ Version 1.1
Copyright 1997-2002 DCScripts.com