The fastest way to fill a tube site is to bulk import videos rather than upload them one at a time. The usual sources are CSV spreadsheets, XML or RSS feeds from content partners, files dropped into an FTP folder, and lists of hotlinked MP4s or embed codes. Each method needs the same core data: a title, the video itself (a file, a URL or an embed), and ideally a description, tags, categories, duration and a thumbnail.
Choosing an import method
| Method | Where the video lives | Best for | Trade-offs |
|---|---|---|---|
| Downloaded URL | Your server, after encoding | Licensed files you are allowed to host | Uses your CPU, disk and bandwidth |
| FTP folder | Your server, after encoding | Large batches of your own files | Needs metadata added after import |
| Hotlinked MP4 | The partner's server | Partner programmes that host files for you | Playback depends on their uptime; files can disappear |
| Embed code | The partner's player | Partners that only allow their own player | Less control over player, ads and speed |
Many sites mix methods: encode and host their best content, and use embeds or hotlinks to broaden the library. Always check that your agreement with the content source allows the method you use.
CSV imports
A CSV is a spreadsheet saved as plain text, one video per row. Typical columns are:
- title: required.
- description: a sentence or two, ideally original.
- tags, categories, models: comma-separated lists.
- duration: in seconds or
mm:ss. - url, hotlink_url or embed: how to get the video.
- thumb: a thumbnail image URL, mainly for hotlinks and embeds.
- external_id: the source's own ID, used to avoid importing the same video twice.
- publish_at: an optional release date.
Common pitfalls:
- Encoding. Save as UTF-8, or accented characters turn into garbage.
- Delimiters. Some spreadsheet programs save with semicolons in some locales. Tell the importer which delimiter you used.
- Commas inside fields. Lists like tags contain commas, so the field must be wrapped in double quotes. Spreadsheet programs do this automatically when saving as CSV.
- Header row. Make the column names match exactly what the importer expects, or map them explicitly.
XML and RSS feeds
Content partners and affiliate programmes often publish a feed URL that lists available videos. XML feeds usually use one element per video with child elements for title, description and so on. RSS 2.0 feeds with the Media RSS extension put the video URL and thumbnail in media:content and media:thumbnail elements. Points to check:
- Whether the feed gives a downloadable file, a hotlink or an embed code.
- How categories are named, and how they map onto your own category list. Clean mapping matters for niche sites; see the niche strategy guide.
- Whether the feed has stable IDs, so a re-import updates rather than duplicates.
- How often the feed changes, and whether old items are removed when the partner withdraws them.
FTP folder imports
For large batches of your own files, uploading through a browser is slow and fragile. Instead, upload the files with an FTP or SFTP client into a drop folder on the server, and let the script pick them up, encode them and create draft entries. You then add titles, tags and categories in the admin, or import a CSV that matches the filenames. Use a reliable transfer client that resumes interrupted uploads.
Hotlinks and embeds: extra care
Hotlinked files and embeds are quick, but you depend on someone else's server. Check them periodically for dead links, and remove or replace videos that no longer play. Embedded players may carry the partner's own branding and ads. Hotlinked MP4s should be served over HTTPS, or browsers will block them on your HTTPS pages.
Before you import thousands
- Run a test with ten rows and check every field landed where you expected.
- Import as drafts or with future publish dates, then release on a schedule instead of all at once; see drip-feed publishing.
- Rewrite feed titles and descriptions where you can. Thousands of sites receive the same feed text; see avoiding duplicate content.
- Keep a record of the source and licence for each batch, in case of a DMCA takedown or question about rights.
How Tube Site Script imports videos
Tube Site Script imports from CSV, XML and RSS 2.0 with Media RSS, an FTP drop folder, single URLs, hotlinked MP4s and embed codes, from the admin or the command line (import:csv, import:xml, import:ftp, import:file). Columns and XML elements are title (required), description, tags, categories, models, duration (seconds, mm:ss or PT12M5S), url, hotlink_url, embed, thumb, external_id, publish_at and vr. The CSV importer accepts a custom delimiter and column list, and imports can set a status.
Downloaded and FTP files are encoded by ffmpeg into your chosen qualities, with thumbnails and previews. Everything lands in the shared library, and each site in your network then shows it according to its own rules and schedule. See the PHP tube script features and pricing.
Frequently asked questions
What is the difference between a hotlink and an embed?
A hotlink plays the partner's MP4 file in your own player, while an embed shows the partner's own player in an iframe. Neither stores the video on your server.
Why do accented characters break in my CSV import?
The file was probably saved in a legacy encoding. Save it as UTF-8 from your spreadsheet program and import again.
How do I avoid importing the same video twice?
Include the source's own ID in an external ID column. The importer can then recognise videos it has already seen.
