Embed code html to play rtmp stream with additional attributes? - html

does any one know the way to play, rtmp stream with attributes embded on a website?
Also if i have:
rtmp://$OPT:rtmp-raw=rtmp://xx.xx.xx.xx/live?idp=4050/rer_835660 playpath=rofl swfUrl=http://www.somewww.com/tv/swf/player.swf?file=redtofile&autostart=true&/2/3 live=1 pageUrl=http://www.somewww.com/tv/get_file.php
the real rtmp link is:
rtmp://xx.xx.xx.xx/live?idp=4050/rer_835660/rofl
some of rtmp will play if there is no token for swf player protection. That is why i need swfUrl and pageUrl added and sometimes Decrypt option.
Is it even possible? I know that vlc have some issues with playing such as url's.
//edit:
I know that my link does play in SimpleTV but i have to get it every time it changes. I have written php script so it fetches actual link for me as soon as I open my webpage. So i know its correct.
Just need to find way to play it, with anything, except SimpleTV.
Preferably Embed code for website, normal rtmp links i play via vlc plugin, but it does not support such as long rtmp links, example shown above. I might be wrong? That might be me could phase or construct correctly rtmp link.

Related

Load only audio from youtube in as3

Is it possible to load only the audio from YouTube into my AS3 flash custom player through youtube AS3 api?
I want to load it into a sound object and then assign it to a sound channel.
I would like to know if there is an "official" way to do this, I'd like to avoid improvising (like loading the whole stream and then use only the audio).
Thank you.
I suggest you read the YouTube terms of service carefully:
https://developers.google.com/youtube/terms
In particular, you may not "promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API".
Doing so in any way (such as moving the video off stage) is likely to have your site blocked for playbacks by YouTube for breach of terms of service.
NB: YouTube manages to provide the service it does through advertising on top of video content. Separating the content like this prevents YouTube from making any money from the service it is providing.
If you use it for private usage, its okay I guess.
After some research work with different APIs and libraries and researching source code, I just tried it by myself and wolla.
Just saying, audio only links are in the page source of each video.
You just have to know what you are looking for ;)
Open a youtube video, view page source and search for "mime%3Daudio". There should be 5 matches, full url for example:
"https%3A%2F%2Fr2---sn-35cxanpbo5a-8pxl.googlevideo.com%2Fvideoplayback%3Fsource%3Dyoutube%26signature%3D30EC556F55533FBFD9003767730D10556681F33A.B12E021CA54CCB9E225F58A4430E9BB528081FB5%26requiressl%3Dyes%26expire%3D1527306011%26clen%3D3064602%26initcwndbps%3D1152500%26ipbits%3D0%26mime%3Daudio%252Fmp4%26dur%3D192.911%26fvip%3D5%26lmt%3D1524946334873350%26key%3Dyt6%26sparams%3Dclen%252Cdur%252Cei%252Cgir%252Cid%252Cinitcwndbps%252Cip%252Cipbits%252Citag%252Ckeepalive%252Clmt%252Cmime%252Cmm%252Cmn%252Cms%252Cmv%252Cpl%252Crequiressl%252Csource%252Cexpire%26itag%3D140%26gir%3Dyes%26ip%3D81.217.53.239%26id%3Do-ALNxMeQYw4LLc1FAjxt4h795wKTdqJnzc_SBgzEJVBxR%26c%3DWEB%26keepalive%3Dyes%26mm%3D31%252C29%26mn%3Dsn-35cxanpbo5a-8pxl%252Csn-2gb7sn7r%26ei%3Du4IIW7DfC46rgAfrrpnICw%26ms%3Dau%252Crdu%26mt%3D1527284230%26pl%3D16%26mv%3Dm"
Just decode URL and you got what you want.

Flash and "206 partial conent" http status code

