WebSaver

Active Member
31
2024
2
1,060
Hello Wjunction members,

I want to know, how to stream anime using video hosting's API. As I am using video hosings [filegram.to, safestream.cc etc.] to store my anime video files manually and Now I want to stream the Anime in my website. The video hosting are providing the iframe embeds to stream but I don't want to do it manually as It will take months to embed all of them.
So is there anyone who can help me by telling how to use API to stream.
It will be helpful.

Thank You.
Post automatically merged:

If anyone don't know so tell me if it is possible or not!!
 
Last edited:
12 comments
Everything is possible, what you need is a script wich you will use to upload video to various sites, using their apis, then you grt iframe urls and post them to yout site, but then you site must have api.
 
Everything is possible, what you need is a script wich you will use to upload video to various sites, using their apis, then you grt iframe urls and post them to yout site, but then you site must have api.
Ok I am now understanding a little bit.....
Sorry for taking your time, But I have the little confusion. So can you please help me resolve it.
"Suppose I have video hosting available as I said above and I am uploading the Anime/Movies in it manually from my PC & I don't want to use API to upload anime.
Ok after uploading, now I have Iframe embed URL of the Anime which I can paste in my website to play the anime.
But the issue is it is taking so much time to get and paste every episode's Iframe embed URL to play it.
So I just wanted to know if I can use the API just to paste the Iframe URLs like the DATA ID or I have to do it manually forever."
Thank You./
Post automatically merged:

Ok I am now understanding a little bit.....
Sorry for taking your time, But I have the little confusion. So can you please help me resolve it.
"Suppose I have video hosting available as I said above and I am uploading the Anime/Movies in it manually from my PC & I don't want to use API to upload anime.
Ok after uploading, now I have Iframe embed URL of the Anime which I can paste in my website to play the anime.
But the issue is it is taking so much time to get and paste every episode's Iframe embed URL to play it.
So I just wanted to know if I can use the API just to paste the Iframe URLs like the DATA ID or I have to do it manually forever."
Thank You./
I mean, I want the API just to stream the Anime not for uploading and other stuffs....
 
Last edited:
Hello Wjunction members,

I want to know, how to stream anime using video hosting's API. As I am using video hosings [filegram.to, safestream.cc etc.] to store my anime video files manually and Now I want to stream the Anime in my website. The video hosting are providing the iframe embeds to stream but I don't want to do it manually as It will take months to embed all of them.
So is there anyone who can help me by telling how to use API to stream.
It will be helpful.

Thank You.
Post automatically merged:

If anyone don't know so tell me if it is possible or not!!

Manages Embed API Links​

username : admin
Password : Embedze
 
Well if you using wordpress you can, since wordpress have rest api.
Sorry for consuming your time...
but If you get any free time then please help me out as I don't know how to use REST api to stream my anime because I am not that much pro in coding. I only know HTML, CSS, medium level of JS, and a very little bit of PHP. So if you got the time, help me out. It will be helpful. Thank You.

[ If anyone is reading this thread and has a free time can help me out. It would be very helpful ]
 
Last edited:
You chose safestream and filegram two of the most shadiest sites. I'm almost certain both are operated by same admin as streamsb
No-No! I just gave the example of the video hostings. I am not using them as the primary source. I mentioned these because all of the video hosting has the similar API.
My question is how to use API to stream.!
Post automatically merged:

Ok so Now....... I have integrated the API key in my wordpress website's function.php code. [ I am not using any plugin to do this ]

I use this code :-

function fetch_data_from_api() {
$api_key = 'my_api_key';
$response = wp_remote_get('https://api.example.com/data', array(
'headers' => array(
'Authorization' => 'Bearer ' . $api_key,
),
));

if (is_wp_error($response)) {
return;
}

$body = wp_remote_retrieve_body($response);
return json_decode($body);
}

Now can anyone tell me what to do next to get URL of anime directly for streaming anime.???
Post automatically merged:

Below is the link of API Documentation of the video hosting's. Tell me anyone, how to use that.

 
Last edited:
Authorization header aint required since you will put key in url for example thta endpoint url will get you info for specified video.
and by
get URL of anime directly for streaming anime. you want to get m3u8/mp4 direct link so you can play it in your own player?? that aint possible, some hosting sites have that option but only if you buy premium.
Oh!! Now I understood. I have to be the premium user to get the anime video's mp4/m3u8 direct links to play them if the video hosting has this feature.
So basically now it seems like as a free user there is no options to stream the anime using API.
All I have to embed the Iframe URLs manually in the website to play the anime. Is the correct na??

Thank You for your Reply.
It's time to add the iframes manually.........!!!!!
Post automatically merged:

[ ONLY one last Question I am asking so please REPLY (anyone) ....It will help me ]

I inspected the HTML code of 9animetv.to website's streaming page & I got these codes.

(1.) HTML code of the SERVERS -

<div class="ps__-list">

<div class="item server-item" data-type="sub" data-id="1107706" data-server-id="4">
<a href="javascript:;" class="btn active">Vidstreaming</a>
</div>

<div class="item server-item" data-type="sub" data-id="1107704" data-server-id="1">
<a href="javascript:;" class="btn">Vidcloud</a>
</div>

</div>


(2.) JAVA Script code used in it -

<script>
$('.server-item').click(function () {
$('.server-item .btn').removeClass('active');
$(this).find('.btn').addClass('active');
const id = $(this).data('id');
getSources(id);
localStorage.setItem('currentSource', $(this).data('type'));
localStorage.setItem(keyLsCurrentServer, $(this).data('server-id'));
});

