Write AVI and multiple .avi Filenames
spacehermit from United States  [28 posts]
14 year
In your Write AVI module I would like to be able to change the Filename that is created.  Say with a date/timestamp name, so that I can have the robot record more than one .avi file and it doesn't keep rewriting the one it just recorded.  Can you guys make the "Write to Filename" field a variable for me?

Please let me know, thanks
Anonymous 14 year
If you download the latest version the Write_AVI, Read_AVI and Media_Reader have all been upgraded to support the [variable] notation in the filename/url field. So in order to create a new file with a date/time stamp you could use the VBScript module with something like

SetVariable "my_file", "c:\temp\test_" & Day(Date()) &"_"& Month(Date()) &"_"& Year(Date())

and then use


in Write_AVI filename. When the name changes the module will close the previous file and reopen a new one.

Hopefully that does what you need.

spacehermit from United States  [28 posts] 14 year
Thankyou so much, works great.

one note,
you need to put .avi at end of my_file
like so

SetVariable "my_file", "c:\\temp\\test_" & Day(Date()) &"_"& Month(Date()) &"_"& Year(Date())  &".avi"

Anonymous 14 year
Indeed! That's what I get for late night postings!

Thanks for the correction. :-)

spacehermit from United States  [28 posts] 13 year
I'm having a poblem with the media reader module in version 2.27.1 and some versions before.  I can't get it to play back any .avi files whatsoever.  I used to be able to call my long filename location and name a variable like [my_file] and it would play back just fine.  Now I can't even get it to play back the .avi file when I use the media reader to browse and select the file directly.  It just continues playing the live video stream like it doesn't recognize a file being there.  Any thoughts?  I've tried loading more codex and changing the compression, I've tried everything I can think to do, the files that the Write AVI module makes are playable with other players just not with roborealm.

Please let me know.
spacehermit from United States  [28 posts] 13 year
I've added a couple files to show what my problem is.

Here is a much slimmed down version of my robo file that includes an index.html file showing video with three buttons to control recording and play back.  When you hit record a red dot appears  in the video window, and when you play back a green dot appears.  So I know the if statements work.  And I do get a video recorded, I just can't get it to play back like it used to.

spacehermit from United States  [28 posts] 13 year
2nd try at file upload
spacehermit from United States  [28 posts] 13 year
Ok I just solved my own problem.  I have to hit "Start" in the Media Reader or in the Read AVI module then hit "Ok" and have my if statement determine if the playback is running or not.

Anonymous 13 year

Thanks for the followup! You saved us some time in investigating this issue.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index