Two ways to host your lessons
Most course creators want one of two things. Either you want to upload a lesson and paste it into your course page, and never think about servers. Or you want full control: several quality levels, your own encryption keys, your own rules about who may watch. Both work here, and the rest of this page helps you pick.
| You want | Upload to the video library | Run your own streaming server |
|---|---|---|
| Getting started | Export an MP4, upload, copy the embed code | Install and configure the packaging yourself |
| Quality levels | One: the file exactly as you exported it | As many as you encode |
| Where students stream from | The nearest of 5 cities | The city your server sits in |
| Data allowance | Monthly transfer included in the plan | None: the port is unmetered |
| Locking lessons down | Ask in the chat what fits before you order | Anything you build: keys, tokens, logins |
What a student's player expects from your files
HLS (HTTP Live Streaming) is the format almost every phone, tablet and browser player understands. It chops each lesson into small chunks and lets the player step down to a lighter version when the student's Wi-Fi struggles. Apple's authoring specification for its devices sets the house rules, and other players follow the same conventions:
- An IDR frame (a full picture the player can start from) every two seconds, so jumping to minute 14 of a lecture is instant.
- Chunks nominally six seconds long, each beginning on one of those full frames.
- More than one bitrate, so the stream keeps going on a weak connection. Apple suggests making the 2,000 kbit/s version the one players start on.
- H.264 video for the widest compatibility, with stereo AAC sound.
- For recorded lessons, a playlist marked as VOD, so players know the video is complete.
Apple's sample ladder for 16:9 H.264 starts at 145 kbit/s for a tiny 416x234 picture, puts 540p at 2,000 kbit/s, 720p at either 3,000 or 4,500, and tops out at 7,800 kbit/s for 1080p. Apple is clear that these are first targets to test against your own footage. A presenter in front of slides needs much less than a football match.
How much data will your students use?
Every student-hour costs bitrate x 3,600 seconds of data, divided by 8 to turn bits into bytes. At 2,000 kbit/s that is 0.9 GB per hour; at 4,500 kbit/s, about 2 GB; at 7,800 kbit/s, about 3.5 GB. From there your month is one multiplication.
| Your course | Watching per month | Average quality | Data per month |
|---|---|---|---|
| Small cohort, 150 students | 8 hours each | 2,000 kbit/s (540p) | about 1.1 TB |
| Busy course, 800 students | 15 hours each | 4,500 kbit/s (720p) | about 24 TB |
| Large catalogue, 3,000 students | 20 hours each | 7,800 kbit/s (1080p) | about 210 TB |
Also count the busiest moment, not just the month. If 200 students open the same lesson the night before an exam at 4,500 kbit/s, that is 900 Mbit/s leaving the server at once. Our video library plans size this for you: Starter comes with 10 TB a month and room for 1,000 simultaneous viewers, Pro raises that to 100 TB and 5,000, and Platinum to 500 TB and 25,000.
Getting a lesson online in an evening
The library plays your file exactly as you made it. Nothing is converted, so the quality you saw in your editor is the quality your students get, and a file that matches the sheet below plays exactly as you uploaded it. Here is the routine:
- Export the lesson as an MP4 with H.264 video (Baseline, Main or High profile, 8-bit colour with 4:2:0 sampling, no larger than 1920x1080 and 60 fps) and AAC-LC sound at 44.1 or 48 kHz. Most editors do this by default; the ffmpeg line below does it from the command line.
- Upload it to your library. You get 50 GB of room on Starter, 200 GB on Pro and 2 TB on Platinum, and a single file can be up to 100 GB.
- Copy the file's embed code and drop it into your course platform's lesson, in whichever block takes embed HTML.
- Pro and Platinum players show no Primcast name, so your students only see your brand.
ffmpeg -i module2-recording.mkv -vf "scale='min(1920,iw)':-2,fps=30" -c:v libx264 -profile:v main -pix_fmt yuv420p -force_key_frames "expr:gte(t,n_forced*2)" -c:a aac -ar 44100 -movflags +faststart module2.mp4
Because the library keeps your file as it is, each lesson streams at a single quality. Choose it with your students in mind: if many watch on phone data, a 720p export at a modest bitrate travels further than a heavy 1080p one.
Can students download your lessons?
Honestly: anyone who can watch a video can, with enough effort, record it. What you can prevent is the easy copy, the kind that takes one click or one shared link. These are the tools, from simplest to strongest:
- Links that expire. Apple's specification asks that chunk URLs not stay fixed forever, but be handed out per device or rotated as time passes. Add a signed token that runs out after the student's session, and a link pasted into a forum stops working.
- Encrypted chunks. The HLS standard (RFC 8216) supports AES-128: every chunk is scrambled, and the player fetches the 128-bit key from an address named in the playlist. Only hand that key to students who are signed in to your course.
- Checking where requests come from. Refuse requests that do not come from your course website. Headers can be faked, so treat this as a speed bump.
- Full DRM. For high-value content, Apple points to FairPlay Streaming. It is the strongest option and also the most work.
Every library file gets a player and an embed code of its own, and you decide where they appear. If your course needs more than that, such as sign-in checks on every lesson, write to us in the chat before you order and we will tell you what fits.
When you want a server of your own
You outgrow a shared library when you need several quality levels per lesson, your own key server, 4K or HEVC, or viewing hours with no transfer meter running. Then a dedicated streaming server is the natural next step: a whole machine on an unmetered port, 1 Gbps included and up to 100 Gbps, in Amsterdam, Bucharest, New York, Miami or San Francisco. At 6 Mbit/s per viewer, keeping 20% of the port spare, 1 Gbps serves about 133 students watching 1080p at the same moment. Wowza, Nimble Streamer, Flussonic or Cue can be installed on request, or you install your own tools.
With ffmpeg alone you can turn one master file into a two-level encrypted HLS lesson. The hls_enc option encrypts every chunk with AES-128. hls_enc_key_url writes the address of your key server into the playlist, so players ask your course for the key and your course checks the student is signed in. Never upload the .key file beside the chunks.
ffmpeg -i module2.mp4 -filter_complex "[0:v]split=2[x][y];[x]scale=960:540[lo];[y]scale=1280:720[hi]" -map "[lo]" -map "[hi]" -map 0:a -map 0:a -c:v libx264 -force_key_frames "expr:gte(t,n_forced*2)" -b:v:0 2000k -b:v:1 4500k -c:a aac -b:a 96k -f hls -hls_time 6 -hls_playlist_type vod -hls_enc 1 -hls_enc_key_url https://your-course.example/keys/ -master_pl_name module2.m3u8 -var_stream_map "v:0,a:0 v:1,a:1" module2_%v.m3u8
A single server streams from one city. If your students are spread across continents, the library's five cities may serve them better, or you can spread servers across several of our data centers.
Questions people ask
- Is a video library or my own server better for a first course?
- For a first course, the library is usually the easier start: you export, upload and paste an embed code, and delivery from five cities is handled for you. Your own server pays off once you want several quality levels, your own encryption keys or viewing without a monthly transfer allowance.
- Which video settings should I export my lessons with?
- Export H.264 in an MP4 with AAC sound, and force a full frame every two seconds. For a presenter and slides, 720p is plenty; for screen recordings with small text, 1080p keeps it readable. Use Apple's ladder figures as a starting point and check the result on a phone.
- Can I put the videos inside my LMS?
- Yes. Every file in the library has its own embed code, and Pro and Platinum players carry no Primcast name. Paste the code into any lesson block that accepts embed HTML, and make sure your platform permits embedded frames from the video's address.
- How do I work out the transfer I need each month?
- Multiply your students by the hours each one watches, then by the data per hour at your bitrate (0.9 GB at 2,000 kbit/s, about 2 GB at 4,500 kbit/s). 500 students watching 10 hours at 2,000 kbit/s comes to about 4.5 TB a month.
- Does encryption make my course videos impossible to copy?
- No method does that, because screen recording always exists. AES-128 chunks plus expiring links mean a link pasted elsewhere stops working and the chunks alone cannot be played without the key, which stops the easy, one-click kind of sharing. DRM such as FairPlay raises the bar further at a higher cost.