Limit Time on StreamUrl

Is it possible to limit the amount of time an mp4 plays and then send it to like a commercial or standard video ?

You could do something simple like set up a time using roTimespan:

http://sdkdocs.roku.com/display/RokuSDKv48/roTimespan

and after the desired interval, SetContent on your roVideoScreen to the ad or other new content that you want to play.