Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[niconico] Extracting Videos Formats Accessible only through the HTML5 player #13522
Comments
|
After further research, it seems that the new encodings in html5 originate from the new "DMC" server, while the traditional "smile" server retains the traditional encoding. The Saccubus client has support for extracting information and downloading videos from both servers. The core of this process occurs in NicoClient.java. In particular, it seems the key information on the HTML5 page lies in data-api-data Hope that helps. |
|
I've added support for additional HTML5 formats and the feature will be available in the next version. For me (regular account), only 360p formats are available: So youtube-dl reports those formats only:
I believe you can get all formats if providing a premium account. If this is not the case in the next version, feel free to leave comments and I'll reopen this. |
|
Thanks! I've already tested it from the repository, and for the new formats, it works completely as expecting for several videos which I have tested using a premium account. However, there is one important aspect which is missing from the original issue, which I indirectly addressed in the original issue; my apologies for not directly stating it:
The inverse also holds. For example, a new video of relatively short duration, which is uploaded with a filesize of 99MB by a premium account, will still have the original video available, which will have a higher quality than any of new formats. Mind you, this will increasingly become the minority of cases, but it is still present, especially if the uploader's video is below 720p (and subjected to a lower bitrate during re-encoding). Therefore, it is important to not only provide the support for the new formats, but also maintain the ability to access the old API to optionally download the video through the old method. If I am reading your commit correctly, perhaps this could accomplished by appending the format information of Once again, my apologies for not properly specifying this earlier. |
Hmm didn't think of that. Any example? |
|
Some particularly noticeable examples: There are also many videos where the visual difference is not as great, but the format obtained through the old API is the best quality. You also have cases like http://www.nicovideo.jp/watch/sm30988109, where the original video was encoded with a quality below the standards of the new formats. So while it might seem like it was re-encoded for both the flash player and the HTML5 player, the flash version is still the original video, and the new formats will only degrade the quality of the video through re-encoding, even if the overall bitrate and filesize are larger. |

Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2017.06.25. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Description of your issue, suggested solution and other information
Niconico account credentials are required to access these videos, as well as all other videos on Niconico.
The HTML5 Player can be accessed when logged in by either manually enabling it (a blue bar above the flash player), or by using a browser without a flash plugin
Last year, Niconico rolled out a new encoding process for videos, along with a new HTML5 video player. Unlike the previous process, Niconico now re-encodes uploads into a variety of formats, based around the resolution size of the uploaded video and the time of the video. The new upload limit is 1.5GB, and the re-encoded videos now exceed 100MB, in contrast to former upload limits. Videos uploaded before the change will retain their original quality in the HTML5 player, with the economy encoding serving as the low quality.
While the old API and flash player still function as normally if a newly uploaded video is under 100MB, uploaded videos which are over 100MB will be re-encoded for the old API and flash player to be under 100MB (as far as I have seen). This will usually result in a video with significantly lower quality than the highest quality format available in the HTML5 player. Therefore, in order to download the highest quality format of newer uploaded videos, being able to download these new formats is essential, especially as people increasingly ignore the former upload limits.