[FFmpeg-user] Remove audio from DV file not working

Moritz Barsnick barsnick at gmx.net
Tue Dec 27 17:49:55 EET 2016


On Mon, Dec 26, 2016 at 16:28:11 -0800, Tim Hiles wrote:
> > On Mon, Dec 26, 2016 at 14:47:11 -0800, Tim Hiles wrote:
> > > Output #0, dv, to 'noaudio.dv':
> > >   Metadata:
> > >     timecode        : 00:33:32;19
> > >     encoder         : Lavf57.61.100
> > >     Stream #0:0: Video: dvvideo, yuv411p, 720x480 [SAR 8:9 DAR 4:3],
> > q=2-31, 25000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
> > > Stream mapping:
> > >   Stream #0:0 -> #0:0 (copy)
> > [...]
> > > I still have audio in the video file. Any thoughts?
> >
> > I can hardly believe that. Are you sure you checked noaudio.dv? ffmpeg
> > isn't reporting putting any audio tracks into that output.

> ffmpeg -i "noaudio.dv"
[...]
> Input #0, dv, from 'noaudio.dv':
>   Metadata:
>     timecode        : 00:33:32;19
>   Duration: 00:00:30.96, start: 0.000000, bitrate: 28771 kb/s
>     Stream #0:0: Video: dvvideo, yuv411p, 720x480 [SAR 8:9 DAR 4:3], 25000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
>     Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
>     Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s

Indeed. Apparently, ffmpeg does some nasty magic of creating a valid DV
file, without telling us about this.

I grabbed some other DV video sample from the internet
(https://cinelerra-cv.org/footage/coals.mov), and tried to convert it
to DV container first, and ffmpeg gave me this interesting error
message:

[dv @ 0xbb77d40] Can't initialize DV format!
Make sure that you supply exactly two streams:
     video: 25fps or 29.97fps, audio: 2ch/48|44|32kHz/PCM
     (50Mbps allows an optional second audio stream)
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted

[I believe I got this error because the input audio was BE, which
ffmpeg expects LE for DV.)

But ffmpeg's muxer isn't written to complain about zero audio streams.
You created that file successfully via a detour, so it should be made
to work directly as well.

Why ffmpeg introduces a stream which it doesn't report is a riddle to
me. (It should just as well error out with the same error as I got.)
That has happened before with data streams (it was impossible to drop
them), but I believe that was changed.

My assumption is that the DV (codec) packets always contain video and
audio, and when copying with "-c copy", all its contents are passed on
to the muxer, and that's how your audio slips through.

Moritz


More information about the ffmpeg-user mailing list