[Ffmpeg-devel] dv video format with 32 kHz audio?

Mikko Rapeli mikko.rapeli
Fri Apr 21 01:09:27 CEST 2006


(originally sent to ffmpeg-user, but perhaps -devel is more suitable)

Hello,

I'm using kino to edit videos from a bunch of sources, so I need to
convert all files to dv format. Unfortunately my Sony DV camera uses 32
kHz sampling rate for audio and ffmpeg 48 kHz sample rate with dv
format, and kino does not handle different sampling rates at all.

Since most of my source videos are in 32 kHz format I'd like to use 
ffmpeg to produce dv format video with 32 kHz audio sample rate from the
other sources, but I don't know how. Any ideas?

I've even tried patching ffmpeg to allow -ar 32000 with dv format, but
I'm failing that too as this doesn't quite cut it:

--- ffmpeg-0.cvs20050918/libavformat/dv.c       2005-09-1320:32:05.000000000 +0300
+++ ffmpeg-0.cvs20050918-mcf0/libavformat/dv.c  2006-01-2500:58:18.000000000 +0200

@@ -699,9 +699,10 @@
     /* Some checks -- DV format is very picky about its incoming
 * streams */
     if (!vst || vst->codec->codec_id != CODEC_ID_DVVIDEO)
         goto bail_out;
-    if (ast  && (ast->codec->codec_id != CODEC_ID_PCM_S16LE ||
-                ast->codec->sample_rate != 48000 ||
-                ast->codec->channels != 2))
+    if (ast  && ((ast->codec->codec_id != CODEC_ID_PCM_S16LE) ||
+                ((ast->codec->sample_rate != 48000) &&
+                (ast->codec->sample_rate != 32000)) ||
+                (ast->codec->channels != 2)))
        goto bail_out;
     c->sys = dv_codec_profile(vst->codec);
     if (!c->sys)

Any ideas?

-Mikko





More information about the ffmpeg-devel mailing list