Niconico Video Streaming Playback

Asked 2 years ago, Updated 2 years ago, 112 views

I am developing an application to play Niconico videos.
Using Alamofire Ranking acquisition → Video ID acquisition → Video URL acquisition → Video page up to HEAD
I gave the video URL to AVPlayer, but it doesn't play

How can I stream it?

Thank you for your cooperation

ios objective-c iphone

2022-09-30 21:13

2 Answers

Niconico video files can be retrieved via RTSP over HTTP.

When I searched iOS RTSP, there were several player libraries, so it might be less troublesome to find RTSP-enabled players than to implement themselves.

However, there are three types of Niconico video, mp4/flv/swf, and if the format is not supported, conversion processing is required. (The video type can be determined by flashvars.movie_type)


2022-09-30 21:13

Niconico videos should be streamed in flv format.
Therefore, instead of getting the URL of the video page, you need to get the video number that starts with sm, nm, etc., and get the flv video information in xml from the web API and parse it.
For detailed API specifications, please refer to the URL below.
http://dic.nicovideo.jp/a/%E3%83%8B%E3%82%B3%E3%83%8B%E3%82%B3%E5%8B%95%E7%94%BBapi


2022-09-30 21:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.