EN
← back

FILEDITCH EMBEDDING

Your videos on any website

Every .mp4 uploaded here can play on your own website, in our player, with one line of HTML: the Embed box on its FileDitch page has the code, ready to copy. Your visitors see a play button and nothing heavy loads until they press it; then their browser passes a short automatic check (no captcha) and the video starts.

No limits. Embed as many videos as you like, on as many sites as you like: there is no cap on plays, viewers or bandwidth, and FileDitch handles any amount of traffic, from a small blog to a site with millions of visitors.

Adult videos are allowed. Porn and other adult videos can be embedded like any other video, as long as they are legal: everyone in them is 18 or older.

At most one ad every 15 minutes. A click in the player opens a popunder ad, at most once every 15 minutes per visitor. No banners over your video, no ads before it starts: that is what pays for unlimited embedding.

Or no ad at all. Videos of a premium account on the No ads or Hotlink plan play without the popunder.

Quick start The embed code What your visitors see Before you upload: encode it properly Questions and answers

Quick start

  1. Encode the video properly: an MP4 with H.264 video and AAC sound, as the checklist below says. It takes one command.
  2. Upload it on new.fileditch.com, like any other file.
  3. Open the file's page (the link you get after the upload) and copy the code from the Embed box under the video.
  4. Paste the code into the HTML of your page, where the video should go. That is all.

The embed code

The Embed box on the file's FileDitch page has this code, ready to copy. Or write it yourself: take the address of the file's FileDitch page (not a theditch.st short link) and put embedditch.st in place of its domain (fileditchvids.st, itsfileditchfiles.st, fileditchfiles.st or fileditchfiles.me):

<iframe src="https://embedditch.st/alpha27/a3f9c1b2d4e5f6071829/yourfile.mp4" style="width:100%;aspect-ratio:16/9;border:0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen loading="lazy" title="FileDitch video"></iframe>

aspect-ratio works in every browser from 2021 on. To support older ones too, put the player in a 16:9 box instead:

<div style="position:relative;padding-top:56.25%"><iframe src="https://embedditch.st/alpha27/a3f9c1b2d4e5f6071829/yourfile.mp4" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen loading="lazy" title="FileDitch video"></iframe></div>

Opening an embed link on its own, in a browser tab, takes you to the file's FileDitch page.

What your visitors see

A poster frame of your video with a play button. Nothing else loads until the visitor presses play, so a page with many videos stays fast.

When they press play, their browser passes a short automatic check (no captcha, nothing to click), then the video plays in our player, with fullscreen and picture-in-picture.

That first click also opens one popunder ad, at most once every 15 minutes per visitor. There are no banners over the video and no ads before it.

Videos of a premium account on the No ads or Hotlink plan play without the popunder.

The player speaks your visitor's language: it follows their browser.

If the file is gone, the player says so instead of playing (see the questions below).

Before you upload: encode it properly

This is the part people skip, so we say it plainly. The player plays your file exactly as you uploaded it and cannot repair it: a video that stutters, seeks slowly or shows a black picture on an iPhone will do the same on your site, in front of your visitors. Fixing it later means a new upload, so a new link and a new embed code on every page that has the old one. Get the file right once, before you upload it:
  1. MP4 only. The player takes .mp4 files and nothing else: convert a MOV, MKV or WebM first (renaming the file does not count).
  2. H.264 video, High or Main profile, 8-bit 4:2:0 (yuv420p). The one video format every browser and every phone plays. Not HEVC (H.265, x265), not AV1, not VP9, not 10-bit.
  3. AAC audio, stereo. Plain AAC (AAC-LC) with two channels sounds the same everywhere; AC-3, DTS, Opus or FLAC inside an MP4 is silent in some browsers.
  4. Faststart. The index (moov) at the front of the file, so playback starts at once instead of after a trip to the end of the file.
  5. A keyframe at least every 2 seconds. A player can only start decoding at a keyframe, so every seek, and every resume, first loads everything from the keyframe before it. Encoders space them up to about 10 seconds apart by default.
  6. A capped bitrate. About 6 Mbit/s at most for 1080p (8 at 50 or 60 fps). Your visitors watch on phones and busy Wi-Fi: a 30 Mbit/s export only buffers. No 4K: scale it down to 1080p.
  7. Constant frame rate. Phone and screen recordings often have a variable frame rate, which makes browsers stutter and the sound drift.
  8. Even width and height. H.264 needs both divisible by 2. Screen recordings are often odd (say 1365×767), and ffmpeg then stops with “width not divisible by 2”.
  9. No HDR. HDR video (iPhones, newer Android phones) comes out pale or with wrong colours once it is converted for the web. Turn it off before you record: on an iPhone, Settings → Camera → Record Video → HDR Video.

The embed-ready command

This one command covers the list, apart from HDR (fix that at the camera) and a variable frame rate (see below the command). It keeps your video's size if the shorter side is 1080 pixels or less (rounded to even numbers) and scales anything bigger down to 1080p, portrait videos included:

