To get the variable in the <source> tag, you need to use the DOM. Try something like this:
var videoFile = getQueryVariable("v");
var videoElement = document.getElementById("mp4source");
videoElement.setAttribute("source", videoFile + ".mp4");
In which case you should add the ID attribute to the <source> tag, with the value of "mp4source". The above code gets the v parameter from the URI using your function, the second finds the page element of the ID "mp4", while the last line sets the source attribute to the desired one.
Furthermore, if you wish there is a video when you don't have a query variable, you can alter the first line so it goes like this:
var videoFile = (getQueryVariable("v") !== "") ? getQueryVariable("v") : "myothervideo";
Which has a fallback value should the URL lacks the v parameter.