View Full Version : conditional reader
ficofico
24th June 2007, 22:50
I'm going crazy to understand how can I get framerate from txt file and put into a line of avs file.
with mediainfo :
MediaInfo "--Inform=Video;%FrameRate%"; video.mp4 > framerate.txt
I build a txt file with only the framerate.
How can I import this number in this line:
directshowsource("video.mp4",) to set the framerate
I've read about conditional reader but I haven't understand how does it work.
Thanks
ficofico
24th June 2007, 23:13
ConditionalReader("fico.txt","fico",false)
directshowsource("originale.mp4",fico)
doesn't work.
fico.txt it's a float number
IanB
25th June 2007, 00:19
fico=Import("fico.txt") # 1 line with 1 number!
directshowsource("originale.mp4",fico)
ficofico
25th June 2007, 00:34
I'm very very very happy!!!!!!!!!!!!!!!!!!!!!! thank you!!
ficofico
25th June 2007, 17:25
I'm quite happy........ because I don't understand why if I open the shell with cmd and paste this info:
MediaInfo "--Inform=Video;%FrameRate%"; video.mp4 > framerate.txt
mediainfo process well , with the value of framerate
If I paste this info into a .bat file, mediainfo process wrong and give me this kind of file:
file (http://ficofico.interfree.it/framerate.txt)
It's not empty, there is some kind of information that I can copy and paste, but I cannot use.
In .bat way I can export a document like this:
Framerate with all information (http://ficofico.interfree.it/framerate2.txt)
If there's no way to write in batch mode a file with only the framerate, how can I extract the frame rate from the second txt file, and use as variable in the script above?
It's very frustrating, I want to realize this project....
ficofico
25th June 2007, 19:28
I've find my way!!!!!!!!!!!!!!!!!!!!!!!!!! and now all works good.
In my batch file I've insert this command:
cmd.exe < testo.txt
where testo.txt have the command for mediainfo. In this way works!!!
I've turn around a bug of mediainfo!!!!
IanB
25th June 2007, 23:16
Also double %% will protect % in a batch file.MediaInfo "--Inform=Video;%%FrameRate%"; video.mp4 > framerate.txt
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.