ffmpeg -i input.mp4 -vf "scale='if(gte(iw,ih),-2,min(1080,trunc(iw/2)*2))':'if(gte(iw,ih),min(1080,trunc(ih/2)*2),-2)'" -c:v libx264 -preset medium -crf 21 -maxrate 6M -bufsize 12M -pix_fmt yuv420p -profile:v high -force_key_frames "expr:gte(t,n_forced*2)" -c:a aac -b:a 160k -ac 2 -movflags +faststart output.mp4

At 50 or 60 fps, raise the cap with -maxrate 8M -bufsize 16M. For a recording with a variable frame rate, add -fps_mode cfr -r 30 (or -r 60) just before output.mp4; ffmpeg older than 5.1 wants -vsync cfr instead of -fps_mode cfr.

How to check what is inside a file, a quicker fix for a file that is already H.264 and AAC, and the HandBrake settings: see the encoding guide.

The quick test: if the video starts at once and seeks smoothly on its own FileDitch page, on a computer and on a phone, it will play embedded too. If it does not play there, embedding will not fix it.

Questions and answers

Is it free?

Yes. Embedding costs nothing and needs no account. The popunder, at most one per visitor every 15 minutes, is what pays for it.

Videos of a premium account on the No ads or Hotlink plan play without the popunder.

Are there limits on plays, viewers or traffic?

No limits. Embed as many videos as you like, on as many sites as you like: there is no cap on plays, viewers or bandwidth, and FileDitch handles any amount of traffic, from a small blog to a site with millions of visitors.

Can I embed porn or other adult videos?

Adult videos are allowed. Porn and other adult videos can be embedded like any other video, as long as they are legal: everyone in them is 18 or older.

Which files can I embed?

Any .mp4 file on FileDitch. Other video formats (MOV, MKV, WebM, AVI) cannot be embedded: convert them to MP4 first, renaming the file does not count. Pictures, music and other files cannot be embedded at all.

Do I need an account?

No. A video uploaded without an account embeds the same way.

Where do I find the embed code?

On the file's page: open the link you got after the upload and copy the code from the Embed box under the video. You can also write it yourself, as shown above.

Can I use a theditch.st short link?

Not in the embed code. Open the short link and use the address of the file's page it leads to.

Why not a <video> tag with the file's download link?

Download links are signed, expire after a while and only work on the network of the visitor who opened the file's page, so a direct link breaks on other sites. The player gets a fresh link for every visitor: use the iframe.

Where can I put the code?

Anywhere that accepts HTML: your own site, WordPress (paste it into a Custom HTML block), Blogger (the HTML view of a post), site builders with an HTML or embed block, and forums that allow iframes.

Does it work on Discord, Reddit or X?

You cannot put an iframe in a post there. Post the link to the file's FileDitch page instead.

Can the video start by itself?

No. It starts when the visitor presses play: that click also runs the automatic check that keeps bots out.

Can I set a start time, loop or mute the video?

No, the embed address takes no options. In the player, your visitors can seek, change the volume and go fullscreen.

How do I change the player's size?

The style in the code makes the player as wide as its column, at 16:9: change the width there, or put the iframe in a box of the size you want. For a vertical video, use aspect-ratio:9/16 and a max-width.

Does it work on phones?

Yes, in every modern browser, on phones and computers. Whether the video plays everywhere depends on the file: H.264 video with AAC sound plays on every device.

The video does not play, has no sound or shows a black picture

Almost always the file: HEVC (H.265) or 10-bit video, or AC-3, DTS or Opus sound inside the MP4. Check it as the encoding guide shows, encode it with the command above and upload it again. The quick test: if it does not play on its own FileDitch page, it will not play embedded either.

It stutters or takes long to seek

Usually keyframes too far apart, a bitrate that is too high or a variable frame rate. The command above fixes all three and adds faststart, so playback starts at once.

The player says "Video unavailable"

The address in your code is not the link of an .mp4 file on FileDitch. Check it for a typo, and that it ends in .mp4.

The player says "File unreachable"

The file was deleted, or cannot be reached at the moment. A deleted video does not come back: upload it again and use the new code.

The player says "Back in a bit"

A short maintenance or a busy moment on our side. There is nothing to change on your site: press Retry in the player, or try again in a few minutes.

The frame stays empty or the video never starts

Remove any sandbox attribute from the iframe, and any referrerpolicy="no-referrer". If your site sends a Content-Security-Policy, allow the player with frame-src https://embedditch.st.

Can I get rid of the ad?

Yes: videos of a premium account on the No ads or Hotlink plan play without it. You choose the plan on your account page; it covers the files in My files, the ones you upload while logged in or with your login token. Every other video keeps that one popunder: it pays for free, unlimited embedding. There are no banners over your video and no ads before it.

Does the player set cookies or track my visitors?

The player itself sets no cookies. It counts each play as a view of the file. The popunder comes from an ad network, which has its own rules.

Do plays count as views?

Yes, each play counts as one view of the file, just like a visit of its page. The Status API returns the view count of the file, plays included.

How long does an embedded video stay online?

As long as any other file on FileDitch: see how long files are kept.

Can I swap the video and keep the same code?

No. Every upload gets its own link, so a new upload means a new embed code on every page that has the old one. That is why it pays to encode the video properly before you upload it.

Something else?

Ask on Discord or on the contact page. To report a video, use the abuse page.