A video can belong to multiple threads (roughly speaking, thread = video + comments). Since this software downloads only a video without comments, the downloaded file should be identified by video-id (e.g. "sm14227000") rather than the thread-id (e.g. "1318601747").
Note
The video_url_real includes the numerical part of video-id but does not include the prefix ("sm", "nm", "so", etc.). The author of this ticket have no good idea how to get the video-id with prefix (may need to scrape the HTML?). Sorry. ;-D
The output file should be named after video-id, even if the given URL indicates thread-id.
Example
Running "nicovideo-dl http://www.nicovideo.jp/watch/1318601747" should produce a file named "sm14227000.mp4" instead of "1318601747.mp4". Another example is http://www.nicovideo.jp/watch/1317899356 of which the filename should be "so15809985.mp4".
Background
A video can belong to multiple threads (roughly speaking, thread = video + comments). Since this software downloads only a video without comments, the downloaded file should be identified by video-id (e.g. "sm14227000") rather than the thread-id (e.g. "1318601747").
Note
The video_url_real includes the numerical part of video-id but does not include the prefix ("sm", "nm", "so", etc.). The author of this ticket have no good idea how to get the video-id with prefix (may need to scrape the HTML?). Sorry. ;-D
References
Description of relationship between video-id and thread-id. http://d.hatena.ne.jp/kotas/20070926/watchurl