function getSources(id) {
$('#source-guide').empty();
$.get('/ajax/episode/sources?id=' + id, function (res) {
if (res.htmlGuide) {
$('#content-guide').removeClass('only-one');
$('#source-guide').html(res.htmlGuide);
}
if (res.link !== "") {
var linkIframe = res.link;
if ([1, 4].indexOf(parseInt(res.server)) >= 0) {
linkIframe += "&autoPlay=" + userSettings.auto_play + "&oa=" + (userSettings.play_original_audio || 0)
}
$('#iframe-embed').attr('src', linkIframe);
$('#iframe-embed').show();
}
})
}
</script>

[ My questions are below ] -

(1.)
What are they using API or DATABASE to get the URLs to stream the Anime?
[This is the main question as I want to know where are they storing the links, in database or using API to fetch URL]

(2.) Why Data Id are used [ data-id="1107706" , data-id="1107704" ] ?
*(for all the episodes data id's are different)*

(3.) What are they using to stream mp4/m3u8 links or Iframe embeds?

(4.) Can I make this too to stream Anime in my website?

(5.) Why only one Iframe code is showing when the server is playing, Is another server's Iframe not loading till user click the button to change the server..?


Thank You.
Post automatically merged:

[ Basically the whole question is how 9animetv.to buttons-servers are working!! How are the buttons getting URL to stream Anime. ]
Post automatically merged:

Hello There!! Any updates by anyone??
 
Last edited:
Step 1: Choose a Video Hosting Provider
First, select a video hosting provider that offers an API. Some popular options are:

YouTube API
Vimeo API
Dailymotion API
Wistia API
Step 2: Create an Account and Get API Keys
Sign Up: Register for an account on the chosen video hosting platform.
Create a Project: Often, you need to create a project/application within the provider’s developer portal.
Obtain API Keys: After creating the project, you'll receive API keys or authentication tokens needed for API calls.
Step 3: Familiarize Yourself with the API Documentation
Refer to the official documentation for the API you are using to understand the available endpoints, request formats, authentication requirements, rate limits, and response structures.

Step 4: Set Up Your Development Environment
Programming Language: Pick a programming language to use (Python, JavaScript, Ruby, etc.)
HTTP Client: Install an HTTP client (like requests for Python or axios for JavaScript) to make API calls.
Step 5: Authenticate with the API
Authentication methods may vary by provider, but most use OAuth 2.0 or API keys. Example (using Python requests):

CopyReplit
import requests

API_KEY = 'YOUR_API_KEY'

# Example API Request
url = 'https://api.video-hosting.com/videos'
headers = {
'Authorization': f'Bearer {API_KEY}',
}
response = requests.get(url, headers=headers)
Step 6: Upload a Video
Check the API documentation for the endpoint used to upload videos. Here’s a generic example:

CopyReplit
video_file = {'file': open('path/to/video.mp4', 'rb')}
response = requests.post('https://api.video-hosting.com/upload', headers=headers, files=video_file)
print(response.json())
Step 7: Manage Video Metadata
Once the video is uploaded, you may need to set metadata (like title, description, tags) using the appropriate endpoints:

CopyReplit
video_id = 'uploaded_video_id'
metadata = {
'title': 'My Video Title',
'description': 'This is a description of my video.',
}

response = requests.put(f'https://api.video-hosting.com/videos/{video_id}', headers=headers, json=metadata)
print(response.json())
Step 8: Retrieve Analytics and Video Data
To extract analytics or video data, use the corresponding GET endpoints:

CopyReplit
response = requests.get(f'https://api.video-hosting.com/videos/{video_id}/analytics', headers=headers)
analytics_data = response.json()
print(analytics_data)
Step 9: Handle Errors and Rate Limiting
Make sure to handle errors (like 4xx and 5xx status codes) gracefully and implement backoff strategies for rate limits.

Step 10: Integrate and Test
Once you've implemented the necessary API calls, test them thoroughly. Ensure that video uploads, updates, and data retrieval are working as intended.

Resources
API Documentation: Always refer to the provider's official API documentation for specific details about endpoints, request/response structures, and limitations.
SDKs or Libraries: Some providers offer SDKs that can simplify interaction with their APIs.
 
To use a Video Hosting API, follow these steps:

1. Get API Key: Sign up with a video hosting provider and obtain your API key.
2. Integrate API: Use the API to upload, manage, and retrieve videos by making HTTP requests (GET, POST, etc.).
3. Authentication: Pass your API key in headers or parameters for authorization.
4. Follow API Documentation: Each API has specific endpoints for uploading, fetching video URLs, and managing content. Refer to the provider's documentation for detailed instructions.

This allows you to manage video hosting programmatically.
 
1. Look for API documentation on the video hosting platform. They usually provide details on how to authenticate and access resources (like video files) programmatically.
2. Most APIs require authentication through API keys or tokens. Make sure to get your API credentials from the hosting services and include them in your requests.
3. Once authenticated, you’ll want to fetch the list of your videos and their corresponding embed codes using API calls. You can write a script to automate the fetching of the embed code for each video and automatically place it in your website's video player.
4. If you don’t want to rely on iframe embeds, you could use a custom video player (like Video.js) and fetch the direct video URLs through the API. This way, your website would stream the videos directly from the hosting provider, without the need to manually embed each iframe.
5. If the API allows bulk operations, you can use it to embed multiple videos at once, saving time compared to manual embedding.
 
Back
Top