MaxCDN Support: Tutorial
Connect to VOD Zone
Updated
January 23, 2015
To connect to your VOD Zone to upload files, please follow these steps:
VOD Zone Upload Instructions
- Use FTP port 21 or SFTP port 22 from any upload program
- For new video uploads, it can take up to 1 hour for your video to be viewable from all locations.
- HOSTNAME = ftp.ZONENAME.ALIAS.netdna-cdn.com
USERNAME = ZONENAME.ALIAS - VOD Zone files can be directly downloaded or streamed through RTMP, RTMPT or RTSP
-
RTMP (Over port 1935) or RTMPT (Over port 80) Setup
URL = url: 'vod/ZONENAME.ALIAS/filename' netConnectionUrl: 'rtmp://r.ZONENAME.ALIAS.netdna-cdn.com/play'
-
RTSP Setup
URL = url: 'rtsp://d.ZONENAME.ALIAS.netdna-cdn.com/play/_definst_/vod/ZONENAME.ALIAS/filename'
-
iPhone Streaming
http://d.ZONENAME.ALIAS.netdna-cdn.com/play/_definst_/vod/ZONENAME.ALIAS/filename/playlist.m3u8
-
PSEUDO Streaming
clip: { url: 'http://p.ZONENAME.ALIAS.netdna-cdn.com/vod/ZONENAME.ALIAS/filename', provider: 'lighttpd' }
Important Note:
For RTMP(T,TE) and iPhone streaming if filename = an mp4 variant then add “mp4:” before “vod” in path name
-
RTMP (Over port 1935) or RTMPT (Over port 80) Setup
Custom upload scripts – short examples
-
Python – using pysftp
-
Install pysftp:
$ sudo pip install pysftp
-
Create upload script:
# Example local file to upload remote_file = 'test.txt' srv = pysftp.Connection(host="ftp.ZONE.ALIAS.netdna-cdn.com", username="ZONE.ALIAS", password="your_ftp_password") srv.put(remote_file) srv.close()
-
Install pysftp:
-
Ruby – using net-sftp
-
Install net-sftp:
$ sudo gem install net-sftp
-
Create upload script:
require 'net/sftp' Net::SFTP.start('ftp.ZONE.ALIAS.netdna-cdn.com', 'ZONE.ALIAS', :password => 'your_ftp_password') do |sftp| sftp.upload!("test.txt", "/test.txt") end
-
Install net-sftp:
-
PHP – using sudo libssh2-php
-
Install libssh2-php:
$ sudo apt-get install libssh2-php
-
Create upload script:
<?php $server = 'ftp.ZONE.ALIAS.netdna-cdn.com'; $port = '22'; $username = 'ZONE.ALIAS'; $passwd = 'your_ftp_password'; $connection = ssh2_connect($server, $port); if (ssh2_auth_password($connection, $username, $passwd)) { $sftp = ssh2_sftp($connection); echo "Connection status: OK. Uploading file!"."n"; $file = 'test.txt'; $contents = file_get_contents($file); file_put_contents("ssh2.sftp://{$sftp}/{$file}", $contents); } else { echo "Nope! Can not connect to server!"."n"; } ?>
-
Install libssh2-php: