Audio stream problem
#1

Hello guys, I'm using FuNkYTheGreat's method for converting ******* video, but when I enter an ******* video it just appear:
Quote:

Audio stream: http://

Here is the code:
PHP код:
forward Request*******2Mp3( playerid, response_code, data[ ] );
public 
Request*******2Mp3( playerid, response_code, data[ ] )
{
    if( 
response_code == 200 )
    {
        new
        
start_pos = strfind( data, "\"url\":" ) + 9,
        
end_pos = strfind( data, "\"", .pos = start_pos ),
        
mp3_coverted_link[700 ];
        
strmid( mp3_coverted_link, data,start_pos,end_pos );
        
format( mp3_coverted_link, sizeof( mp3_coverted_link ), "http://%s", mp3_coverted_link );
        
PlayAudioStreamForPlayer( playerid, mp3_coverted_link );
    }
    else 
SendClientMessage( playerid, -1, "Couldn't play the song!!!" );
    return 
1;
}
stock Play*******Audio( playerid, video_link[ ] )
{
    new
    
param_v_idx = strfind( video_link, "?v=" ) + 3,
    
video_id[ 500 ],
    
payload[ 500 ];
    
strmid( video_id, video_link, param_v_idx, strlen( video_link ) );
    
format( payload, sizeof( payload ), "www.yt-mp3.com/fetch?v=%s&apikey=1234567", video_id );
    
HTTP( playerid, HTTP_GET, payload, "", "Request*******2Mp3" );
    return 
1;
} 
And here I'm using it:
PHP код:
for(new i = 0; i <= MAX_PLAYERS; i++)
            {
                if(
IsPlayerConnected(i))
                {
                    
StopAudioStreamForPlayer(i);
                    
Play*******Audio(i, "https://www.youtube.com/watch?v=3QYCqHwlsw4&list=RDMM4NJlUribp3c&index=9");
                }
            } 
Reply
#2

Any help?
Reply
#3

You can't stream ******* video's. You can only steam .mp3 files. Convert the ******* into .mp3 with yt downloader and then upload them to a webserver. for example:
try this: http://losangeles-roleplay.com/ambience/larpintro.mp3
It will work.
If you don't have a webserver i can upload them to mine for you. Send me a PM if needed.
Reply
#4

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
You can't stream ******* video's. You can only steam .mp3 files. Convert the ******* into .mp3 with yt downloader and then upload them to a webserver. for example:
try this: http://losangeles-roleplay.com/ambience/larpintro.mp3
It will work.
If you don't have a webserver i can upload them to mine for you. Send me a PM if needed.
It's not mandatory! There is a way to convert it automaticly using http include, because I know it needs to be converted (not only .mp3 files)!
Is there anybody, who can work with http include, PLEASE HELP?
Reply
#5

Same Problem Kraeror.
Anyone can help ?
Also i tried to click on despitso and its still showing http://
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)