Announcement

Collapse
No announcement yet.

Script that will extract text for a text file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script that will extract text for a text file

    Looking for a little help. Hoping that I came to the right place.

    I'm using the following script to parse a video stream. I need to assign the values as variables from the log file. Here is the script that I use to create the log file:

    Code:
    @SET h264Parse_PATH=C:\Program Files\h264 Analyze\h264_parse.exe
    @SET MediaInfo_PATH=C:\Program Files\MediaInfo_CLI\MediaInfo.exe
    @SET WORKING_DIRECTORY=C:\Personal\Videos
    
    @Echo off
    set /p    INPUT_VIDEO="Full path to raw h264 stream: "
    
    Echo General;%%FileName%%>"%WORKING_DIRECTORY%\temporary-generalfilename.txt"
    "%MediaInfo_PATH%" --Inform=file://"%WORKING_DIRECTORY%\temporary-generalfilename.txt" "%INPUT_VIDEO%">"%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.txt"
    type "%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.txt">"%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.tmp"
    set /p    SOURCE_FILENAME=<"%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.tmp"
    
    DEL "%WORKING_DIRECTORY%\temporary-generalfilename.txt"
    DEL "%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.txt"
    DEL "%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.tmp"
    
    @Echo on
    "%h264Parse_PATH%" "%INPUT_VIDEO%" 1>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt" 
    @Echo off
    
    Echo.
    Echo.
    Echo.[ %SOURCE_FILENAME% ] [ %TIME% ] Finished !
    Echo.
    Echo.
    Pause
    Now I need to find the following lines in the log file:

    num_units_in_tick:
    time_scale:
    fixed_frame_scale:

    And assign the values as variables. In this case:

    1001
    48000
    1

    The problem that I'm having is that these values are repeated many times throughout the file.

    I have added a url to download the sample log file. Thanks for any help.

    edit: forgot the url.

    http://www.mediafire.com/?sharekey=1...4e75f6e8ebb871
    Last edited by rack04; 27th May 2009, 20:31.

  • #2
    Re: Script that will extract text for a text file

    I think I've got it solved.

    Code:
    @SET h264Parse_PATH=C:\Program Files\h264 Analyze\h264_parse.exe
    @SET MediaInfo_PATH=C:\Program Files\MediaInfo_CLI\MediaInfo.exe
    @SET WORKING_DIRECTORY=C:\Personal\Videos
    
    @Echo off
    set /p    INPUT_VIDEO="Full path to raw h264 stream: "
    
    Echo General;%%FileName%%>"%WORKING_DIRECTORY%\temporary-generalfilename.txt"
    "%MediaInfo_PATH%" --Inform=file://"%WORKING_DIRECTORY%\temporary-generalfilename.txt" "%INPUT_VIDEO%">"%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.txt"
    type "%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.txt">"%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.tmp"
    set /p    SOURCE_FILENAME=<"%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.tmp"
    
    DEL "%WORKING_DIRECTORY%\temporary-generalfilename.txt"
    DEL "%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.txt"
    DEL "%WORKING_DIRECTORY%\temporary-analyzegeneralfilename.tmp"
    
    @Echo on
    "%h264Parse_PATH%" "%INPUT_VIDEO%" 1>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt" 
    @Echo off
    
    FOR /F "tokens=2" %%A IN ('findstr num_units_in_tick "%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"') DO SET num_units_in_tick=%%A
    FOR /F "tokens=2" %%A IN ('findstr time_scale "%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"') DO SET time_scale=%%A
    
    DEL "%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"
    
    Echo %time_scale%>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"
    Echo %num_units_in_tick%>>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"
    
    Echo.
    Echo.
    Echo.[ %SOURCE_FILENAME% ] [ %TIME% ] Finished !
    Echo.
    Echo.
    Pause

    Comment


    • #3
      Re: Script that will extract text for a text file

      Very nice solution, thanks for sharing.

      I optimized the search a bit in a way that the strings are now case insensitive and, the txt-file have to be read only one time.
      Code:
      @echo off
      
      Call SET "PathSourceFile=%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"
      
      If exist "%PathSourceFile%" (
      FOR /F "Tokens=1,2 Delims=: " %%A IN (
         'findstr /ic:"num_units_in_tick:" /ic:"time_scale:" /ic:"fixed_frame_scale:" "%PathSourceFile%"'
         ) DO (Set %%A=%%B)
      )
      
      echo Results:
      echo\   num_units_in_tick: %num_units_in_tick%
      echo\   time_scale: %time_scale%
      echo\   fixed_frame_scale: %fixed_frame_scale%
      
      echo\&pause
      \Rems
      Last edited by Rems; 27th May 2009, 22:06.

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment


      • #4
        Re: Script that will extract text for a text file

        Thanks for the help. Is there a way to return a "null" or "n/a" if the strings are not found? Some files contains these strings and some don't. Thanks.

        Comment


        • #5
          Re: Script that will extract text for a text file

          Originally posted by rack04 View Post
          Thanks for the help. Is there a way to return a "null" or "n/a" if the strings are not found? Some files contains these strings and some don't. Thanks.
          You could add an "IF NOT DEFINED... condition" for the three variables,
          sample
          Code:
          @echo off
          
          Call SET "PathSourceFile=%WORKING_DIRECTORY%\%SOURCE_FILENAME%.txt"
          
          If exist "%PathSourceFile%" (
          FOR /F "Tokens=1,2 Delims=: " %%A IN (
             'findstr /ic:"num_units_in_tick:" /ic:"time_scale:" /ic:"fixed_frame_scale:" "%PathSourceFile%"'
             ) DO (Set %%A=%%B)
          )
          If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a])
          If NOT defined time_scale (Set time_scale=[n/a])
          If NOT defined fixed_frame_scale (Set fixed_frame_scale=[n/a])
          
          echo Results:
          echo\   num_units_in_tick: %num_units_in_tick%
          echo\   time_scale: %time_scale%
          echo\   fixed_frame_scale: %fixed_frame_scale%
          
          echo\&pause
          \Rems

          This posting is provided "AS IS" with no warranties, and confers no rights.

          __________________

          ** Remember to give credit where credit's due **
          and leave Reputation Points for meaningful posts

          Comment


          • #6
            Re: Script that will extract text for a text file

            Again, thanks for the great solution.

            Just one more question and I think I already know the answer. Is it possible to do floating point calculations in a batch script.

            For example:

            Code:
            echo Results:
            Echo.
            echo\   num_units_in_tick: %num_units_in_tick%
            echo\   time_scale: %time_scale%
            
            if "%num_units_in_tick%" EQU "[n/a]" goto end
            if "%time_scale%" EQU "[n/a]" goto end
            
            SET /a den=%num_units_in_tick%*2
            
            echo\   framerate = %time_scale% / %den%
            num_units_in_tick: 1001
            time_scale: 48000

            den: 2002

            framerate: 48000 / 2002

            Is there a way to perform the 48000 / 2002 calculation and give the value of 23.976 instead of 23?

            Comment


            • #7
              Re: Script that will extract text for a text file

              this?
              Code:
              If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a]&Goto end)
              If NOT defined time_scale (Set time_scale=[n/a]&Goto end)
              If NOT defined fixed_frame_scale (Set fixed_frame_scale=[n/a]&Goto end)
              
              SET /a den= %num_units_in_tick% * 2
              SET /a Kfmte= (%time_scale%000) / %den%
              SET "framerate=%Kfmte:~0,-3%.%Kfmte:~-3%"
              
              echo.
              echo\   framerate: %framerate% ( = %time_scale% / %den% )
              
              :end
              
              echo\&pause
              \Rems

              This posting is provided "AS IS" with no warranties, and confers no rights.

              __________________

              ** Remember to give credit where credit's due **
              and leave Reputation Points for meaningful posts

              Comment


              • #8
                Re: Script that will extract text for a text file

                The only problem that I'm having is when time_scale=[n/a] the echo\ time_scale: %time_scale% isn't reporting [n/a].

                Code:
                Call SET "PathSourceFile=%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt
                
                If exist "%PathSourceFile%" (
                FOR /F "Tokens=1,2 Delims=: " %%A IN (
                   'findstr /ic:"num_units_in_tick:" /ic:"time_scale:" "%PathSourceFile%"'
                   ) DO (Set %%A=%%B)
                )
                If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a]&Goto nodata)
                If NOT defined time_scale (Set time_scale=[n/a]&Goto nodata)
                
                SET /a den= %num_units_in_tick% * 2
                SET /a Kfmte= (%time_scale%000) / %den%
                SET "framerate=%Kfmte:~0,-3%.%Kfmte:~-3%"
                
                Echo.
                Echo.
                Echo.
                echo Results:
                Echo.
                Echo.
                echo\   num_units_in_tick: %num_units_in_tick%
                echo\   time_scale: %time_scale%
                echo\   framerate: %framerate% ( %time_scale% / %den% )
                
                if "%SOURCE_FORMAT%" EQU "Matroska" goto container
                if "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                goto finalize
                
                :container
                echo\   framerate: %SOURCE_VIDFRAMERATE%
                goto finalize
                
                :nodata
                Echo.
                Echo.
                Echo.
                echo Results:
                Echo.
                Echo.
                echo\   num_units_in_tick: %num_units_in_tick%
                echo\   time_scale: %time_scale%
                
                if "%SOURCE_FORMAT%" EQU "Matroska" goto container
                if "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                goto finalize
                
                :container
                echo\   framerate: %SOURCE_VIDFRAMERATE%
                goto finalize

                Comment


                • #9
                  Re: Script that will extract text for a text file

                  Originally posted by rack04 View Post
                  The only problem that I'm having is when time_scale=[n/a] the echo\ time_scale: %time_scale% isn't reporting [n/a].
                  this will do the trick
                  Code:
                  Set "NoData="
                  If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a]&Set NoData=Goto:nodata)
                  If NOT defined time_scale (Set time_scale=[n/a]&Set NoData=Goto:nodata)
                  If NOT defined fixed_frame_scale (Set fixed_frame_scale=[n/a]&Set NoData=Goto:nodata)
                  %NoData%
                  
                  SET /a den= %num_units_in_tick% * 2
                  SET /a Kfmte= (%time_scale%000) / %den%
                  SET "framerate=%Kfmte:~0,-3%.%Kfmte:~-3%"
                  
                  Echo.
                  Echo.
                  Echo.
                  echo Results:
                  Echo.
                  Echo.
                  echo\   num_units_in_tick: %num_units_in_tick%
                  echo\   time_scale: %time_scale%
                  echo\   framerate: %framerate% ( %time_scale% / %den% )
                  
                  if /i "%SOURCE_FORMAT%" EQU "Matroska" goto container
                  if /i "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                  goto finalize
                  
                  :nodata
                  Echo.
                  Echo.
                  Echo.
                  echo Results:
                  Echo.
                  Echo.
                  echo\   num_units_in_tick: %num_units_in_tick%
                  echo\   time_scale: %time_scale%
                  
                  if /i "%SOURCE_FORMAT%" EQU "Matroska" goto container
                  if /i "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                  Goto finalize
                  
                  echo\&pause
                  \Rems

                  This posting is provided "AS IS" with no warranties, and confers no rights.

                  __________________

                  ** Remember to give credit where credit's due **
                  and leave Reputation Points for meaningful posts

                  Comment


                  • #10
                    Re: Script that will extract text for a text file

                    Worked great. Thanks.

                    I tried to search for a couple more strings but I'm not having the best luck.

                    The strings that I'm trying to search are:

                    pic_width_in_mbs_minus1: 79 (1280)

                    and

                    derived height: 544

                    Using the following code it assigns:

                    height: [n/a]
                    width: 79

                    How do I modify the code to give 544 for the height and 1280 for the width?

                    Code:
                    Call SET "PathSourceFile=%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt"
                    
                    If exist "%PathSourceFile%" (
                    FOR /F "Tokens=1,2 Delims=: " %%A IN (
                       'findstr /ic:"num_units_in_tick:" /ic:"time_scale:" /ic:"derived height:" /ic:"pic_width_in_mbs_minus1:" "%PathSourceFile%"'
                       ) DO (Set %%A=%%B)
                    )
                    
                    Set "NoData="
                    If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a]&Set NoData=Goto:nodata)
                    If NOT defined time_scale (Set time_scale=[n/a]&Set NoData=Goto:nodata)
                    If NOT defined derived_height (Set derived height=[n/a]&Set NoData=Goto:nodata)
                    If NOT defined pic_width_in_mbs_minus1 (Set pic_width_in_mbs_minus1=[n/a]&Set NoData=Goto:nodata)
                    %NoData%
                    
                    SET /a den= %num_units_in_tick% * 2
                    SET /a Kfmte= (%time_scale%000) / %den%
                    SET "framerate=%Kfmte:~0,-3%.%Kfmte:~-3%"
                    
                    Echo.
                    Echo.
                    Echo.
                    echo Results:
                    Echo.
                    Echo.
                    echo\   height: %derived height%
                    echo\   width: %pic_width_in_mbs_minus1%
                    echo\   num_units_in_tick: %num_units_in_tick%
                    echo\   time_scale: %time_scale%
                    echo\   video framerate: %framerate% ( %time_scale% / %den% )
                    
                    if /i "%SOURCE_FORMAT%" EQU "Matroska" goto container
                    if /i "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                    if /i "%SOURCE_FORMAT%" EQU "BDAV" goto container
                    if /i "%SOURCE_FORMAT%" EQU "MPEG-TS" goto container
                    goto finalize
                    
                    :container
                    echo\   container framerate: %SOURCE_VIDFRAMERATE%
                    goto finalize
                    
                    :nodata
                    Echo.
                    Echo.
                    Echo.
                    echo Results:
                    Echo.
                    Echo.
                    echo\   height: %derived height%
                    echo\   width: %pic_width_in_mbs_minus1%
                    echo\   num_units_in_tick: %num_units_in_tick%
                    echo\   time_scale: %time_scale%
                    
                    if /i "%SOURCE_FORMAT%" EQU "Matroska" goto container
                    if /i "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                    if /i "%SOURCE_FORMAT%" EQU "BDAV" goto container
                    if /i "%SOURCE_FORMAT%" EQU "MPEG-TS" goto container
                    goto finalize
                    
                    :container
                    echo\   container framerate: %SOURCE_VIDFRAMERATE%
                    goto finalize

                    Comment


                    • #11
                      Re: Script that will extract text for a text file

                      Originally posted by rack04 View Post
                      The strings that I'm trying to search are:

                      pic_width_in_mbs_minus1: 79 (1280)
                      and
                      derived height: 544

                      Using the following code it assigns:
                      height: [n/a]
                      width: 79

                      How do I modify the code to give 544 for the height and 1280 for the width?
                      I had to remove the <space> from "Delims" to get also a string like "derived height" from the text file. But then I had to add a little subroutine to trim the variables. Next, any spaces embedded in the string are being replaced with a underscore sign so the string can now be used as the name of a variable.
                      Code:
                      @echo off
                      SETLOCAL EnableDelayedExpansion
                      Goto main
                      
                      :Trim subroutine
                           Call SET "x=%%%~1%%"
                           :LeftTrim
                           If "%x:~0,1%"==" " (Set "x=%x:~1%" & Goto:LeftTrim)
                           :RightTrim
                           If "%x:~-1%"==" " (Set "x=%x:~0,-1%" & Goto:RightTrim)
                           Set "%~1=%x%"
                         goto:eof
                      
                      :main
                      Call SET "PathSourceFile=%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt"
                      
                      If exist "%PathSourceFile%" (
                      echo\&echo\Results:&echo\
                      FOR /F "Tokens=1,2* Delims=:" %%A IN (
                         'findstr /ic:"fixed_frame_scale" /ic:"num_units_in_tick:" /ic:"time_scale:" /ic:"derived height:" /ic:"pic_width_in_mbs_minus1:" /ic:"derived height:" "%PathSourceFile%"'
                         ) DO (
                           set "$Varname=%%A"
                           Call:Trim $Varname
                           set "$Varname=!$Varname: =_!"
                           If not defined !$Varname! (
                             Set "$Value=%%B"
                             Call:Trim $Value
                             For /F "tokens=2 Delims=()" %%R In (
                               'cmd /c @echo.!$Value!^|find "("'
                               ) Do (Set $Value=%%R)
                             echo\   !$Varname!: !$Value!
                             (Set !$Varname!=!$Value!)
                           )
                         )
                      ) ELSE (GOTO:EOF)
                      Set "height=%derived_height%"
                      Set "width=%pic_width_in_mbs_minus1%
                      
                      Set "DataChecked=withdata"
                      If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a]&Set DataChecked=nodata)
                      If NOT defined time_scale (Set time_scale=[n/a]&Set DataChecked=nodata)
                      rem If NOT defined fixed_frame_scale (Set fixed_frame_scale=[n/a]&Set DataChecked=nodata)
                      If NOT defined pic_width_in_mbs_minus1 (Set pic_width_in_mbs_minus1=[n/a]&Set DataChecked=nodata)
                      If NOT defined derived_height (Set derived_height=[n/a]&Set DataChecked=nodata)
                      Goto:%DataChecked%
                      
                      :withdata
                      SET /a den= %num_units_in_tick% * 2
                      SET /a Kfmte= (%time_scale%000) / %den%
                      SET "framerate=%Kfmte:~0,-3%.%Kfmte:~-3%"
                      
                      echo\   height: %height%
                      echo\   width: %width%
                      echo\   framerate: %framerate% ( = %time_scale% / %den% )
                      
                      if /i "%SOURCE_FORMAT%" EQU "Matroska" goto container
                      if /i "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                      if /i "%SOURCE_FORMAT%" EQU "BDAV" goto container
                      if /i "%SOURCE_FORMAT%" EQU "MPEG-TS" goto container
                      goto finalize
                      
                      :nodata
                      echo\   height: %height%
                      echo\   width: %width%
                      
                      :finalize
                      echo\&pause
                      \Rems

                      Or,
                      You can rename the two variables "pic_width_in_mbs_minus1" and "derived_height" right in the For_Do loop:
                      Code:
                      @echo off
                      SETLOCAL EnableDelayedExpansion
                      Goto main
                      
                      :Trim subroutine
                           Call SET "x=%%%~1%%"
                           :LeftTrim
                           If "%x:~0,1%"==" " (Set "x=%x:~1%" & Goto:LeftTrim)
                           :RightTrim
                           If "%x:~-1%"==" " (Set "x=%x:~0,-1%" & Goto:RightTrim)
                           Set "%~1=%x%"
                         goto:eof
                      
                      :main
                      Call SET "PathSourceFile=%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt"
                      
                      If exist "%PathSourceFile%" (
                      echo\&echo\Results:&echo\
                      FOR /F "Tokens=1,2* Delims=:" %%A IN (
                         'findstr /ic:"fixed_frame_scale" /ic:"num_units_in_tick:" /ic:"time_scale:" /ic:"derived height:" /ic:"pic_width_in_mbs_minus1:" /ic:"derived height:" "%PathSourceFile%"'
                         ) DO (
                           set "$Varname=%%A"
                           Call:Trim $Varname
                           set "$Varname=!$Varname: =_!"
                           If /i "!$Varname!"=="derived_height" Set "$Varname=height"
                           If /i "!$Varname!"=="pic_width_in_mbs_minus1" Set "$Varname=width"
                           If not defined !$Varname! (
                             Set "$Value=%%B"
                             Call:Trim $Value
                             For /F "tokens=2 Delims=()" %%R In (
                               'cmd /c @echo.!$Value!^|find "("'
                               ) Do (Set $Value=%%R)
                             echo\   !$Varname!: !$Value!
                             (Set !$Varname!=!$Value!)
                           )
                         )
                      ) ELSE (GOTO:EOF)
                      
                      Set "DataChecked=withdata"
                      If NOT defined num_units_in_tick (Set num_units_in_tick=[n/a]&Set DataChecked=nodata)
                      If NOT defined time_scale (Set time_scale=[n/a]&Set DataChecked=nodata)
                      rem If NOT defined fixed_frame_scale (Set fixed_frame_scale=[n/a]&Set DataChecked=nodata)
                      If NOT defined width (Set width=[n/a]&Set DataChecked=nodata)
                      If NOT defined height (Set height=[n/a]&Set DataChecked=nodata)
                      Goto:%DataChecked%
                      
                      :withdata
                      SET /a den= %num_units_in_tick% * 2
                      SET /a Kfmte= (%time_scale%000) / %den%
                      SET "framerate=%Kfmte:~0,-3%.%Kfmte:~-3%"
                      
                      echo\   framerate: %framerate% ( = %time_scale% / %den% )
                      
                      if /i "%SOURCE_FORMAT%" EQU "Matroska" goto container
                      if /i "%SOURCE_FORMAT%" EQU "MPEG-4" goto container
                      if /i "%SOURCE_FORMAT%" EQU "BDAV" goto container
                      if /i "%SOURCE_FORMAT%" EQU "MPEG-TS" goto container
                      goto finalize
                      
                      :nodata
                      
                      
                      :finalize
                      echo\&pause
                      Last edited by Rems; 29th May 2009, 14:17.

                      This posting is provided "AS IS" with no warranties, and confers no rights.

                      __________________

                      ** Remember to give credit where credit's due **
                      and leave Reputation Points for meaningful posts

                      Comment


                      • #12
                        Re: Script that will extract text for a text file

                        I used your first option and it works great.

                        Here is something odd that I've noticed.



                        Notice the line that says "couldn't find start code from buffer 0"? That is output from:

                        "%h264Parser_PATH%" "%INPUT_VIDEO%" 1>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt "

                        That is not being written to txt. If I remove the 1>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt " and look at the log:



                        You will notice that it's the last line. Is there anyway to add this to the txt file so it doesn't display on the cmd screen?

                        Comment


                        • #13
                          Re: Script that will extract text for a text file

                          Of course it'd be better to see if you can solve getting the "couldn't find start code from buffer 0" error in the first place. Google had some some hits.


                          If it are just lines containing that one error, or a few different more, then you could try if this works for you:
                          Code:
                          "%h264Parser_PATH%" "%INPUT_VIDEO%" |findstr /v /ic:"couldn't find start code" 1>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt"
                          or, to break the long line in the batch a bit:
                          Code:
                          1>"%WORKING_DIRECTORY%\%SOURCE_FILENAME%_h264.txt" (
                          "%h264Parser_PATH%" "%INPUT_VIDEO%" | findstr /v /ic:"couldn't find start code"
                          )
                          \Rems
                          Last edited by Rems; 30th May 2009, 17:54.

                          This posting is provided "AS IS" with no warranties, and confers no rights.

                          __________________

                          ** Remember to give credit where credit's due **
                          and leave Reputation Points for meaningful posts

                          Comment

                          Working...
                          X