[FFmpeg-user] ffmpeg with damaged dv from tape capture

Dave Rice dave at dericed.com
Sun Feb 24 14:51:29 CET 2013


On Feb 24, 2013, at 8:32 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Dave Rice <dave <at> dericed.com> writes:
> 
>>>> [1] I know dvgrab can output mov but ffmpeg does a 
>>>> better job with this task: copying dv timecode to 
>>>> mov timecode 
>>> 
>>>> and better handling of 4 channel audio in dv.
>>> 
>>> Unrelated: Could you post ffmpeg -i dv.mov console output 
>>> so I know if this is a known issue? (Or post a sample.)
>> 
>> Here is ffmpeg -i for both the sample dv and the mov output 
>> (very similar).
> 
> [...]
> 
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dv_tape_capture.mov':
>>  Metadata:
>>    major_brand     : qt  
>>    minor_version   : 512
>>    compatible_brands: qt  
>>    encoder         : Lavf54.63.100
>>  Duration: 00:00:00.33, start: 0.000000, bitrate: 28762 kb/s
>>    Stream #0:0(eng): Video: dvvideo (dvc  / 0x20637664), 
>> yuv411p, 720x480, 28771 kb/s, SAR 8:9 DAR 4:3, 29.97
>> fps, 29.97 tbr, 30k tbn, 29.97 tbc
>>    Metadata:
>>      handler_name    : DataHandler
> 
> Where is four-channel audio?
> 
> If I understood your original mail correctly, you can remux 
> the original dv stream with dvgrab but there is a problem 
> with four-channel audio.

IIRC dvgrab can be run to output mov but if the source has 4 channels in DV the mov output will only 1 mov stereo mov audio track with the first two channels. FFmpeg will map all four channels with ffmpeg -i fourchannel.dv -map 0 -c copy fourchannel.mov (which is good for me). The mov output then has 2 stereo audio tracks. If interested here is a sample four channel dv file: http://dericed.com/samples/fourchannel.dv

> Did I misunderstand?

My message here isn't about four-channel dv, I was only mentioning this as an advantage of the ffmpeg dv->mov copying process over dvgrab's native mov muxing process.

My issue here is that with dv captured from tape often the first few frames are damaged and may not contain enough information for ffmpeg to discover audio channels in the first frames; however once past the first few frames ffmpeg detects the audio such as:
[dv @ 0x7fbf69036e00] New audio stream 0:1 at pos:960000 and DTS:0s
but there doesn't seem to be a way to map such a 'new audio stream' from the input dv to output mov. I wouldn't mind probing the entire dv file for audio channels prior to mapping. Perhaps I need to do this and then split the file based on ffmpeg's new audio stream detections and then mux the parts separately.

Dave


More information about the ffmpeg-user mailing list