I use JWPlayer to play videos from the server. Videos are encoded using h.264 codec. If i open them in browser with h.264 support - video plays nicely and i can seek it, because server returns 206 header browser understands that its partial content. But if i try to play same video on Opera, for example, flash player is being used and it receives 200 OK! 2 problems here:
I can't seek the video, until part of it is downloaded
If the video is not "properly" encoded player can't even start playing it, until file is fully downloaded.
Is there something wrong with flash properly asking/understanding http headers?(i've never worked with flash before, so maybe my question is a bit silly and i just don't know flash's limitations)..
1) You need to have pseudo streaming enabled, for Flash - http://www.longtailvideo.com/support/jw-player/28855/pseudo-streaming-in-flash, if you can provide a link though, I will take a look at exactly what is going on here, I am more or less guessing about this one. HTML5 does not require a pseudo streaming module to be installed on the server side, though. In Flash, the default is progressive download, so you can only seek to downloaded parts, and in html5, this is not the case.
2) Yes, that is because of encoding. If your MP4 files cannot be seeked before they are completely downloaded, you will have to fix the MOOV atom (it contains the seeking information) located at the end of your video. Use this little application to parse your videos and add the necessary cue points - http://renaun.com/blog/2010/06/qtindexswapper-2/
Also, encoding via HandBrake - http://handbrake.fr/, can fix this as well, so the above tool wouldn't be necessary. You can encode using HandBrake, and enable "web optimized", which does the same this as the Index Swapper Tool. HandBrake also has command line encoding options as well.

Is it possible to play HTTP Live video on a browser? 2012

I was wondering if it is possible to stream to the user HTTP Live video. NOT a video file.
LIVE video. Using any technology. Flash or HTML5. I did some research and most of the players I found support live streaming but most of them mean youtube-like style streaming, where you can click further in the video and get the video loading. I am talking about LIVE video, happening the same time the user watches the video.
I got the incoming HTTP packets, stored in a file called "current_frame.h264". This files gets updated as the packets come in. It does NOT grow in size, just get updated. (stays at around 17-20kb). Now I want to take this file and show it on a browser. Anybody can help me out?
Apple developed something like that a while ago: https://developer.apple.com/streaming/
All you need is a webserver and a HTML5 enabled webpage.
With this technology you also have the ability to stream different quality files based on the connection (mobile usage for example)
https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html

Playing Uploaded Videos or embed youtube videos

I'm creating a Content Management System that allows the content manager to upload videos to the server. There will be a list of pages and each one will have a video on it. Each video should then be able to be played by the content observer.
Problem: I can get some videos to play, but I cannot get all of them to play and I don't know why. How do I force the content manager to upload only videos that work or convert videos that do not work? I've used embed, object, iframes, and videos tags, but I can't to get any of them to work all the time. This link is what I have tried. http://ww.w3schools.com/html/html_videos.asp
Alternative Solution: Just make the content manager upload videos to youtube, then put the embed code in the database and call for it when you need it. This works but the code does not validate when you do this which is bad for SEO. Also, if the content manager does not do it correctly he could be advertising for the competition because the video can show links to other videos when it is done.
It is hard. In our CMS you need verify the content, probably in a async procedure, and reject the video if there is something wrong. The most important is choose a good set of formats and codecs (and other characteristics like Frames Per Second, Audio Bitrate, etc) and make this "contract" something very explicit. ffmpeg with -i option can identify the video, extension, codec, length, aspect-ratio, etc.
You also try to convert from any format to one good format like mp4 h264 with 360p.

How do I embed wmv/mpg/avi/mov/etc videos reliably?

I am trying to embed video files (wmv, mpg, avi, mov, etc.) dynamically by creating embed elements in javascript. The problem I am running in to is this has not been very reliable across all browsers and even if it does work, there is no guarantee that the end user has the required plugin to play the video. Ideally, I would convert everything to flv or an HTML5 video format but this is not currently possible due to cpu/disk space restrictions (these are videos uploaded by the end user, not me). I feel like this shouldn't be as difficult as it has presented itself to be - does anyone have any suggestions?
To the day VLC release a browser plug-in, the best way is to convert them to .FLV or .MP4 files server side. And use a free Flash video player for the playback (I mean HTML5 with Flash fallback).
If you do not want to convert those videos, let the end user directly download the files. And deal with the problem of multiple video format himself.
edit:
Or you could move your website out of the HTML browser, and build a desktop software, that can take charge of all those videos format, client side.
edit2:
Use Youtube API or any other already existing video hosting services. Personally I will avoid this solution.
The only way to do it reliably is with flash. Use ffmpeg to convert incoming videos to .FLV and use a flash player.