HV20 24P Pulldown, AVID on Windows

Bob Gruen

Well-known member
I figured this out and thought I'd share. It may work on other windows based NLEs, as long as they can import and export image sequences.

The 24P mode in the HV20 creates a duplicate image every 5 images, so it doesn't seem to coorelate to any real pulldown definition. To get it into a 24P timeline the duplicate image simply needs to be removed, which can easily be done by deleting files from a jpg sequence. As a bonus the export process in Avid will stretch the raster out to 1920 if you set it properly.

For those who want to integrate the HV20 into a 24P 1920 x 1080 Avid workflow you can do the following:
  1. In an HDV project, capture your interlaced 24P footage.
  2. Export to a JPG sequence, resizing to 1920 x 1080
  3. Edit then run the batch script listed below
  4. Open a 24P project
  5. Import the JPG sequence by ctrl-selecting all of the jpg files.
The batch script will delete every 5th file starting with the first duplicate (which you must specify) then it will re-index the files so the import process will work. When editing the batch script you are concerned with the four constants below the :Main tag.
  • WorkingDir: Where the jpgs were exported to
  • FileName : File name of the jpgs up to the index number
  • FirstDup : First duplicate jpg image
  • LastNum : Last number in the sequence
It will only work for files with a 3 digit index, 001 to 999, although it should be pretty easy to tweek it for a more digits as needed. As stated other NLEs may work, but you might need to tweek the batch file further if names are handeled in a method different from Avid.



CanonPulldownRemoval.bat
---------------------------------------------

@echo Off
@if not "%ECHO%"=="" echo %ECHO%
@if not "%OS%"=="Windows_NT" goto DOSEXIT
rem Set local scope and call MAIN procedure
setlocal & pushd & set RET=
set SCRIPTNAME=%~n0
set SCRIPTPATH=%~f0
if "%DEBUG%"=="1" (set TRACE=echo) else (set TRACE=rem)
if /i {%1}=={/help} (call :HELP %2) & (goto :HELPEXIT)
if /i {%1}=={/?} (call :HELP %2) & (goto :HELPEXIT)
call :MAIN %*
:HELPEXIT
popd & endlocal & set RET=%RET%
goto :EOF
rem /////////////////////////////////////////////////////////////////////////
rem HELP procedure
rem Display brief on-line help message
rem
:HELP
if defined TRACE %TRACE% [proc %0 %*]
rem Put help message here...
goto :EOF
rem /////////////////////////////////////////////////////////////////////////
rem MAIN procedure
rem
:MAIN
if defined TRACE %TRACE% [proc %0 %*]

Set WorkingDir=E:\Canon Test\
Set FileName=TrackTest.1_
Set FirstDup=3
Set LastNum=138


Set FileSpec=%WorkingDir%%FileName%
Set FileIndex=0
for /l %%i in (%FirstDup%,5,%LastNum%) do call DeleteFile %%i
for /f "tokens=1" %%j in ('dir /b /on "%FileSpec%*"') do call :ReIndexFiles %%j
Pause

goto :EOF
rem /////////////////////////////////////////////////////////////////////////
DeleteFile
set Index=%1
if %1 lss 100 set Index=0%1
if %1 lss 10 set Index=00%1
echo Deleting %FileSpec%%Index%.jpg
Del "%FileSpec%%Index%.jpg"
goto :EOF

rem /////////////////////////////////////////////////////////////////////////
:ReIndexFiles
set /a FileIndex = %FileIndex% + 1
set WorkingIndex=%FileIndex%
if %FileIndex% lss 100 set WorkingIndex=0%FileIndex%
if %FileIndex% lss 10 set WorkingIndex=00%FileIndex%

Ren "%WorkingDir%%1" %FileName%%WorkingIndex%.jpg

goto :EOF


rem These must be the FINAL LINES in the script...
DOSEXIT
echo This script requires Windows NT
rem /////////////////////////////////////////////////////////////////////////
 
Last edited:
I wanna try it. I'm pretty well versed in Avid. But I actually don't really know what that script you posted actually is. Can I ask how you run that script?

Someone's gotta write an application for the HV20 pulldown for us "technically ordinary" folks.
 
Step 3 explained:

In windows, create a new text document and copy and paste the script above into the text document. Rename the document from whatever.txt to whatever.bat. Edit the file as per the directions above. You can then double click the file and it will execute.

Bob
 
The batch script will delete every 5th file starting with the first duplicate (which you must specify) then it will re-index the files so the import process will work.

The sequence is different for each clip so you have to run each clip individually which can be very annoying to do if you have too many of them.
 
Back
Top