Download Video with MPlayer

From Exterior Memory
Jump to: navigation, search

Many WMV files can be viewed online. Since my WVM viewer plugin gives choppy results, I prefer to download the files and view them off-line with another viewer

Step 1. Find the URL

The hardest part is to find the URL of the data source. There is no single answer how to find this, and this can range from very simple to excrutiatingly hard. All that can be said is that it is always possible to download it, otherwise you would not be able to view it in the first place.

There are three generic approaches:

  • View source of the webpage containing the video: Use "View Source" in your browser.
  • Get information about media items embedded in the enclosing webpage. Use "Page Info" in your webbrowser.
  • Use a network deep packet inspection to detect which URL(s) have been requested by the streaming application.. Use "tcpdump -A dst port http"

Here are a few examples, ranging from easy to hard.

<a class="wmv-player-holder" href="http://www.example.com/media_files/series042.wmv"></a>


<object width="352" height="198"> <param name="movie" value="http://s.nos.nl/swf/nos_video_embed.swf"></param> <param name="allowfullscreen" value="true"></param> <param name="allowscriptaccess" value="true"></param> <param name="flashvars" value="tcmid=tcm:5-695325" /> <embed src="http://s.nos.nl/swf/nos_video_embed.swf" type="application/x-shockwave-flash" width="352" height="198" allowscriptaccess="always" allowfullscreen="true" flashvars="tcmid=tcm:5-695325"></embed> </object>

<object style="height: 344px; width: 425px">
 <param name="movie" value="http://www.youtube.com/v/a4CpgwEwCFk">
 <param name="allowFullScreen" value="true">
 <param name="allowScriptAccess" value="always">
 <embed src="http://www.youtube.com/v/a4CpgwEwCFk" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344">
</object>
mplayer -dumpstream -dumpfile filename.wmv mms://stream.example.net/media_files/series042.wmv