View Single Post
Old 8th May 2009, 17:26   #1215  |  Link
rack04
Registered User
 
Join Date: Mar 2006
Posts: 1,538
Is there a way to index only a specific number of frames?

For example:

I've set up a batch file which uses the WriteFile function in AviSynth to identify frame count, frame rate, width, and height of video streams. Currently, I index the entire h264 stream using DGAVCIndexNV, create a AviSynth script, and then feed the AviSyth script to ffmpeg to generate the WriteFile text file. Ideally, I'd like to specify just a few frames to index so this process is quicker. Though I don't know if this is even possible. Thanks.

Code:
"%DGAVCIndexNV_PATH%" -i "%INPUT_VIDEO%" -o "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-output.dga" -e -h

Echo LoadPlugin("C:\Program Files\DGAVCIndexNV\DGAVCDecodeNV.dll")>"%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
Echo AVCSource("%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-output.dga")>>"%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
Echo WriteFile("%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-framecount.txt","Framecount")>>"%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
Echo WriteFile("%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-framerate.txt","Framerate")>>"%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
Echo WriteFile("%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-width.txt","Width")>>"%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
Echo WriteFile("%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-height.txt","Height ")>>"%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
goto ffmpeg

:ffmpeg
"%ffmpeg_PATH%" -i "%WORKING_DIRECTORY%\%OUTPUT_FILENAME%-analyze.avs"
goto end
rack04 is offline