mipops / dvrescue

Archivist-made software that supports data migration from DV tapes into digital files suitable for long-term preservation. Snapshot daily builds are at https://mediaarea.net/download/snapshots/binary/dvrescue/.
BSD 3-Clause "New" or "Revised" License
94 stars 20 forks source link

If unknown presume video rate dif sequence count #327

Open dericed opened 3 years ago

dericed commented 3 years ago

With the attached file, the first frame contains no packs in the vaux section, so the xml is like this:

<?xml version="1.0" encoding="UTF-8"?>;02 
<dvrescue xmlns="https://mediaarea.net/dvrescue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://mediaarea.net/dvrescue https://mediaarea.net/dvrescue/dvrescue.xsd" version="1.1">
    <creator>
        <program>dvrescue</program>
        <version>0.20.11.20210717</version>
        <library version="21.03">MediaInfoLib</library>
    </creator>
    <media ref="BAVC1010851_DV000053_take01-003_1st_2_frames.dv" format="DV" size="240000">
        <frames count="1" pts="00:00:00.000000" end_pts="00:00:00.033366" size="720x480" audio_rate="48000" channels="2">
            <frame n="0" pos="0" pts="00:00:00.000000" abst="2750" tc="00:00:00;00" seqn="F" no_pack_vid="1"/>
        </frames>
        <frames count="1" pts="00:00:00.033366" end_pts="00:00:00.066733" size="720x480" video_rate="30000/1001" chroma_subsampling="4:1:1" aspect_ratio="4/3" audio_rate="48000" channels="2">
            <frame n="1" pos="120000" pts="00:00:00.033366" abst="2750" abst_r="1" tc="00:00:00;00" rdt="2002-07-26 00:00:00;02" seqn="5">
            <!-- dseq removed -->
            </frame>
        </frames>
    </media>
</dvrescue>

Could we presume the rate is 30000/1001 based on the count of the dif sequences in the frame (10 vs 12)?

BAVC1010851_DV000053_take01-003_1st_2_frames.dv.zip

dericed commented 3 years ago

Adding another sample test_b.dv.zip Here the first and third frame are the same frame, but the output is like this:

<?xml version="1.0" encoding="UTF-8"?>
<dvrescue xmlns="https://mediaarea.net/dvrescue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://mediaarea.net/dvrescue https://mediaarea.net/dvrescue/dvrescue.xsd" version="1.1">
    <creator>
        <program>dvrescue</program>
        <version>0.20.11.20210822</version>
        <library version="21.03">MediaInfoLib</library>
    </creator>
    <media ref="/Users/davidrice/Downloads/test_b.dv" format="DV" size="360000">
        <frames count="1" pts="00:00:00.000000" end_pts="00:00:00.033366" size="720x480" audio_rate="48000" channels="2">
            <frame n="0" pos="0" pts="00:00:00.000000" abst="2792" tc="00:57:02;27" seqn="F" no_pack_vid="1"/>
        </frames>
        <frames count="1" pts="00:00:00.033366" end_pts="00:00:00.066733" size="720x480" video_rate="30000/1001" chroma_subsampling="4:1:1" aspect_ratio="4/3" no_sourceorcontrol_aud="1">
            <frame n="1" pos="120000" pts="00:00:00.033366" abst="553700" abst_nc="1" tc="00:30:47;14" tc_nc="1" rdt="2002-08-07 16:38:17" seqn="F" no_sourceorcontrol_aud="1"/>
        </frames>
        <frames count="1" pts="00:00:00.066733" end_pts="00:00:00.100100" size="720x480" video_rate="30000/1001" chroma_subsampling="4:1:1" aspect_ratio="4/3" audio_rate="48000" channels="2">
            <frame n="2" pos="240000" pts="00:00:00.066733" abst="2792" abst_nc="1" tc="00:57:02;27" tc_nc="1" seqn="F" no_pack_vid="1" full_conceal_vid="1"/>
        </frames>
    </media>
</dvrescue>

ffmpeg is able to correct say that the first frame is 30000/1001 and 4:1:1