Menu

#207 Batch files, black output

Incorrect_result
open-accepted
6
2015-05-06
2007-06-25
gianluca
No

If I open cmd.exe and paste this script it's ok

MediaInfo "--Inform=Video; %FrameRate%" ; originale.mp4 > framerate.txt

But I create a batch file whit the same info, mediainfo give me a framerate.txt without any information.

Discussion

  • Jerome Martinez

    Jerome Martinez - 2007-06-26
    • priority: 5 --> 6
    • summary: black output --> Batch files, black output
    • status: open --> open-accepted
     
  • Jerome Martinez

    Jerome Martinez - 2007-06-26

    Logged In: YES
    user_id=801394
    Originator: NO

    Note for me:
    - batch does NOT like quotes and "
    - MediaInfo --Inform=Video;file://Template.txt with Template.txt is a file with " %FrameRate" return the framerate, but with one garbage byte, I don't know why.

    Note for ficofico :
    I will not be able to work on it before 2 or 3 weeks :(

     
  • Nobody/Anonymous

    Logged In: NO

    The solution to this is to wrap the parameters in TWO % characters, not just one. I took a wild guess on this. When using cmd batch files, FOR loop variables need to be enclosed by double %'s, and apparantly MediaInfo uses cmd style FOR loops.

    E.g. MediaInfo "--Inform=Video;%%FrameRate%%" ; originale.mp4 > framerate.txt

     
  • Jerome Martinez

    Jerome Martinez - 2007-09-27

    Logged In: YES
    user_id=801394
    Originator: NO

    Excellent news.
    I do the parsing myself, and output the result.
    Maybe there is a problem with the Command line parser, i don't know, I didn't have time to work on this issue.
    Thanks for the work around.

     
  • Stellan Klebom

    Stellan Klebom - 2015-05-06

    The use of double %-signs is required with windows command scripts.
    This is an invalid bug.

     

Log in to post a comment.