[FFmpeg-user] need help on DV video decoding

Dave Rice dave at avpreserve.com
Thu Mar 11 05:18:20 CET 2010


On Mar 9, 2010, at 9:28 AM, pcuser p wrote:

> If i get a dv file(DIF sequences) wrapped in a avi/quicktime/mxf container.
> can ffmpeg demuxer or any other commercial/opensource demuxer produce
> orginal DIF sequence without any modification to the original DIF
> sequence.

When I tested this before running
ffmpeg -i file.mov -vcodec copy file.dv
the resulting dv file did not have the VAUX data as the dv stream embedded in the source quicktime file (thus dv's closed captioning, recording date and time, and embedded camera settings were lost). Perhaps I'm not using the right ffmpeg command.
On as-is bit for bit dv stream extraction, I've found that salvagedv at http://www.kinodv.org/article/view/182/1/11/ produces good results.
Dave

> My requirement is to develop DV decoder for IEC 61834 & SMPTE 341M
> conformant bitstreams.
> But mostly, I will be getting DIF sequences(dv file) from avi/mxf file
> after demuxing.
> so the question is, does both mxf and avi container produce same DIF
> sequences after demuxing (or) DIF sequences depends on demuxer?
> 
> My question may be out of scope of DV decoder,but I need to define the
> capability of my decoder.
> 
> any help in this would be greatly appreciated!
> 
> 
> 
> 
> 
>> On 3/9/10, Dave Rice <dave at avpreserve.com> wrote:
>>> In DV (speaking particularly of the .dv file) each DIF sequence has its
>>> own
>>> header and there is no file specific file header. If you split a .dv file
>>> every 120000 or 144000 bytes (NTSC or PAL), you'd have a bunch of valid
>>> little dv streams one per frame.
>>> For closer inspection of the DV frame I usually run
>>> xxd -ps -c 80 file.dv
>>> in order to generate an output that aligns with the DIF block structure
>>> that
>>> aligns with SMPTE 314m.
>>> If it helps, I wrote some articles on DV at
>>> http://www.avpreserve.com/dvanalyzer/ along with an analysis tool for DV
>>> media.
>>> Dave
>>> 
>>> On Mar 9, 2010, at 2:19 AM, pcuser p wrote:
>>> 
>>>> Dave,
>>>> Thanks for reply.I've gone through dv video standards (SMPTE-314 and IEC
>>>> 61834).
>>>> Both of the documents explain about how video data compression is done
>>>> (DCT,VLC,etc.,)
>>>> but none defines about file format of dv video file.
>>>> 
>>>> For example if i have a file with .dv extension,there must be some
>>>> header which identifies that it's a dv file and also info about where
>>>> AAUX,VAUX, & DIFdata in the dv file.
>>>> This info is not provided in the standard doc.
>>>> 
>>>> PS:
>>>> I've read through  IEC 61834-2 and SMPTE 314M document.
>>>> Is this info is available in IEC 61834-4 document?
>>>> 
>>>> expecting some help & suggestions..
>>>> 
>>>> On 3/9/10, pcuser p <pcuser.mails at gmail.com> wrote:
>>>>> Dave,
>>>>> Thanks for reply.I've gone through dv video standards (SMPTE-314 and
>>>>> IEC
>>>>> 61834).
>>>>> Both of the documents explain about how video data compression is done
>>>>> (DCT,VLC,etc.,)
>>>>> but none defines about file format of dv video file.
>>>>> 
>>>>> For example if i have a file with .dv extension,there must be some
>>>>> header which identifies that it's a dv file and also info about where
>>>>> AAUX,VAUX, & DIFdata in the dv file.
>>>>> This info is not provided in the standard doc.
>>>>> 
>>>>> PS:
>>>>> I've read through  IEC 61834-2 and SMPTE 314M document.
>>>>> Is this info is available in IEC 61834-4 document?
>>>>> 
>>>>> expecting some help & suggestions..
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 3/5/10, Dave Rice <dave at avpreserve.com> wrote:
>>>>>> On Mar 5, 2010, at 10:42 AM, Walter Werner wrote:
>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> Am 05.03.2010 09:54, schrieb pcuser p:
>>>>>>>> I am trying to write a wrapper for dv dec(dv,dvcpro25/50) by reading
>>>>>>>> input from a dv encoded video file.I have some progressive encoded
>>>>>>>> dv
>>>>>>>> video files in my pc.
>>>>>>>> 
>>>>>>>> But I don't know how to interpret the (.dv) file,I dont have the
>>>>>>>> file
>>>>>>>> format spec for dv.
>>>>>>>> can somebody provide me insight on dv file format, or atleast
>>>>>>>> provide
>>>>>>>> me the link for the file format spec of dv.
>>>>>>>> 
>>>>>>>> I have seen that ffmpeg can decode all types of dv files.
>>>>>>>> "on what file format ffmpeg dv decoder is implemented?how it
>>>>>>>> interprets dv files and extract header and metadata?"
>>>>>>>> 
>>>>>>>> If dv is wrapped in avi container,will there be any change in dv
>>>>>>>> headers and meta data.
>>>>>>>> can we extract .dv file from avi container without any change to
>>>>>>>> header and metadata of .dv files
>>>>>>>> 
>>>>>>>> PS:I have looked into SMPTE314M standard,it has info about data
>>>>>>>> compression but not on dv file format
>>>>>>>> 
>>>>>>>> I really got struck at the dv decoder wrapper for sometime without
>>>>>>>> have dv file format specification...
>>>>>>>> Any help would be greatly appreciated!
>>>>>>>> 
>>>>>>>> Regards,
>>>>>>>> RJ
>>>>>>>> 
>>>>>>> Why don't you use ffmpeg to convert to raw video and use the output
>>>>>>> (eventuelly through a pipe) in your program?
>>>>>>> There is some information on dv structure (also within avi) in
>>>>>>> wikipedia,
>>>>>>> with links to the details
>>>>>>> Walter.
>>>>>> 
>>>>>> I don't think this would work. When I use ffmpeg to convert a
>>>>>> Quicktime
>>>>>> wrapped file to a dv stream using -vcodec copy, the resulting dv does
>>>>>> not
>>>>>> contain the VAUX and AAUX metadata of the stream wrapped in the
>>>>>> original
>>>>>> file.
>>>>>> For instance with
>>>>>> ffmpeg -i test.mov -vcodec copy test.dv
>>>>>> the resulting dv stream does not have the embedded recording
>>>>>> timestamps,
>>>>>> recording start and stop flags, or closed captioning text of the
>>>>>> original.
>>>>>> ffmpeg output below,
>>>>>> 
>>>>>> David Rice
>>>>>> AudioVisual Preservation Solutions
>>>>>> 350 7th Avenue, Room 1603
>>>>>> New York, NY 10001
>>>>>> 
>>>>>> office: 212-564-2140
>>>>>> cell: 347-213-3517
>>>>>> dave at avpreserve.com
>>>>>> www.avpreserve.com
>>>>>> 
>>>>>> 
>>>>>> u815:A7600 daverice$ ffmpeg -i test.mov -vcodec copy test.dv
>>>>>> FFmpeg version FFmbc-0.3, Copyright (c) 2000-2009 Fabrice Bellard, et
>>>>>> al.
>>>>>> built on Feb 15 2010 16:01:14 with gcc 4.2.1 (Apple Inc. build 5646)
>>>>>> (dot
>>>>>> 1)
>>>>>> configuration: --enable-libopenjpeg
>>>>>> libavutil     50. 4. 0 / 50. 4. 0
>>>>>> libavcodec    52.41. 0 / 52.41. 0
>>>>>> libavformat   52.39. 2 / 52.39. 2
>>>>>> libavdevice   52. 2. 0 / 52. 2. 0
>>>>>> libswscale     0. 7. 1 /  0. 7. 1
>>>>>> [dvvideo @ 0x101014600]AC EOB marker is absent pos=66
>>>>>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
>>>>>> Metadata:
>>>>>>   major_brand: qt
>>>>>>   minor_version: 537199360
>>>>>>   compatible_brands: qt
>>>>>>   year(eng): Thursday, May 25, 2017 10:26:25 PM
>>>>>> Duration: 00:00:30.76, start: 0.000000, bitrate: 30308 kb/s
>>>>>>   Stream #0.0(eng): Video: dvvideo, yuv411p, 720x480, tbc 1001/30000,
>>>>>> 28771 kb/s, PAR 10:11 DAR 15:11, fps 29.970, tbf 1/2997
>>>>>>   Stream #0.1(eng): Data: tmcd / 0x64636D74, 0 kb/s
>>>>>>   Stream #0.2(eng): Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536
>>>>>> kb/s
>>>>>> Output #0, dv, to 'test.dv':
>>>>>>   Stream #0.0(eng): Video: dvvideo, yuv411p, 720x480 [PAR 10:11 DAR
>>>>>> 15:11], tbc 1001/30000, q=2-31, 28771 kb/s, tbf 1/90000
>>>>>>   Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536
>>>>>> kb/s
>>>>>> Stream mapping:
>>>>>> Stream #0.0 -> #0.0
>>>>>> Stream #0.2 -> #0.1
>>>>>> Press [q] to stop encoding
>>>>>> frame=  922 fps= 97 q=-1.0 Lsize=  107930kB time=30.76
>>>>>> bitrate=28740.7kbits/s
>>>>>> video:108047kB audio:5768kB global headers:0kB muxing overhead
>>>>>> -5.170946%
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> ffmpeg-user mailing list
>>>>>>>> ffmpeg-user at mplayerhq.hu
>>>>>>>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>>>>>>>> 
>>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> ffmpeg-user mailing list
>>>>>>> ffmpeg-user at mplayerhq.hu
>>>>>>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>>>>>> 
>>>>>> _______________________________________________
>>>>>> ffmpeg-user mailing list
>>>>>> ffmpeg-user at mplayerhq.hu
>>>>>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>>>>>> 
>>>>> 
>>>> _______________________________________________
>>>> ffmpeg-user mailing list
>>>> ffmpeg-user at mplayerhq.hu
>>>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>>> 
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at mplayerhq.hu
>>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
>>> 
>> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list