VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hi cats, please can u help a ***?

    consider the attached mediainfo.txt
    Code:
    General
    Complete name                            : C:\f335\ciro.mxf
    Format                                   : MXF
    Commercial name                          : XDCAM HD 35
    Format profile                           : OP-1a
    Format settings                          : Closed / Complete
    File size                                : 54.2 MiB
    Duration                                 : 11s 760ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 38.7 Mbps
    Encoded date                             : 2014-09-18 21:42:26.000
    Writing application                      : SONY Opt  1.20
    Writing library                          : SONY Opt  1.20
    
    Video
    ID                                       : 2
    Format                                   : MPEG Video
    Commercial name                          : XDCAM HD 35
    Format version                           : Version 2
    Format profile                           : Main@High
    Format settings, BVOP                    : Yes
    Format settings, Matrix                  : Custom
    Format settings, GOP                     : M=3, N=12
    Format settings, picture structure       : Frame
    Format settings, wrapping mode           : Frame
    Codec ID                                 : 0D01030102046001-0401020201030300
    Duration                                 : 11s 760ms
    Bit rate mode                            : Variable
    Bit rate                                 : 35.0 Mbps
    Width                                    : 1 440 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 25.000 fps
    Standard                                 : Component
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan order                               : Top Field First
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.900
    Stream size                              : 49.1 MiB (91%)
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    
    Audio #1
    ID                                       : 3
    Format                                   : PCM
    Format settings, Endianness              : Little
    Format settings, wrapping mode           : Frame (AES)
    Codec ID                                 : 0D01030102060300
    Duration                                 : 11s 760ms
    Bit rate mode                            : Constant
    Bit rate                                 : 768 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Stream size                              : 1.08 MiB (2%)
    
    Audio #2
    ID                                       : 4
    Format                                   : PCM
    Format settings, Endianness              : Little
    Format settings, wrapping mode           : Frame (AES)
    Codec ID                                 : 0D01030102060300
    Duration                                 : 11s 760ms
    Bit rate mode                            : Constant
    Bit rate                                 : 768 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Stream size                              : 1.08 MiB (2%)
    
    Audio #3
    ID                                       : 5
    Format                                   : PCM
    Format settings, Endianness              : Little
    Format settings, wrapping mode           : Frame (AES)
    Codec ID                                 : 0D01030102060300
    Duration                                 : 11s 760ms
    Bit rate mode                            : Constant
    Bit rate                                 : 768 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Stream size                              : 1.08 MiB (2%)
    
    Audio #4
    ID                                       : 6
    Format                                   : PCM
    Format settings, Endianness              : Little
    Format settings, wrapping mode           : Frame (AES)
    Codec ID                                 : 0D01030102060300
    Duration                                 : 11s 760ms
    Bit rate mode                            : Constant
    Bit rate                                 : 768 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Stream size                              : 1.08 MiB (2%)
    
    Other #1
    ID                                       : 1
    Type                                     : Time code
    Format                                   : MXF TC
    Time code of first frame                 : 02:55:41:06
    Time code settings                       : Striped
    
    Other #2
    Type                                     : Time code
    Format                                   : SMPTE TC
    Muxing mode                              : SDTI
    Time code of first frame                 : 02:55:41:06
    in a batch script I would like set a enviroment variable theblackcat to 1 IF at the same time are true that:

    --> commercial name = XDCAM HD 35
    --> Frame rate = 25.000 fps
    --> Chroma subsampling = 4:2:0


    If one of this is not true, the %theblackcat% cannot be = 1

    How I can I do? thanks
    Image Attached Files
    Quote Quote  
  2. Code:
    if exist  "%temp_folder%\mediainfo.txt" del "%temp_folder%\mediainfo.txt"
    "%mediainfo%" %1 dumpinfo:"%temp_folder%\unicodefile.txt"
    TYPE "%temp_folder%\unicodefile.txt" > "%temp_folder%\mediainfo.txt"
    set info="%temp_folder%\mediainfo.txt"
    
    set theblackcat=0& set xdcamhd=unknown& set fps=unknown& set ch_sub=unknown
    
    findstr /c:"Commercial name                          : XDCAM HD 35"        %info% >nul
      if %ERRORLEVEL%==0 SET xdcamhd=yes
    findstr /c:"Frame rate                               : 25.000 fps"            %info% >nul
      if %ERRORLEVEL%==0 SET fps=25.000
    findstr /c:"Chroma subsampling                       : 4:2:0"                 %info% >nul
      if %ERRORLEVEL%==0 SET ch_sub=yes
    if [%xdcamhd%]==[yes] if  [%fps%]==[25.000] if [%ch_sub%]==[yes] set theblackcat=1
    Last edited by _Al_; 27th Sep 2014 at 18:20.
    Quote Quote  
  3. mostly you need to know what fps really is (same like height, width,display aspect ratio etc...), so you can parse real value:
    Code:
    findstr /c:"Frame rate                               :" %info% > "%temp_folder%\temp.txt"
    set /p string= < "%temp_folder%\temp.txt"
    SET divider=: 
    CALL SET after=%%string:*%divider%=%%
    set fps=%after: fps=%
    or height for example
    Code:
    findstr /c:"Height                                   :" %info% > "%temp_folder%\temp.txt"
    set /p string= < "%temp_folder%\temp.txt"
    SET divider=: 
    CALL SET after=%%string:*%divider%=%%
    set h=%after: pixels=%
    set h=%h: =%
    I had chosen this mediainfo data extraction as oppose mediainfo CLI because cli cannot get all parametrs, not sure what now ...
    Quote Quote  
  4. mmm thanks

    Name:  catlane.gif
Views: 205
Size:  1.26 MB
    Quote Quote