<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Vidlify Blog]]></title><description><![CDATA[Vidlify Blog]]></description><link>https://vidlify.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b0859cdbdac64c7dee4fd9b/11d37958-5ce2-4a32-9f00-279bff22f956.png</url><title>Vidlify Blog</title><link>https://vidlify.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 28 Nov 2026 21:32:48 GMT</lastBuildDate><atom:link href="https://vidlify.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why phone videos come out sideways in your video pipeline, and how to read rotation with ffprobe]]></title><description><![CDATA[Every video pipeline meets this bug sooner or later: someone uploads a video filmed upright on a phone, and somewhere along the way it turns sideways, gets…]]></description><link>https://vidlify.hashnode.dev/why-phone-videos-come-out-sideways-in-your-video-pipeline-and-how-to-read-rotation-with-ffprobe</link><guid isPermaLink="true">https://vidlify.hashnode.dev/why-phone-videos-come-out-sideways-in-your-video-pipeline-and-how-to-read-rotation-with-ffprobe</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[video]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Sat, 28 Nov 2026 13:14:47 GMT</pubDate><content:encoded><![CDATA[<p>Every video pipeline meets this bug sooner or later: someone uploads a video filmed upright on a phone, and somewhere along the way it turns sideways, gets squashed, or ends up with a thumbnail lying on its side. The pixels are fine. The problem is a small piece of metadata that some steps respect and others ignore.</p>
<p>I hit all of the variants while building the processing worker for a small video host, so here is what is going on and how to handle it reliably.</p>
<h2>Phones do not rotate the pixels</h2>
<p>A phone camera sensor is landscape. When you hold the phone upright, most phones still record landscape frames and add a note to the file that says "rotate this by 90 degrees when you show it". In MP4 and MOV files that note is a display matrix in the track header.</p>
<p>ffprobe shows the stored size, not the size people see:</p>
<pre><code class="language-bash">ffprobe -v error -select_streams v:0 -show_streams -print_format json upright.mp4
</code></pre>
<pre><code class="language-json">"width": 1920,
"height": 1080,
"side_data_list": [
  { "side_data_type": "Display Matrix", "rotation": -90 }
]
</code></pre>
<p>So a video that looks 1080 wide and 1920 tall on the phone reports itself as 1920 by 1080. If your code trusts <code>width</code> and <code>height</code>, it now thinks the video is landscape.</p>
<h2>Where it goes wrong</h2>
<p><strong>1. Planning sizes from the raw dimensions.</strong> If you pick quality levels or aspect ratios from <code>width</code> and <code>height</code>, a portrait video gets treated as landscape. You may build the wrong set of renditions, add black bars where none belong, or reserve a 16:9 player box for a 9:16 video.</p>
<p><strong>2. Copying without touching the metadata.</strong> <code>ffmpeg -i in.mov -c copy out.mp4</code> keeps the display matrix. Players that honor it show the video upright, anything that ignores it (some libraries that read frames directly, some older players and editors) shows it sideways.</p>
<p><strong>3. Turning auto rotation off.</strong> <code>-noautorotate</code> tells FFmpeg not to apply the rotation while decoding. Useful in special cases, but if you then re encode and the matrix gets lost, the output is permanently sideways.</p>
<p><strong>4. Filters that assume the wrong orientation.</strong> When FFmpeg auto rotates (the default), filters see the frame after rotation. So <code>scale=-2:720</code> on an upright phone video means 720 pixels tall in the upright picture, not the stored one. That is what you want, but only if the numbers you passed in were computed for the upright picture too.</p>
<h2>What FFmpeg does by default</h2>
<p>You can check all of this with a generated test file. Recent FFmpeg versions can set the rotation while remuxing with <code>-display_rotation</code>:</p>
<pre><code class="language-bash">ffmpeg -f lavfi -i testsrc=size=640x360:rate=30 -t 2 -c:v libx264 -pix_fmt yuv420p plain.mp4
ffmpeg -display_rotation 90 -i plain.mp4 -c copy rotated.mp4
</code></pre>
<p>Then compare three ways of processing it:</p>
<pre><code class="language-bash">ffmpeg -i rotated.mp4 -c:v libx264 auto.mp4                  # re encode, default
ffmpeg -noautorotate -i rotated.mp4 -c:v libx264 noauto.mp4  # re encode, no auto rotation
ffmpeg -i rotated.mp4 -c copy copied.mp4                     # no re encode
</code></pre>
<p>On FFmpeg 6.1 I get:</p>
<table>
<thead>
<tr>
<th>File</th>
<th>Stored size</th>
<th>Rotation metadata</th>
</tr>
</thead>
<tbody><tr>
<td>auto.mp4</td>
<td>360 x 640</td>
<td>none</td>
</tr>
<tr>
<td>noauto.mp4</td>
<td>640 x 360</td>
<td>90</td>
</tr>
<tr>
<td>copied.mp4</td>
<td>640 x 360</td>
<td>90</td>
</tr>
</tbody></table>
<p>The default re encode is the most robust result: the pixels are physically upright and there is no metadata left that a player could ignore. That is the main reason to transcode uploads instead of serving the original file.</p>
<h2>Reading the rotation correctly</h2>
<p>Two details make this annoying. Older FFmpeg builds expose the rotation as a <code>rotate</code> tag on the stream, newer ones as side data called Display Matrix with a <code>rotation</code> field. And the sign depends on the direction, so an upright phone video often reports <code>-90</code>.</p>
<p>This is the probe function from my worker, slightly shortened. It reads both places, ignores the sign, and swaps width and height for quarter turns so everything after it works with the size people actually see:</p>
<pre><code class="language-python">import json
import subprocess


def probe(path):
    out = subprocess.run(
        ["ffprobe", "-v", "error", "-print_format", "json",
         "-show_format", "-show_streams", str(path)],
        capture_output=True, text=True, timeout=120, check=True,
    ).stdout
    info = json.loads(out or "{}")
    video = next(
        s for s in info.get("streams", [])
        if s.get("codec_type") == "video"
        and not s.get("disposition", {}).get("attached_pic")  # skip cover art
    )

    width, height = int(video["width"]), int(video["height"])

    rotation = 0
    for side in video.get("side_data_list") or []:
        if "rotation" in side:
            rotation = abs(int(float(side["rotation"])))
    rotation = rotation or abs(int(float(video.get("tags", {}).get("rotate", 0) or 0)))

    if rotation in (90, 270):
        width, height = height, width

    return {"width": width, "height": height}
</code></pre>
<p>Two small things in there are worth copying even if you skip the rest. Skipping streams marked <code>attached_pic</code> avoids picking up the cover image some phones and audio files carry as a second "video" stream. And keeping the swap in one place means the code that plans renditions never has to know rotation exists.</p>
<h2>Picking sizes by the shorter side</h2>
<p>Once the dimensions are upright, plan quality levels by the shorter side instead of the height. A 1080 by 1920 portrait video is "1080p" in the same sense a 1920 by 1080 landscape video is, and scaling by the shorter side gives both the same treatment:</p>
<pre><code class="language-python">def scale_filter(width, height, target):
    # target is the shorter side, for example 720
    if width &gt;= height:
        return f"scale=-2:{target}"
    return f"scale={target}:-2"
</code></pre>
<p>The <code>-2</code> keeps the aspect ratio and rounds to an even number, which H.264 with yuv420p needs.</p>
<h2>Checklist</h2>
<ul>
<li>Never trust <code>width</code> and <code>height</code> from ffprobe without checking rotation.</li>
<li>Read both the Display Matrix side data and the old <code>rotate</code> tag.</li>
<li>Let FFmpeg auto rotate when you re encode, so the output has upright pixels and no rotation metadata.</li>
<li>Compute every size after swapping, and plan renditions by the shorter side.</li>
<li>Generate thumbnails from the processed file, not the original, so they are upright too.</li>
</ul>
<hr />
<p>I build <a href="https://vidlify.to/?ref=hashnode">Vidlify</a>, a free video and file host, and this is the part of its worker that turns phone uploads into upright HLS streams and a shareable MP4. If you want to see the result without writing any of it, upload a portrait phone video there and look at the player.</p>
]]></content:encoded></item><item><title><![CDATA[Three FFmpeg commands that look right and quietly do something else]]></title><description><![CDATA[All three of these commands run without an error. All three do something different from what the person who wrote them expected. I ran each one against a…]]></description><link>https://vidlify.hashnode.dev/three-ffmpeg-commands-that-look-right-and-quietly-do-something-else</link><guid isPermaLink="true">https://vidlify.hashnode.dev/three-ffmpeg-commands-that-look-right-and-quietly-do-something-else</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[Bash]]></category><category><![CDATA[video]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Sat, 28 Nov 2026 11:07:17 GMT</pubDate><content:encoded><![CDATA[<p>All three of these commands run without an error. All three do something different from what the person who wrote them expected. I ran each one against a small test setup to see exactly what happens.</p>
<p>Note: an AI assistant helped me run these tests and draft this post. Everything below was measured with FFmpeg 6.1.1 and bash on Linux.</p>
<h2>1. <code>-headers</code> with <code>\r\n</code> in double quotes</h2>
<p>A common pattern for HLS sources that need a Referer and a cookie:</p>
<pre><code>ffmpeg -headers "Referer: https://example.com/\r\nCookie: session=abc\r\n" -i https://example.com/index.m3u8 -c copy out.mp4
</code></pre>
<p>Inside normal double quotes, bash does not turn <code>\r\n</code> into a line break. FFmpeg receives a backslash, an r, a backslash and an n. To see what goes over the wire, I pointed FFmpeg at a small Python socket server on localhost that saves the raw request. FFmpeg prints <code>No trailing CRLF found in HTTP header. Adding it.</code> and sends one single header line:</p>
<pre><code>Referer: https://example.com/\r\nCookie: session=abc\r\n
</code></pre>
<p>The server never receives a Cookie header, so a stream that checks the cookie will reject the request even though the cookie is "in the command".</p>
<p>With bash's ANSI C quoting, the escapes become real CRLFs and both headers arrive separately:</p>
<pre><code>ffmpeg -headers $'Referer: https://example.com/\r\nCookie: session=abc\r\n' -i ...
</code></pre>
<p>For the Referer alone, <code>-referer https://example.com/</code> works as well.</p>
<h2>2. <code>drawtext</code> with <code>reload=1</code> and a file that is overwritten in place</h2>
<p>Overlays that read live data from a text file are popular for dashboards and 24/7 streams:</p>
<pre><code>-vf "drawtext=textfile=status.txt:reload=1:fontcolor=white:fontsize=30:x=10:y=10"
</code></pre>
<p>With <code>reload=1</code>, the file is read again for every frame. The usual way to update it, <code>echo "..." &gt; status.txt</code> in bash or <code>open(path, "w")</code> in Python, first empties the file and then writes the new text. If FFmpeg reads the file in between, it draws nothing.</p>
<p>To make that visible, I rewrote the file every few milliseconds while rendering 6 seconds at 30 fps and counted the frames without any text:</p>
<ul>
<li>Truncate, then write: 89 of 180 frames had no text</li>
<li>Write to <code>status.tmp</code> in the same directory, then <code>mv status.tmp status.txt</code>: 0 of 180</li>
</ul>
<p>The rename replaces the file in one step, so FFmpeg sees either the old or the new version, never an empty one. In Python, <code>os.replace(tmp, path)</code> does the same. At one update every few minutes the blank frame is rare, but on a stream that runs around the clock it will show up.</p>
<h2>3. Adding a subtitle file without <code>-map</code></h2>
<pre><code>ffmpeg -i video.mp4 -i new.srt -c copy -c:s mov_text output.mp4
</code></pre>
<p>Without <code>-map</code>, FFmpeg picks one stream per type automatically. My test video already had an old subtitle track and two audio tracks. The output:</p>
<ul>
<li>kept the old subtitle track and ignored <code>new.srt</code> completely</li>
<li>kept only the first audio track</li>
</ul>
<p>Mapping everything explicitly fixes both:</p>
<pre><code>ffmpeg -i video.mp4 -i new.srt -map 0 -map -0:s -map 1:0 -c copy -c:s mov_text -metadata:s:s:0 language=eng output.mp4
</code></pre>
<p>That output had both audio tracks, the new subtitle text and the language tag <code>eng</code> instead of <code>und</code>.</p>
<h2>The pattern</h2>
<p>None of these produce an error, and only the first one prints a warning that points at the actual problem. A quick look at the output (<code>ffprobe -show_streams</code>, a frame grab, or the raw request) catches all three in seconds.</p>
<p>I build Vidlify, a free video and file host: <a href="https://vidlify.to/?ref=hashnode">https://vidlify.to/?ref=hashnode</a></p>
]]></content:encoded></item><item><title><![CDATA[One FFmpeg run for HLS and DASH: measured sizes, and the 21 ms of audio that comes back]]></title><description><![CDATA[If you serve both HLS and DASH, the classic setup stores every video twice: MPEG-TS segments for HLS and fMP4 segments for DASH. FFmpeg can write one set…]]></description><link>https://vidlify.hashnode.dev/one-ffmpeg-run-for-hls-and-dash-measured-sizes-and-the-21-ms-of-audio-that-comes-back</link><guid isPermaLink="true">https://vidlify.hashnode.dev/one-ffmpeg-run-for-hls-and-dash-measured-sizes-and-the-21-ms-of-audio-that-comes-back</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[hls]]></category><category><![CDATA[video streaming]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Sat, 28 Nov 2026 09:06:31 GMT</pubDate><content:encoded><![CDATA[<p>If you serve both HLS and DASH, the classic setup stores every video twice: MPEG-TS segments for HLS and fMP4 segments for DASH. FFmpeg can write one set of fMP4 (CMAF style) segments with both manifests pointing at them, without a separate packager. I measured what that saves on a test file, and found one timing detail that shows up in every segmented output.</p>
<p>Note: an AI assistant helped me run these tests and draft this post. Everything below was measured with FFmpeg 6.1.1 on a 60 second 1280x720 test clip (libx264, CRF 23, AAC 128k at 48 kHz).</p>
<h2>The encode: fixed GOP first</h2>
<p>Segments only work as independent units if each one starts on a keyframe. With 4 second segments at 30 fps:</p>
<pre><code>ffmpeg -i input.mp4 -c:v libx264 -crf 23 -pix_fmt yuv420p -g 120 -keyint_min 120 -sc_threshold 0 -c:a aac -b:a 128k enc.mp4
</code></pre>
<p><code>-sc_threshold 0</code> stops x264 from inserting extra keyframes at scene cuts, which would otherwise break the 4 second grid.</p>
<h2>One run, both manifests</h2>
<pre><code>ffmpeg -i enc.mp4 -c copy -f dash -seg_duration 4 -hls_playlist 1 manifest.mpd
</code></pre>
<p><code>-hls_playlist 1</code> makes the DASH muxer also write <code>master.m3u8</code> plus one media playlist per stream. Both the MPD and the HLS playlists reference the same <code>init-stream*.m4s</code> and <code>chunk-stream*.m4s</code> files. The HLS side played back with <code>ffmpeg -i master.m3u8 -f null -</code> without errors.</p>
<h2>Measured sizes</h2>
<ul>
<li>Source MP4: 22,393,004 bytes</li>
<li>HLS with MPEG-TS segments: 23,123,598 bytes (3.3 percent more than the MP4, the TS packet overhead)</li>
<li>DASH (fMP4): 22,362,719 bytes</li>
<li>HLS TS plus DASH stored side by side: 45,486,317 bytes</li>
<li>One run with <code>-hls_playlist 1</code>: 22,366,172 bytes for both protocols</li>
</ul>
<p>So the single segment set needs 49 percent of the storage of the two copy setup on this clip. Most of that is simply not storing the video twice; the remaining bit is the TS overhead you also drop.</p>
<h2>Small thing to know about the generated playlists</h2>
<p>The HLS media playlists written by the DASH muxer contain an <code>#EXT-X-PROGRAM-DATE-TIME</code> tag per segment with the wall clock time of the encode. For VOD that is harmless, but analytics or players that read the tag will see the encode date, not anything about the content.</p>
<h2>The 21 ms that comes back</h2>
<p>In the MP4, ffprobe reports a start time of 0 for both streams. That is the edit list at work: the AAC encoder puts 1024 samples of priming in front of the audio, and the edit list tells players to skip them.</p>
<p>Segmented outputs do not carry that edit list over. The stream start times I measured:</p>
<ul>
<li>MP4 source: video 0.000000, audio 0.000000</li>
<li>HLS with TS segments: video 1.466667, audio 1.445333</li>
<li>HLS with fMP4 segments: video 0.066016, audio 0.045000</li>
<li>The one run CMAF master.m3u8: video 0.000000, audio -0.021333</li>
</ul>
<p>In every case the audio starts about 21 ms earlier (21.333 ms in two of the three segmented outputs, 21.016 ms in the fMP4 HLS one because of timestamp rounding), which matches 1024 / 48000 seconds. Sync itself is not broken: in the TS output, the second audio packet (the first one with real samples) starts at 1.466667, the same time as the first video frame. The priming packet has simply become part of the presented timeline. Decoded from the TS file, those first 1024 samples measured about 59 dB below full scale here, against roughly 21 dB below for the test tone that follows, so nobody hears them, but a QA script that compares stream start times will report a 21 ms audio lead on every segmented file. At 44.1 kHz the same packet is 23.22 ms.</p>
<h2>Takeaways</h2>
<ul>
<li>Fix the GOP at encode time; the packager cannot repair keyframe placement.</li>
<li><code>-f dash -hls_playlist 1</code> gives you one segment set for HLS and DASH in a single FFmpeg run.</li>
<li>Expect a 21 to 32 ms audio lead in start times after segmenting AAC, depending on the sample rate. It is the priming packet, not drift.</li>
</ul>
<p>I build Vidlify, a free video and file host, and run into these details while working on it: <a href="https://vidlify.to/?ref=hashnode">https://vidlify.to/?ref=hashnode</a></p>
]]></content:encoded></item><item><title><![CDATA[FFmpeg said the file was fine: exit code 0 on a truncated MP4, and three checks that catch it]]></title><description><![CDATA[Note: an AI assistant helped me run these tests and draft this post. All numbers come from FFmpeg 6.1.1. A common way to check a video is to decode it…]]></description><link>https://vidlify.hashnode.dev/ffmpeg-said-the-file-was-fine-exit-code-0-on-a-truncated-mp4-and-three-checks-that-catch-it</link><guid isPermaLink="true">https://vidlify.hashnode.dev/ffmpeg-said-the-file-was-fine-exit-code-0-on-a-truncated-mp4-and-three-checks-that-catch-it</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[Python]]></category><category><![CDATA[video]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Sat, 28 Nov 2026 04:06:29 GMT</pubDate><content:encoded><![CDATA[<p><em>Note: an AI assistant helped me run these tests and draft this post. All numbers come from FFmpeg 6.1.1.</em></p>
<p>A common way to check a video is to decode it completely and see whether FFmpeg complains:</p>
<pre><code class="language-bash">ffmpeg -v error -i upload.mp4 -f null -
</code></pre>
<p>If the exit code is 0, the file is good. That is the assumption, and for two out of three broken files I tested, it is wrong.</p>
<h2>The test files</h2>
<p>I made a 10 second 640x360 H.264/AAC clip at 25 fps (250 frames) and then broke copies of it in three ways:</p>
<ol>
<li><strong>Cut off at 60 percent, moov at the end</strong> (the normal FFmpeg layout).</li>
<li><strong>Cut off at 60 percent, with <code>-movflags +faststart</code></strong>, so the index sits at the front. This is what a partly finished upload of a web optimised file looks like.</li>
<li><strong>A shorter 4 second clip with a few kilobytes of flipped bytes in the middle</strong>, simulating corruption in transit.</li>
</ol>
<h2>What FFmpeg reported</h2>
<table>
<thead>
<tr>
<th>File</th>
<th>Exit code</th>
<th>Lines on stderr at <code>-v error</code></th>
<th>ffprobe duration</th>
</tr>
</thead>
<tbody><tr>
<td>intact</td>
<td>0</td>
<td>0</td>
<td>10.0 s</td>
</tr>
<tr>
<td>truncated, moov at end</td>
<td>183</td>
<td>4</td>
<td>(no moov atom)</td>
</tr>
<tr>
<td>truncated, faststart</td>
<td><strong>0</strong></td>
<td>6</td>
<td><strong>10.0 s</strong></td>
</tr>
<tr>
<td>flipped bytes</td>
<td><strong>0</strong></td>
<td>5</td>
<td>4.0 s</td>
</tr>
</tbody></table>
<p>The first broken file fails loudly: without the <code>moov</code> box FFmpeg cannot open it at all. The other two exit with 0. The truncated faststart file even reports its full 10 second duration, because that number comes from the index at the front, which survived. Its errors on stderr included <code>Invalid NAL unit size</code> and <code>partial file</code>, but nothing in the return code.</p>
<p>I also tried <code>-xerror</code> and <code>-err_detect explode</code> on the flipped-bytes file. The exit code stayed 0.</p>
<h2>Check 1: treat any stderr output as a failure</h2>
<p>At <code>-v error</code>, a clean file prints nothing at all. All three broken files printed something. So the simplest reliable rule is: non-empty stderr means reject or quarantine.</p>
<h2>Check 2: compare frame counts</h2>
<p>ffprobe can report both the frame count from the container header and the number of frames it actually managed to read:</p>
<pre><code class="language-bash">ffprobe -v error -select_streams v:0 -count_frames \
  -show_entries stream=nb_frames,nb_read_frames -of csv=p=0 upload.mp4
</code></pre>
<p>For the intact file both are 250. For the truncated faststart file the header still says 250 but only 148 frames could be read. The flipped-bytes file came out at 100 versus 99. A mismatch means the index promises more than the data delivers.</p>
<p><code>-count_frames</code> decodes the whole stream, so it costs about as much as the null decode. On a busy server, run it on the upload once, not on every request.</p>
<h2>Check 3: the exit code still matters</h2>
<p>It is not enough on its own, but it catches the case where the file cannot be opened at all, like the truncated file with the index at the end.</p>
<h2>Putting it together</h2>
<pre><code class="language-python">import json, subprocess

def video_is_complete(path: str) -&gt; bool:
    decode = subprocess.run(
        ["ffmpeg", "-v", "error", "-i", path, "-f", "null", "-"],
        capture_output=True, text=True)
    if decode.returncode != 0 or decode.stderr.strip():
        return False
    probe = subprocess.run(
        ["ffprobe", "-v", "error", "-select_streams", "v:0", "-count_frames",
         "-show_entries", "stream=nb_frames,nb_read_frames", "-of", "json", path],
        capture_output=True, text=True)
    try:
        s = json.loads(probe.stdout)["streams"][0]
        return int(s["nb_frames"]) == int(s["nb_read_frames"])
    except (KeyError, IndexError, ValueError, json.JSONDecodeError):
        return False
</code></pre>
<p>On my five test files this returned True for the two intact ones (with and without faststart) and False for all three broken ones. Two caveats: <code>nb_frames</code> is not always present in other containers (MKV and WebM often leave it out), and the function as written then returns False, so give those formats a branch that relies on the stderr check alone. And some real world files print harmless warnings, so log what you reject before you start deleting anything automatically.</p>
<p>I build <a href="https://vidlify.to/?ref=hashnode">Vidlify</a>, a small video host, and these tests came out of looking at how a host should treat an upload that stopped halfway.</p>
]]></content:encoded></item><item><title><![CDATA[Washed out HDR uploads: tone mapping iPhone HLG video to SDR with FFmpeg]]></title><description><![CDATA[Note: an AI assistant helped me test and draft this post. The commands and numbers below were run on FFmpeg 6.1.1. Recent iPhones record HDR by default…]]></description><link>https://vidlify.hashnode.dev/washed-out-hdr-uploads-tone-mapping-iphone-hlg-video-to-sdr-with-ffmpeg</link><guid isPermaLink="true">https://vidlify.hashnode.dev/washed-out-hdr-uploads-tone-mapping-iphone-hlg-video-to-sdr-with-ffmpeg</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[video]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Sat, 28 Nov 2026 02:25:11 GMT</pubDate><content:encoded><![CDATA[<p><em>Note: an AI assistant helped me test and draft this post. The commands and numbers below were run on FFmpeg 6.1.1.</em></p>
<p>Recent iPhones record HDR by default. The file is 10 bit HEVC with BT.2020 colors and the HLG transfer function. If your upload pipeline turns that into ordinary H.264 for the browser, there is a quiet trap: the output can look grey and flat on most screens, and nothing in the logs tells you.</p>
<h2>What a "normal" transcode does with HDR</h2>
<p>I made a 5 second HLG test clip and ran the typical web transcode on it:</p>
<pre><code class="language-bash">ffmpeg -i hlg.mov -vf "scale=1280:720:flags=bicubic,format=yuv420p" \
  -c:v libx264 -preset veryfast -crf 23 plain.mp4
</code></pre>
<p><code>format=yuv420p</code> does turn the pixels into 8 bit, but ffprobe shows what survived:</p>
<pre><code>pix_fmt=yuv420p
color_space=bt2020nc
color_transfer=arib-std-b67
color_primaries=bt2020
</code></pre>
<p>So you get an 8 bit H.264 file that still claims to be HLG in BT.2020. The pixel values were never converted to SDR, they were only squeezed into fewer bits. Players that ignore the tags show the HLG values as if they were BT.709, which is the washed out look people complain about.</p>
<h2>Detecting HDR before you transcode</h2>
<p>The transfer function is the reliable signal. I read it with ffprobe and treat two values as HDR:</p>
<pre><code class="language-python">HDR_TRANSFERS = {"arib-std-b67", "smpte2084"}  # HLG and PQ (HDR10)

def is_hdr(stream: dict) -&gt; bool:
    return stream.get("color_transfer") in HDR_TRANSFERS
</code></pre>
<p><code>stream</code> is the video stream from <code>ffprobe -show_streams -of json</code>.</p>
<h2>The tone mapping chain</h2>
<pre><code class="language-python">TONEMAP = ("zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,"
           "tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv")
</code></pre>
<p>Step by step:</p>
<ol>
<li><code>zscale=t=linear:npl=100</code> undoes the HLG curve into linear light, with 100 nits as the nominal peak.</li>
<li><code>format=gbrpf32le</code> switches to 32 bit float, because tone mapping needs headroom above 1.0.</li>
<li><code>zscale=p=bt709</code> converts the BT.2020 primaries to BT.709.</li>
<li><code>tonemap=tonemap=hable:desat=0</code> compresses the highlights into SDR range.</li>
<li><code>zscale=t=bt709:m=bt709:r=tv</code> applies the SDR curve and the BT.709 matrix in limited range.</li>
</ol>
<p>After that comes <code>format=yuv420p</code> as before. I also write the SDR tags explicitly, so the file stops claiming to be HDR:</p>
<pre><code class="language-bash">-color_primaries bt709 -color_trc bt709 -colorspace bt709
</code></pre>
<p>With the chain in place, ffprobe on the output reports bt709 for all three fields.</p>
<h2>Cost and a caveat</h2>
<p>On my test clip (1080p in, 720p out, scaled before tone mapping), the plain transcode took 2.1 s and the tone mapped one 3.5 s, so about 1.6 times as long. Scaling first matters: the float stage is the expensive part, and it runs on far fewer pixels at 720p.</p>
<p>The caveat: Hable is conservative and darkens the picture. On the synthetic test pattern the average luma (signalstats YAVG) dropped from 126 to 78. I have not measured real footage the same way yet, so compare a few frames from your own uploads before you ship it, and try <code>tonemap=mobius</code> if Hable looks too heavy for your content.</p>
<h2>When zscale is missing</h2>
<p><code>zscale</code> only exists if FFmpeg was built with libzimg. Not every build includes it, and a missing filter makes the whole command fail. So I check once per FFmpeg binary and fall back to the old behaviour instead of breaking uploads:</p>
<pre><code class="language-python">_filters_cache: dict[str, bool] = {}

def can_tonemap(ffmpeg: str) -&gt; bool:
    if ffmpeg not in _filters_cache:
        out = subprocess.run([ffmpeg, "-hide_banner", "-filters"],
                             capture_output=True, text=True).stdout
        names = {line.split()[1] for line in out.splitlines()
                 if len(line.split()) &gt; 2}
        _filters_cache[ffmpeg] = {"zscale", "tonemap"} &lt;= names
        if not _filters_cache[ffmpeg]:
            log.warning("FFmpeg has no zscale/tonemap, HDR stays untouched")
    return _filters_cache[ffmpeg]

def tonemap_filter(ffmpeg: str, hdr: bool) -&gt; str:
    return TONEMAP + "," if hdr and can_tonemap(ffmpeg) else ""
</code></pre>
<p>The filter string then becomes <code>f"scale={w}:{h}:flags=bicubic,{tone}format=yuv420p"</code>, and the SDR tags are only added when <code>tone</code> is not empty. The same prefix goes into the thumbnail command, otherwise the poster frame stays washed out while the video looks right.</p>
<p>On Windows, <code>ffmpeg -hide_banner -filters | findstr zscale</code> tells you in one line whether your build can do it.</p>
<h2>Where this came from</h2>
<p>I build <a href="https://vidlify.to/?ref=hashnode">Vidlify</a>, a small video and file host, and this is the fix I just added to its transcoding worker after an HDR test upload came out flat. It goes live with the next server update. If you run your own pipeline, the ffprobe check above is the quickest way to see whether you have the same problem.</p>
]]></content:encoded></item><item><title><![CDATA[Resumable chunked uploads in Flask without a library]]></title><description><![CDATA[A 3 GB upload over hotel Wi-Fi fails at 87 percent, and the user has to start over. That is the moment a single big POST stops being good enough. Here is…]]></description><link>https://vidlify.hashnode.dev/resumable-chunked-uploads-in-flask-without-a-library</link><guid isPermaLink="true">https://vidlify.hashnode.dev/resumable-chunked-uploads-in-flask-without-a-library</guid><category><![CDATA[Flask Framework]]></category><category><![CDATA[Python]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Fri, 27 Nov 2026 17:08:28 GMT</pubDate><content:encoded><![CDATA[<p>A 3 GB upload over hotel Wi-Fi fails at 87 percent, and the user has to start over. That is the moment a single big POST stops being good enough. Here is the small, library free protocol I use in my file host (Flask on the server, plain JavaScript in the browser) to upload large files in pieces and pick up where they left off after a dropped connection.</p>
<h2>Why not one big request</h2>
<ul>
<li><strong>Body limits.</strong> Reverse proxies and platforms cap request bodies. Raising the cap to several gigabytes for one endpoint is possible, but every failure then costs the whole upload.</li>
<li><strong>Flaky connections.</strong> Phones switch networks, laptops sleep, Wi-Fi drops for two seconds. With one request, any of that means starting from zero.</li>
<li><strong>Progress you can trust.</strong> With pieces, the server confirms what it actually stored, so the progress bar reflects bytes on disk, not bytes that left the browser.</li>
</ul>
<h2>The protocol: init, chunks, finish</h2>
<p>Three endpoints:</p>
<ol>
<li><code>POST /api/upload/init</code> with the file name and size. The server checks the quota, creates an upload row and an empty part file, and returns an <code>upload_id</code> plus the <code>chunk_size</code> (16 MB by default, configurable).</li>
<li><code>POST /api/upload/&lt;id&gt;/chunk?offset=N</code> with the raw bytes of one piece as the body. The server answers with how many bytes it has now.</li>
<li><code>POST /api/upload/&lt;id&gt;/finish</code> once everything is there. The server checks the size and turns the part file into a real upload.</li>
</ol>
<p>The important part is that <code>offset</code>. The server stores how many bytes it has received, and a chunk is only accepted if it starts exactly there.</p>
<h2>The server side</h2>
<pre><code class="language-python">@bp.route("/api/upload/&lt;upload_id&gt;/chunk", methods=["POST"])
@login_required
def api_upload_chunk(upload_id):
    up = _load_upload(upload_id)
    if up is None:
        return jsonify(ok=False, error="Upload not found. Please start again."), 404
    part = _part_path(upload_id)
    received = up["received"]
    offset = request.args.get("offset", -1, type=int)
    if offset != received:
        # The browser is out of sync, tell it where we are
        return jsonify(ok=False, received=received, error="Wrong offset."), 409

    limit = current_app.config["CHUNK_MB"] * 1024 * 1024 + 1024 * 1024
    written = 0
    with open(part, "r+b" if part.exists() else "wb") as fh:
        fh.truncate(received)  # drop leftovers of an interrupted chunk
        fh.seek(received)
        while True:
            buf = request.stream.read(1024 * 1024)
            if not buf:
                break
            written += len(buf)
            if written &gt; limit or received + written &gt; up["size_bytes"]:
                fh.truncate(received)
                return jsonify(ok=False, error="Too much data sent."), 400
            fh.write(buf)
    get_db().execute("UPDATE uploads SET received = ? WHERE id = ?", (received + written, upload_id))
    return jsonify(ok=True, received=received + written)
</code></pre>
<p>Three details do most of the work:</p>
<ul>
<li><strong><code>truncate(received)</code> before writing.</strong> If a previous chunk was cut off halfway, the part file has some extra bytes the database doesn't know about. Cutting the file back to the confirmed length makes every retry start from a clean state.</li>
<li><strong>Reading <code>request.stream</code> in 1 MB steps.</strong> The chunk never sits in memory as a whole, and the size checks happen while reading, so a client can't push more than one chunk or more than the declared file size.</li>
<li><strong>409 with the real position.</strong> When the offsets don't match, the answer isn't just an error. It tells the browser where to continue.</li>
</ul>
<p><code>finish</code> then compares the stored count and the file size on disk with the declared size, and only if all three match it moves the part file into place with <code>Path.replace</code>, which is a rename and doesn't copy anything.</p>
<h2>The browser side</h2>
<p><code>fetch</code> still can't report upload progress, so each chunk goes out with <code>XMLHttpRequest</code>:</p>
<pre><code class="language-js">function sendChunk(item, offset, blob, onProgress) {
  return new Promise(function (resolve, reject) {
    var xhr = new XMLHttpRequest();
    xhr.open("POST", "/api/upload/" + item.uploadId + "/chunk?offset=" + offset);
    xhr.setRequestHeader("Content-Type", "application/octet-stream");
    xhr.upload.onprogress = function (ev) { onProgress(ev.loaded); };
    xhr.onload = function () {
      var data = {};
      try { data = JSON.parse(xhr.responseText); } catch (e) {}
      if (xhr.status === 200 &amp;&amp; data.ok) return resolve(data.received);
      if (xhr.status === 409 &amp;&amp; typeof data.received === "number") return resolve(data.received);
      var err = new Error(data.error || "Error " + xhr.status);
      err.fatal = xhr.status &gt;= 400 &amp;&amp; xhr.status &lt; 500;
      reject(err);
    };
    xhr.onerror = function () { reject(new Error("Connection lost")); };
    xhr.send(blob);
  });
}
</code></pre>
<p>A 409 is treated as success: the browser simply continues from the offset the server reported. Everything else in the 4xx range is fatal (wrong file, quota, not logged in), so retrying would not help. Network errors and 5xx answers are retried.</p>
<p>The loop around it slices the file with <code>file.slice(offset, offset + chunkSize)</code>, which doesn't read anything into memory until the request is sent, and backs off on errors:</p>
<pre><code class="language-js">}, function (err) {
  if (err.fatal || tries &gt;= 5) throw err;
  tries++;
  setStatus(item, "Connection lost, retry " + tries + " of 5");
  return wait(1000 * Math.pow(2, tries - 1)).then(next);
});
</code></pre>
<p>That is 1, 2, 4, 8 and 16 seconds, about half a minute in total, which covers most network switches and short drops. After every successful chunk the counter goes back to zero.</p>
<h2>The proxy in front</h2>
<p>With nginx in front of Flask, two settings matter:</p>
<pre><code class="language-nginx">client_max_body_size 64m;     # a few times the chunk size
proxy_request_buffering off;  # pass uploads straight through
</code></pre>
<p>Without <code>proxy_request_buffering off</code>, nginx first receives each chunk completely, often into a temporary file, before passing it on. That adds disk writes and a delay before the app sees any data.</p>
<h2>Cleaning up</h2>
<p>Uploads that are started and never finished leave part files behind. Instead of a separate job, the init endpoint runs a cleanup now and then (with a 5 percent chance per call) and deletes part files older than two days. Pending uploads from the last two days also count toward the user's quota, so nobody can park unlimited data in half finished uploads.</p>
<h2>What I would add next</h2>
<p>The upload survives connection drops, but not a closed tab. Storing the <code>upload_id</code> with a fingerprint of the file (name, size, last modified) in <code>localStorage</code> would let the page offer "continue the upload" after a reload. If you need that today, the tus protocol and its libraries solve exactly this.</p>
<p>This is the uploader behind <a href="https://vidlify.to">Vidlify</a>, the file and video host I built. If you try the protocol in your own app, I'd like to hear how it holds up on bad connections.</p>
]]></content:encoded></item><item><title><![CDATA[How to compress a video to an exact file size with ffmpeg]]></title><description><![CDATA["Make this video 20 MB" sounds like a simple request until you try it with a quality slider. CRF and other quality based modes give you a nice picture but…]]></description><link>https://vidlify.hashnode.dev/how-to-compress-a-video-to-an-exact-file-size-with-ffmpeg</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-compress-a-video-to-an-exact-file-size-with-ffmpeg</guid><category><![CDATA[FFmpeg]]></category><category><![CDATA[video]]></category><category><![CDATA[Python]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Fri, 27 Nov 2026 01:38:03 GMT</pubDate><content:encoded><![CDATA[<p>"Make this video 20 MB" sounds like a simple request until you try it with a quality slider. CRF and other quality based modes give you a nice picture but an unpredictable size. When the limit is hard (Discord, an email attachment, an upload form), you want the size, not the quality, to be the input. Here is the approach I use in the compressor of my file host, with the ffmpeg commands and the small details that make it reliable.</p>
<h2>Step 1: turn the size into a bitrate</h2>
<p>File size is bitrate times duration. Rearranged:</p>
<pre><code class="language-python">def video_kbps(target_mb, duration_s, audio_kbps):
    budget_kbps = target_mb * 8000 * 0.94 / duration_s  # MB to kilobits, minus room for the container
    return int(budget_kbps - audio_kbps)
</code></pre>
<ul>
<li><code>target_mb * 8000</code> converts megabytes (1,000,000 bytes) to kilobits.</li>
<li><code>0.94</code> keeps about 6 percent for the MP4 container, headers and rate control wobble. Without it you land just over the limit surprisingly often.</li>
<li>Audio gets its own share first. I pick it from the budget: 96 kbit/s when there is plenty, 64 when it is tight, 32 when it is very tight. Speech survives 32 kbit/s AAC better than video survives losing those bits.</li>
</ul>
<p>If the result drops below about 60 kbit/s, stop and tell the user the video is too long for that size, together with the smallest size that would work. Producing an unwatchable file is worse than an honest error.</p>
<h2>Step 2: pick a resolution that fits the bitrate</h2>
<p>The same bitrate looks very different at different resolutions. Squeezing 1080p into 900 kbit/s gives blocky mush; the same 900 kbit/s at 720p or 480p looks clean. A simple ladder works well:</p>
<pre><code class="language-python">cap = (1080 if v &gt;= 2500 else
       720  if v &gt;= 1100 else
       480  if v &gt;= 550  else
       360  if v &gt;= 250  else 240)
</code></pre>
<p><code>cap</code> limits the shorter side, so portrait phone videos are handled the same way as landscape ones. Never scale up: if the source is already smaller than the cap, keep it.</p>
<pre><code>-vf "scale=1280:720:flags=bicubic,format=yuv420p"
</code></pre>
<p>Width and height must be even for yuv420p, so round them to multiples of 2.</p>
<h2>Step 3: encode with a ceiling, not just an average</h2>
<pre><code>ffmpeg -i in.mp4 -map 0:v:0 -map 0:a:0 \
  -vf "scale=1280:720:flags=bicubic,format=yuv420p" \
  -c:v libx264 -preset veryfast -b:v 1150k -maxrate 1150k -bufsize 2300k \
  -c:a aac -ac 2 -b:a 96k \
  -movflags +faststart out.mp4
</code></pre>
<p><code>-b:v</code> alone is an average target, and x264 may overshoot on complex scenes. Adding <code>-maxrate</code> at the same value and a <code>-bufsize</code> of about twice that keeps it in check. <code>+faststart</code> moves the index to the front, so the file starts playing in a browser or chat before it is fully downloaded.</p>
<p>Two pass encoding (<code>-pass 1</code> then <code>-pass 2</code>) hits the target more precisely and looks a bit better, at roughly twice the time. For a web tool where people wait in front of a progress bar, I chose one fast pass plus a safety net.</p>
<h2>Step 4: check, and retry once</h2>
<p>After encoding, compare the real file size with the target. If it is still over, encode once more at 82 percent of the video bitrate. In practice the second run is rarely needed thanks to the 0.94 margin and maxrate, but when it is, the user never sees a "file too large" error from Discord or their email client.</p>
<h2>Small details that matter</h2>
<ul>
<li><strong>Use the smaller unit when in doubt.</strong> Some services mean 1,000,000 bytes by a megabyte, others 1,048,576. Doing the math and the final check with 1,000,000 bytes per MB keeps you under the limit either way.</li>
<li><strong>Aim a little under the limit.</strong> For a 20 MB limit, a 19 MB target avoids failures at the last step of an upload.</li>
<li><strong>Map streams explicitly.</strong> <code>-map 0:v:0 -map 0:a:0</code> avoids surprises with files that carry several audio tracks or a data stream, which would otherwise eat part of your budget.</li>
<li><strong>Handle videos without audio.</strong> No audio stream means the whole budget goes to the picture: drop <code>-map 0:a:0</code> and use <code>-an</code> instead of the AAC options.</li>
</ul>
<h2>Try it without the command line</h2>
<p>This is exactly what the compressor on <a href="https://vidlify.to/tools/compress-video">Vidlify</a> does (I built it): pick 20 MB or type your own size, and it calculates the bitrate and resolution for you. If you prefer to do it locally, the commands above are all you need.</p>
]]></content:encoded></item><item><title><![CDATA[Chunked end to end encryption in the browser with AES-GCM and a key in the URL fragment]]></title><description><![CDATA[Most "encrypted" file hosts encrypt on the server, which means the server also has the key. For an option I call Extra security in my file host, I wanted…]]></description><link>https://vidlify.hashnode.dev/chunked-end-to-end-encryption-in-the-browser-with-aes-gcm-and-a-key-in-the-url-fragment</link><guid isPermaLink="true">https://vidlify.hashnode.dev/chunked-end-to-end-encryption-in-the-browser-with-aes-gcm-and-a-key-in-the-url-fragment</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[encryption]]></category><category><![CDATA[Security]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Fri, 27 Nov 2026 00:34:10 GMT</pubDate><content:encoded><![CDATA[<p>Most "encrypted" file hosts encrypt on the server, which means the server also has the key. For an option I call Extra security in my file host, I wanted the opposite: the browser encrypts before anything is uploaded, and the server only ever stores bytes it cannot read. Here is the design, with the code that matters, and the trade-offs I hit.</p>
<h2>The requirements</h2>
<ul>
<li>Works for big files (gigabytes), so nothing may need the whole file in memory.</li>
<li>Uploads go in pieces anyway (for retries on bad connections), so encryption should work per piece.</li>
<li>A piece must not be swappable, reorderable or silently cut off.</li>
<li>The key must never reach the server, not even in logs.</li>
</ul>
<h2>Where the key lives: the URL fragment</h2>
<p>Browsers do not send the part of a URL after <code>#</code> to the server. So the share link looks like <code>https://host/f/abc123#KEY</code>, and the key travels from sender to recipient inside the link itself. The server sees <code>/f/abc123</code> and nothing else.</p>
<p>The key is 128 random bits from the Web Crypto API, written as base64url (22 characters):</p>
<pre><code class="language-js">const raw = crypto.getRandomValues(new Uint8Array(16));
const key = await crypto.subtle.importKey("raw", raw, "AES-GCM", false, ["encrypt", "decrypt"]);
</code></pre>
<p>Every file gets its own fresh key. That detail matters for the next part.</p>
<h2>One AES-GCM operation per piece</h2>
<p>The plaintext is cut into pieces of <code>chunk - 16</code> bytes, so that each encrypted piece (plaintext plus the 16 byte GCM tag) is exactly one upload chunk. Each piece is encrypted on its own:</p>
<pre><code class="language-js">function iv(index) {
  const v = new Uint8Array(12);
  new DataView(v.buffer).setUint32(8, index); // piece number in the last 4 bytes
  return v;
}
function aad(index, last) {
  return new TextEncoder().encode(`ve1:${index}:${last ? 1 : 0}`);
}
const encryptPiece = (key, index, last, buf) =&gt;
  crypto.subtle.encrypt({ name: "AES-GCM", iv: iv(index), additionalData: aad(index, last) }, key, buf);
</code></pre>
<p>Two things make this safe:</p>
<ul>
<li><strong>The IV is a counter, not random.</strong> With GCM the rule is: never use the same IV twice with the same key. Because every file has its own random key, a simple piece counter is unique by construction. No random IVs to store, and decryption can compute them.</li>
<li><strong>The additional data binds position and "last".</strong> The AAD is authenticated but not encrypted. Putting the piece number in it means a piece moved to another position fails authentication. Putting the "is last" flag in it means truncation is detected too: if someone drops the final pieces, the new final piece was encrypted with <code>last = 0</code>, so decrypting it as the last one fails.</li>
</ul>
<p>The encrypted size is easy to compute up front, which the upload progress bar needs:</p>
<pre><code class="language-js">const cipherSize = (size, chunk) =&gt; size + Math.ceil(size / (chunk - 16)) * 16;
</code></pre>
<h2>Metadata gets its own block</h2>
<p>The file name and type are private too. They are encrypted as one small JSON block with a fixed IV that can never collide with a piece IV (all bytes set to 255, while piece IVs start with eight zero bytes) and a different AAD (<code>ve1:meta</code>). The server stores that blob next to the file and shows "encrypted" until a browser with the key decrypts it.</p>
<h2>Downloading gigabytes without holding them in memory</h2>
<p>Decrypting is the reverse: fetch each encrypted piece with an HTTP Range request, decrypt it, pass it on. The hard part is "pass it on". Building a Blob of a 3 GB file in memory is a bad idea on phones.</p>
<p>The trick is a small service worker. The page registers it for one path, opens a <code>MessageChannel</code>, and sends decrypted pieces through it. The service worker answers a request to that path with a <code>ReadableStream</code> that it fills from the channel, plus a <code>Content-Disposition: attachment</code> header. To the browser this looks like a normal file download, so it streams to disk:</p>
<pre><code class="language-js">// service worker, simplified
self.addEventListener("fetch", event =&gt; {
  const item = waiting.get(new URL(event.request.url).pathname);
  if (!item) return;
  event.respondWith(new Response(item.stream, {
    headers: { "Content-Type": "application/octet-stream",
               "Content-Disposition": `attachment; filename*=UTF-8''${encodeURIComponent(item.name)}` }
  }));
});
</code></pre>
<p>Some backpressure is needed (the page only sends the next piece when the worker asks for more), otherwise a fast network fills memory anyway.</p>
<h2>The honest trade-offs</h2>
<ul>
<li><strong>No preview, no player.</strong> The server cannot make thumbnails or transcode what it cannot read. Encrypted videos are plain files.</li>
<li><strong>Lose the link, lose the file.</strong> There is no reset. The uploader's browser remembers keys locally, but that is a convenience, not a backup.</li>
<li><strong>You still trust the JavaScript.</strong> If the server were compromised and served modified JS, it could exfiltrate keys. This protects against a curious or breached storage layer, not against the site operator turning malicious. That is true for every web app doing client side crypto, and worth saying out loud.</li>
<li><strong>Fragments can leak elsewhere.</strong> The key is in browser history and in anything the link is pasted into. Send the link through a channel you trust.</li>
</ul>
<h2>Wrap up</h2>
<p>Per piece AES-GCM with a counter IV, AAD that binds position and end, metadata as a separate block, and a service worker for streaming downloads: that is the whole design, and it fits in a few hundred lines without dependencies. If you want to see it in action, it is the Extra security switch on the upload page of <a href="https://vidlify.to">Vidlify</a>, the file host I built. I would be glad to hear where you would do it differently.</p>
]]></content:encoded></item><item><title><![CDATA[How to report illegal content, and what happens next]]></title><description><![CDATA[Vidlify hosts what users upload. We don't check uploads before they go online, but we act on every report. If you find a video or file that breaks the law…]]></description><link>https://vidlify.hashnode.dev/how-to-report-illegal-content-and-what-happens-next</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-report-illegal-content-and-what-happens-next</guid><category><![CDATA[Security]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[privacy]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:42:56 GMT</pubDate><content:encoded><![CDATA[<p><a href="https://vidlify.to/?ref=hashnode">Vidlify</a> hosts what users upload. We don't check uploads before they go online, but we act on every report. If you find a video or file that breaks the law, this is how to tell us and what happens afterwards.</p>
<h2>How to report</h2>
<p>Open the <a href="https://vidlify.to/report">report form</a>, or use the <strong>Report</strong> link in the player and on every upload page. You'll be asked for:</p>
<ol>
<li><strong>The link</strong> to the video or file.</li>
<li><strong>The reason.</strong> You can choose between copyright infringement, sexual or pornographic content, endangering minors, violence, terrorism or extremism, hate speech or harassment, privacy violations, fraud, spam or malware, and other illegal content.</li>
<li><strong>An explanation</strong> of why the content is illegal. For copyright: which work is affected, and whether you are the rights holder or act on their behalf. For videos, a timestamp helps.</li>
<li><strong>Your name and email address,</strong> so we can reach you with questions and tell you what we decided.</li>
<li><strong>A confirmation</strong> that your information is accurate and complete to the best of your knowledge.</li>
</ol>
<p>The person who uploaded the content does not see your name or email address.</p>
<h2>What happens next</h2>
<ol>
<li><strong>You get a confirmation</strong> by email with a reference number.</li>
<li><strong>We review the report</strong> as quickly as we can.</li>
<li><strong>We decide</strong> whether the content breaks the law or our <a href="https://vidlify.to/terms">terms</a>. If it does, we remove it, and the link then only shows that the content is no longer available.</li>
<li><strong>You hear back</strong> from us with our decision.</li>
</ol>
<p>If someone's life or safety is in danger, please also contact the police right away. A report to us doesn't replace that.</p>
<h2>Reports about encrypted files</h2>
<p>Files uploaded with <a href="https://vidlify.to/blog/what-extra-security-does">extra security</a> are encrypted in the uploader's browser, so we can't see what is inside. To check such a file, we need the <strong>full link including the key</strong> after the <code>#</code>. When you report from the file page, the key is added to your report automatically. We use it only to review that report.</p>
<h2>What makes a report useful</h2>
<ul>
<li><strong>Be specific.</strong> "This is my song, released on my album in 2024, uploaded without permission" helps more than "copyright".</li>
<li><strong>One report per upload.</strong> If several uploads are affected, send a report for each link.</li>
<li><strong>Stay factual.</strong> We need to know what is illegal and why, not who you suspect is behind it.</li>
</ul>
<h2>Why we work this way</h2>
<p>Checking every upload in advance would mean looking into everyone's private files. Instead, uploads are private by link, and we rely on reports to find what doesn't belong here. That is how the EU's rules for hosting services are designed as well: hosts have to act quickly once they know about illegal content. More about our approach is in the <a href="https://vidlify.to/terms">terms</a> and the <a href="https://vidlify.to/privacy">privacy policy</a>.</p>
<p><em>Originally published on the <a href="https://vidlify.to/blog/how-reports-work?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How long do files stay online on a file host?]]></title><description><![CDATA[You send a link, and half a year later someone opens it and gets an error. Whether that happens depends on the kind of service you used and on its rules…]]></description><link>https://vidlify.hashnode.dev/how-long-do-files-stay-online-on-a-file-host</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-long-do-files-stay-online-on-a-file-host</guid><category><![CDATA[Cloud]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:41:35 GMT</pubDate><content:encoded><![CDATA[<p>You send a link, and half a year later someone opens it and gets an error. Whether that happens depends on the kind of service you used and on its rules. Here is what to look for, and how it works on <a href="https://vidlify.to/?ref=hashnode">Vidlify</a>.</p>
<h2>Three common models</h2>
<ul>
<li><strong>Expiring links.</strong> Transfer services often delete files after a fixed time, sometimes only a few days. Great for a one-off handover, bad for anything people might open later.</li>
<li><strong>Kept until you delete it.</strong> Cloud drives usually keep files as long as your account exists and you stay within your storage.</li>
<li><strong>Kept as long as it is used.</strong> Many free file hosts delete uploads that nobody opens for a while, so storage isn't wasted on forgotten files.</li>
</ul>
<h2>How it works on Vidlify</h2>
<p>Your uploads stay online as long as they are used. The rule in one sentence:</p>
<blockquote>
<p>Uploads that nobody has opened for 3 months, while you have also not logged in during that time, are deleted for inactivity.</p>
</blockquote>
<p>What counts as use:</p>
<ul>
<li>someone opens the link, plays the video or downloads the file</li>
<li>you log in to your account</li>
</ul>
<p>So a video that is embedded on your website and watched now and then stays online. Files you share regularly stay online. Only uploads that are forgotten on both sides, by viewers and by you, are removed. The exact rule is in the <a href="https://vidlify.to/terms#inactivity">terms</a>, and your file list shows a reminder too.</p>
<p>Uploads are also removed when you delete them yourself, when you delete your account, or when we remove content that breaks the law or our <a href="https://vidlify.to/terms">terms</a>.</p>
<h2>How to make sure your files stay</h2>
<ul>
<li><strong>Log in from time to time</strong> if you keep files that nobody opens often.</li>
<li><strong>Keep your own copy.</strong> A file host is for sharing. Important files belong on at least one device or backup you control as well.</li>
<li><strong>Don't rely on one link forever.</strong> If something is meant to be available for years, like a download on your website, check now and then that it still works.</li>
</ul>
<h2>What happens to the storage</h2>
<p>Deleted uploads free their storage right away. On a free account you have 30 GB, and more is available with <a href="https://vidlify.to/storage">paid storage</a>. The free storage is for sharing, not for archiving everything forever, which is why unused uploads make room after a while.</p>
<p><em>Originally published on the <a href="https://vidlify.to/blog/how-long-uploads-stay-online?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to send a whole folder with one link]]></title><description><![CDATA[Sending 200 holiday photos one by one is nobody's idea of fun, and neither is receiving them. The easiest way to share a whole folder is to pack it into a…]]></description><link>https://vidlify.hashnode.dev/how-to-send-a-whole-folder-with-one-link</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-send-a-whole-folder-with-one-link</guid><category><![CDATA[Productivity]]></category><category><![CDATA[tools]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:40:35 GMT</pubDate><content:encoded><![CDATA[<p>Sending 200 holiday photos one by one is nobody's idea of fun, and neither is receiving them. The easiest way to share a whole folder is to pack it into a single ZIP file first. The receiver gets one download with everything inside, in the same folder structure you had.</p>
<h2>Why zip first?</h2>
<ul>
<li><strong>One file, one link.</strong> Instead of a list of 200 links, you send one.</li>
<li><strong>Folders stay intact.</strong> Subfolders and file names come through exactly as you organised them.</li>
<li><strong>Nothing gets lost.</strong> The receiver can't accidentally download only half of the files.</li>
<li><strong>Faster uploads.</strong> One large file uploads more smoothly than hundreds of tiny ones.</li>
</ul>
<p>Photos and videos don't get much smaller in a ZIP, because they are already compressed. That's fine: the point is to bundle them, not to shrink them.</p>
<h2>Zip a folder on Windows</h2>
<ol>
<li>Open File Explorer and find the folder.</li>
<li>Right-click it.</li>
<li>On Windows 11, choose <strong>Compress to ZIP file</strong>. On Windows 10, choose <strong>Send to</strong>, then <strong>Compressed (zipped) folder</strong>.</li>
</ol>
<p>A ZIP file with the same name appears next to the folder.</p>
<h2>Zip a folder on a Mac</h2>
<ol>
<li>Open Finder and find the folder.</li>
<li>Right-click it (or Control-click).</li>
<li>Choose <strong>Compress "folder name"</strong>.</li>
</ol>
<p>The Mac creates a file called "folder name.zip" in the same place.</p>
<h2>Upload and share</h2>
<ol>
<li>Open Upload on <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> and drop in the ZIP file.</li>
<li>Copy the link when the upload is done.</li>
<li>Send it to whoever needs the folder.</li>
</ol>
<p>On a free account a single file can be up to 5 GB, which fits a lot of photos. If your folder is bigger, split it into two or three ZIP files, for example by month or by topic, or use <a href="https://vidlify.to/storage">paid storage</a> for files up to 200 GB.</p>
<h2>How the receiver opens it</h2>
<ul>
<li><strong>Windows and Mac:</strong> double-click the downloaded ZIP file. Both systems open ZIP files without any extra software.</li>
<li><strong>iPhone and iPad:</strong> tap the file in the Files app, it unpacks into a folder.</li>
<li><strong>Android:</strong> most file manager apps can open ZIP files, including Google's Files app.</li>
</ul>
<h2>Tips</h2>
<ul>
<li><strong>Name the ZIP clearly.</strong> "Italy-2026-photos.zip" is easier to find later than "New folder.zip".</li>
<li><strong>Remove what nobody needs</strong> before zipping, like duplicates or blurry shots. Smaller uploads finish faster.</li>
<li><strong>For private folders,</strong> switch on <a href="https://vidlify.to/blog/what-extra-security-does">extra security</a> before uploading. The ZIP is then encrypted in your browser, and only the full link can open it.</li>
</ul>
<p><em>Originally published on the <a href="https://vidlify.to/blog/send-a-whole-folder?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[File transfer or file hosting: which one do you need?]]></title><description><![CDATA[There are two kinds of services for sending big files, and they look similar at first: you upload something and get a link. But they are built for…]]></description><link>https://vidlify.hashnode.dev/file-transfer-or-file-hosting-which-one-do-you-need</link><guid isPermaLink="true">https://vidlify.hashnode.dev/file-transfer-or-file-hosting-which-one-do-you-need</guid><category><![CDATA[Productivity]]></category><category><![CDATA[Cloud]]></category><category><![CDATA[tools]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:39:26 GMT</pubDate><content:encoded><![CDATA[<p>There are two kinds of services for sending big files, and they look similar at first: you upload something and get a link. But they are built for different jobs, and picking the wrong one is how links end up dead or videos end up unwatchable.</p>
<h2>File transfer: hand it over once</h2>
<p>A transfer service is like a courier. You upload a file, the receiver downloads it, and after a set time the file is deleted.</p>
<p><strong>Good for:</strong></p>
<ul>
<li>sending a file to one person or a small group, one time</li>
<li>handovers where you don't want the file to stay online</li>
</ul>
<p><strong>Less good for:</strong></p>
<ul>
<li>anything people may open again later, because the link expires</li>
<li>videos people should watch, because they usually have to download the whole file first</li>
</ul>
<h2>File hosting: keep it online</h2>
<p>A file host keeps your upload online and gives it a link that keeps working. Many hosts, <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> included, also play videos in the browser and let you embed them on websites.</p>
<p><strong>Good for:</strong></p>
<ul>
<li>videos you want people to watch right away, in the browser</li>
<li>links you post on a website, in a forum or in a group chat where people open them over weeks</li>
<li>embedding videos on your own site</li>
<li>files you send to many people, again and again</li>
</ul>
<p><strong>Less good for:</strong></p>
<ul>
<li>one-off handovers you want gone afterwards. You can still do that by deleting the upload once it has been downloaded.</li>
</ul>
<h2>Side by side</h2>
<table>
<thead>
<tr>
<th></th>
<th>File transfer</th>
<th>File hosting</th>
</tr>
</thead>
<tbody><tr>
<td>Link lifetime</td>
<td>expires after a set time</td>
<td>stays, usually as long as it is used</td>
</tr>
<tr>
<td>Watching videos</td>
<td>download first</td>
<td>plays in the browser</td>
</tr>
<tr>
<td>Embedding on websites</td>
<td>rarely</td>
<td>yes</td>
</tr>
<tr>
<td>Account needed</td>
<td>often not</td>
<td>usually yes</td>
</tr>
<tr>
<td>Typical use</td>
<td>one-time handover</td>
<td>sharing, publishing, embedding</td>
</tr>
</tbody></table>
<h2>How Vidlify fits in</h2>
<p>Vidlify is a file host with a few things that make it handy for transfers too:</p>
<ul>
<li><strong>Videos stream right away</strong> in qualities up to 4K, or you store them as plain files for download.</li>
<li><strong>Big files work:</strong> up to 5 GB per file on a free account, up to 200 GB with <a href="https://vidlify.to/storage">paid storage</a>.</li>
<li><strong>You decide how long it stays.</strong> Delete an upload when the handover is done, or keep it. Uploads nobody uses are cleaned up after a while, as described in <a href="https://vidlify.to/blog/how-long-uploads-stay-online">How long do files stay online?</a></li>
<li><strong>Private by default.</strong> Nothing is listed or searchable, only people with the link can open it.</li>
</ul>
<h2>The short version</h2>
<p>If the receiver only needs the file once and it should disappear afterwards, a transfer is fine. If people should watch it, open it later or see it on a website, use a file host.</p>
<p><em>Originally published on the <a href="https://vidlify.to/blog/file-transfer-vs-file-hosting?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Extra security: end-to-end encrypted file sharing, explained]]></title><description><![CDATA[When you share something online, two questions matter: who can open it, and who can read it. Vidlify answers the first one for every upload. Extra security…]]></description><link>https://vidlify.hashnode.dev/extra-security-end-to-end-encrypted-file-sharing-explained</link><guid isPermaLink="true">https://vidlify.hashnode.dev/extra-security-end-to-end-encrypted-file-sharing-explained</guid><category><![CDATA[Security]]></category><category><![CDATA[encryption]]></category><category><![CDATA[privacy]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:38:19 GMT</pubDate><content:encoded><![CDATA[<p>When you share something online, two questions matter: who can open it, and who can read it. <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> answers the first one for every upload. Extra security answers the second one as well, with end-to-end encryption that happens in your own browser.</p>
<h2>Secure by default</h2>
<p>Every upload, with or without extra security:</p>
<ul>
<li>travels over an encrypted connection</li>
<li>gets a random link that is practically impossible to guess</li>
<li>is not listed, not searchable and not shown in any feed</li>
</ul>
<p>For most things you share, that is enough. On our server, though, a normal upload is stored as it is. That is what lets us play videos in the player, show previews and act on reports.</p>
<h2>What extra security adds</h2>
<p>If you switch on Extra security before uploading, your browser does three things before anything leaves your device:</p>
<ol>
<li>It creates a new random key for this one file.</li>
<li>It encrypts the file with that key, using AES-GCM, a widely used standard.</li>
<li>It uploads only the encrypted data, together with an encrypted file name.</li>
</ol>
<p>The key becomes part of your link, after the <code>#</code> sign:</p>
<pre><code>vidlify.to/f/k3J9xQ2mWp#Zq8vT1nR4cL7yB0xQe2sA9
</code></pre>
<p>Browsers never send the part after <code>#</code> to a server, so the key does not reach us. We store scrambled data that we cannot read, and we don't know the file name either. When someone opens the link, their browser takes the key from the link, downloads the encrypted file and unlocks it on their own device.</p>
<h2>What we can and can't see</h2>
<table>
<thead>
<tr>
<th></th>
<th>Normal upload</th>
<th>With extra security</th>
</tr>
</thead>
<tbody><tr>
<td>File content</td>
<td>stored as it is</td>
<td>encrypted, unreadable for us</td>
</tr>
<tr>
<td>File name</td>
<td>visible to us</td>
<td>encrypted, unless you give it a display name</td>
</tr>
<tr>
<td>File size</td>
<td>visible to us</td>
<td>visible to us</td>
</tr>
<tr>
<td>Who can open it</td>
<td>anyone with the link</td>
<td>anyone with the full link incl. key</td>
</tr>
</tbody></table>
<h2>What that means for you</h2>
<ul>
<li><strong>Keep the link.</strong> It is the only key. If it is lost, nobody can open the file, not even us. The browser you uploaded from remembers the key, other devices don't.</li>
<li><strong>Anyone with the full link can open the file.</strong> Send it only to people who should have it, ideally through a channel you trust.</li>
<li><strong>Videos are stored as files.</strong> We can't turn an encrypted video into a stream, so it is downloaded instead of played in the player.</li>
<li><strong>Previews happen in the browser.</strong> Small images are shown after they are unlocked, everything else is downloaded.</li>
</ul>
<h2>When to use it</h2>
<p>Use extra security for contracts, invoices, scanned documents, backups and anything else that is nobody's business but yours and the person you send it to.</p>
<p>Use the normal upload for videos you want to stream or <a href="https://vidlify.to/blog/embed-video-without-youtube">embed on a website</a>, and for things you share publicly anyway.</p>
<h2>What about illegal content?</h2>
<p>Encryption does not change the rules. Our <a href="https://vidlify.to/terms">terms</a> apply to every upload, and we act on every report. A report about an encrypted file needs the full link including the key, so that we can check it.</p>
<p><em>Originally published on the <a href="https://vidlify.to/blog/what-extra-security-does?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[MP4, MOV, MKV or WebM: which video format should you upload?]]></title><description><![CDATA[Phones record MOV, screen recorders save MKV, editing apps offer a dozen export options. Which one should you pick when the video is going online? The…]]></description><link>https://vidlify.hashnode.dev/mp4-mov-mkv-or-webm-which-video-format-should-you-upload</link><guid isPermaLink="true">https://vidlify.hashnode.dev/mp4-mov-mkv-or-webm-which-video-format-should-you-upload</guid><category><![CDATA[video]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:37:14 GMT</pubDate><content:encoded><![CDATA[<p>Phones record MOV, screen recorders save MKV, editing apps offer a dozen export options. Which one should you pick when the video is going online? The short answer: MP4 with H.264. The longer answer helps you understand why, and when something else is fine too.</p>
<h2>Container and codec: two different things</h2>
<p>A video file has two layers:</p>
<ul>
<li>The <strong>container</strong> is the file type you see in the name: <code>.mp4</code>, <code>.mov</code>, <code>.mkv</code>, <code>.webm</code>. It is a box that holds the video, the sound, subtitles and some information about the file.</li>
<li>The <strong>codec</strong> is how the picture and sound inside the box are compressed. Common video codecs are H.264, H.265 (also called HEVC), VP9 and AV1. For audio it is usually AAC or Opus.</li>
</ul>
<p>Two MP4 files can therefore be very different inside. That is why a video sometimes plays on one device and not on another, even though both "play MP4".</p>
<h2>The common formats at a glance</h2>
<table>
<thead>
<tr>
<th>Format</th>
<th>Typical source</th>
<th>Good to know</th>
</tr>
</thead>
<tbody><tr>
<td>MP4</td>
<td>most cameras, phones, editing apps</td>
<td>the safest choice for the web</td>
</tr>
<tr>
<td>MOV</td>
<td>iPhone, Mac, QuickTime</td>
<td>often H.265 inside, which not every browser plays</td>
</tr>
<tr>
<td>MKV</td>
<td>screen recorders, OBS</td>
<td>flexible, but browsers don't play it directly</td>
</tr>
<tr>
<td>WebM</td>
<td>web tools, browser recordings</td>
<td>made for the web, VP9 or AV1 inside</td>
</tr>
<tr>
<td>AVI, WMV, FLV</td>
<td>older software</td>
<td>dated, best converted</td>
</tr>
</tbody></table>
<h2>What to export for the web</h2>
<p>If you control the export, use these settings:</p>
<ul>
<li><strong>Container:</strong> MP4</li>
<li><strong>Video codec:</strong> H.264 (or H.265 if your tool doesn't offer H.264 at high quality)</li>
<li><strong>Audio:</strong> AAC, 128 to 320 kbit/s</li>
<li><strong>Resolution:</strong> the same as your footage, up to 4K</li>
<li><strong>Bitrate:</strong> rather high than low. The online version can only be as good as what you upload.</li>
</ul>
<h2>What <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> does with your upload</h2>
<p>You don't have to convert anything yourself. Vidlify accepts MP4, MOV, MKV, WebM, AVI, M4V, WMV, FLV, MPG, MPEG and 3GP.</p>
<p>After the upload, the video is converted into a stream that plays in every modern browser: H.264 video and AAC audio, split into several qualities from 360p up to the resolution of your file, maximum 4K. An iPhone video in HEVC or an MKV from OBS ends up playing on any phone or laptop, without you doing anything.</p>
<p>The original file is deleted after the conversion. If people need the exact file, for example to edit it, switch on <strong>Store videos as plain files</strong> before uploading. The video is then kept unchanged and offered as a download. More on that in <a href="https://vidlify.to/blog/share-4k-video-without-losing-quality">How to share a 4K video without losing quality</a>.</p>
<h2>Quick answers</h2>
<ul>
<li><strong>My MOV from the iPhone won't play for a friend.</strong> It is probably H.265. Upload it to a video host that converts it, or export it as MP4 with H.264.</li>
<li><strong>Is MKV bad?</strong> No, it is a great format for recording. It just isn't made for browsers, so convert it or upload it to a host that does.</li>
<li><strong>Should I use AV1?</strong> It is very efficient, but not every device decodes it smoothly yet. For sharing, H.264 still works best everywhere.</li>
</ul>
<p><em>Originally published on the <a href="https://vidlify.to/blog/video-formats-explained?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Link only vs. private: who can see your uploads?]]></title><description><![CDATA[On most video platforms, "public" means anyone can find your upload by searching, and "unlisted" means it is hidden from search but open to anyone with the…]]></description><link>https://vidlify.hashnode.dev/link-only-vs-private-who-can-see-your-uploads</link><guid isPermaLink="true">https://vidlify.hashnode.dev/link-only-vs-private-who-can-see-your-uploads</guid><category><![CDATA[privacy]]></category><category><![CDATA[Security]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:35:58 GMT</pubDate><content:encoded><![CDATA[<p>On most video platforms, "public" means anyone can find your upload by searching, and "unlisted" means it is hidden from search but open to anyone with the link. <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> doesn't have a public mode at all. Every upload is either <strong>Link only</strong> or <strong>Private</strong>.</p>
<h2>Link only</h2>
<p>This is the default. A Link only upload:</p>
<ul>
<li>can be opened by anyone who has its link</li>
<li>does not appear in any list, search, channel or feed on Vidlify</li>
<li>tells search engines not to index it, so it doesn't show up on Google either</li>
<li>gets a random link that is practically impossible to guess</li>
</ul>
<p>So the only way to reach the file is to be given the link. That makes it the right choice for almost everything you share: a video for your family, files for a client, a clip for a Discord server.</p>
<h2>Private</h2>
<p>A Private upload can only be opened by you, while you are logged in. The link alone is not enough: anyone else who opens it sees nothing.</p>
<p>Use Private for:</p>
<ul>
<li>files you are keeping for yourself</li>
<li>uploads that are not ready yet, for example a video you still want to check</li>
<li>anything you shared before and want to take back without deleting it</li>
</ul>
<p>You can switch an upload between Link only and Private at any time in its settings. Switching to Private locks the link for everyone else who has it.</p>
<h2>The one thing to keep in mind</h2>
<p>A link can be forwarded. If you send a Link only upload to someone, they can pass the link on, and whoever receives it can open the file too. That is true for every link-based service.</p>
<p>If that is a risk for a particular file:</p>
<ul>
<li>set it to <strong>Private</strong> once the right people have it, or delete it</li>
<li>for videos you embed on your website, <a href="https://vidlify.to/blog/stop-other-sites-embedding-your-videos">limit playback to your own domain</a></li>
<li>for sensitive files, switch on <a href="https://vidlify.to/blog/what-extra-security-does">extra security</a> so that the content is encrypted and only the full link with the key can open it</li>
</ul>
<h2>Quick comparison</h2>
<table>
<thead>
<tr>
<th></th>
<th>Link only</th>
<th>Private</th>
</tr>
</thead>
<tbody><tr>
<td>Opens with the link</td>
<td>yes</td>
<td>only for you</td>
</tr>
<tr>
<td>Listed or searchable</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>Indexed by Google</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>Can be embedded</td>
<td>yes</td>
<td>no</td>
</tr>
<tr>
<td>Good for</td>
<td>sharing</td>
<td>keeping, drafts, taking back</td>
</tr>
</tbody></table>
<p><em>Originally published on the <a href="https://vidlify.to/blog/unlisted-vs-private-links?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[File sharing without an email address]]></title><description><![CDATA[Almost every website asks for your email address before you can do anything. Vidlify doesn't. You sign up with a username and a password, and that's it…]]></description><link>https://vidlify.hashnode.dev/file-sharing-without-an-email-address</link><guid isPermaLink="true">https://vidlify.hashnode.dev/file-sharing-without-an-email-address</guid><category><![CDATA[privacy]]></category><category><![CDATA[Security]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:34:40 GMT</pubDate><content:encoded><![CDATA[<p>Almost every website asks for your email address before you can do anything. <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> doesn't. You sign up with a username and a password, and that's it. Here is why, and what it means for you.</p>
<h2>Why we don't ask for it</h2>
<p>An email address is one of the most personal pieces of data you give a website. It connects your accounts across services, it ends up on marketing lists, and it can leak in a data breach. For sharing files and videos, we simply don't need it, so we don't collect it.</p>
<p>That also means no newsletters, no "we miss you" emails and nothing to unsubscribe from.</p>
<h2>What we store instead</h2>
<p>When you create an account, we store:</p>
<ul>
<li>your username</li>
<li>your password as a one way hash, which we cannot read</li>
<li>when you signed up, your plan and your settings</li>
</ul>
<p>To stop people from creating dozens of free accounts, we also keep a browser cookie and your network address, but only as keyed hashes that we cannot turn back into an IP address. Server logs are deleted after 14 days at the latest. All the details are in our <a href="https://vidlify.to/privacy">privacy policy</a>.</p>
<h2>How you get back in without email</h2>
<p>The usual "forgot password" email doesn't exist here. Instead, you get a <strong>recovery code</strong>: a one-time code that lets you set a new password.</p>
<ul>
<li>Create it on your account page and keep it somewhere safe, for example in a password manager or printed out.</li>
<li>We only store a hash of it, so we can't look it up for you.</li>
<li>Anyone who has your code can reset your password, so treat it like a password.</li>
</ul>
<p>If you lose both your password and your recovery code, we can't hand the account back to anyone, because we have no way to tell who the real owner is. That is the other side of not knowing your email.</p>
<h2>Even more private</h2>
<ul>
<li><strong>Use a VPN.</strong> A trustworthy VPN hides your IP address from every website you visit, including ours.</li>
<li><strong>Pay without your name.</strong> Paid storage can also be paid with cryptocurrency through our own payment server, without a payment company in between.</li>
<li><strong>Encrypt sensitive files.</strong> With <a href="https://vidlify.to/blog/what-extra-security-does">extra security</a>, files are encrypted in your browser and we can't read them.</li>
</ul>
<h2>Is it safe without email?</h2>
<p>Yes, as long as you choose a strong password and keep your recovery code. A password manager makes both easy. Your uploads are not tied to your name, and what you share is only visible to people who have the link.</p>
<p><em>Originally published on the <a href="https://vidlify.to/blog/file-sharing-without-email?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to share a 4K video without losing quality]]></title><description><![CDATA[You filmed in 4K, the footage looks stunning on your screen, and after sharing it looks like it was filmed with a potato. That is not your camera. Almost…]]></description><link>https://vidlify.hashnode.dev/how-to-share-a-4k-video-without-losing-quality</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-share-a-4k-video-without-losing-quality</guid><category><![CDATA[video]]></category><category><![CDATA[Video Editing]]></category><category><![CDATA[Photography]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:33:24 GMT</pubDate><content:encoded><![CDATA[<p>You filmed in 4K, the footage looks stunning on your screen, and after sharing it looks like it was filmed with a potato. That is not your camera. Almost every platform compresses video on the way, and the sharper your source, the more you notice it.</p>
<h2>Where the quality gets lost</h2>
<ul>
<li><strong>Messengers</strong> like WhatsApp lower resolution and bitrate for videos sent as media, so they load quickly on mobile data.</li>
<li><strong>Social networks</strong> re-encode every upload, and many cap the resolution below 4K for most users.</li>
<li><strong>Email</strong> can't carry a 4K file at all: most providers stop at about 20 to 25 MB per message.</li>
</ul>
<p>The fix is to share a link to a host that keeps 4K, instead of pushing the file through an app that shrinks it.</p>
<h2>Two ways to share in 4K on <a href="https://vidlify.to/?ref=hashnode">Vidlify</a></h2>
<h3>1. As a video people can stream</h3>
<p>Upload the video normally. Vidlify converts it into several qualities:</p>
<table>
<thead>
<tr>
<th>Quality</th>
<th>Resolution (shorter side)</th>
</tr>
</thead>
<tbody><tr>
<td>4K</td>
<td>2160p</td>
</tr>
<tr>
<td>1440p</td>
<td>1440p</td>
</tr>
<tr>
<td>Full HD</td>
<td>1080p</td>
</tr>
<tr>
<td>HD</td>
<td>720p</td>
</tr>
<tr>
<td>SD</td>
<td>480p and 360p</td>
</tr>
</tbody></table>
<p>The player picks the best quality for each viewer's screen and connection automatically, and viewers can choose one themselves. Someone on a big screen with fast internet watches in 4K, someone on a train gets a smooth 720p instead of endless buffering.</p>
<p>4K is included on the free plan too, as long as your upload is 4K. A video is never converted above the resolution you uploaded.</p>
<p>Good for: showing a video to people, embedding it on a website, sharing it in chats.</p>
<h3>2. As the original file</h3>
<p>Switch on <strong>Store videos as plain files</strong> before uploading. The video is then not converted at all. People get a download button and receive your file exactly as you uploaded it, with the original codec, bitrate and metadata.</p>
<p>Good for: sending footage to an editor, a client or anyone who needs the raw file.</p>
<p>Note that with the normal video upload, the original file is deleted after conversion. If you need to keep sharing the original, use the plain file option.</p>
<h2>Tips for the best result</h2>
<ul>
<li><strong>Export at a high bitrate.</strong> The stream can only be as good as what you upload. A heavily compressed export won't get better on the way.</li>
<li><strong>Common formats work best.</strong> MP4 with H.264 or H.265 is the safest choice, MOV, MKV and WebM work too.</li>
<li><strong>Mind the file size.</strong> A free account takes single files up to 5 GB. A few minutes of 4K from a phone fit easily, a long camera recording may not. Paid storage allows files up to 200 GB.</li>
<li><strong>Give it time.</strong> Converting 4K takes longer than HD. The link works right away, the 4K quality becomes available when it is ready.</li>
</ul>
<p><em>Originally published on the <a href="https://vidlify.to/blog/share-4k-video-without-losing-quality?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to share a large file with just a link]]></title><description><![CDATA[Email attachments stop at around 20 to 25 MB with most providers, and chat apps either shrink your videos or refuse big files altogether. A link gets…]]></description><link>https://vidlify.hashnode.dev/how-to-share-a-large-file-with-just-a-link</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-share-a-large-file-with-just-a-link</guid><category><![CDATA[Productivity]]></category><category><![CDATA[Cloud]]></category><category><![CDATA[tools]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:28:57 GMT</pubDate><content:encoded><![CDATA[<p>Email attachments stop at around 20 to 25 MB with most providers, and chat apps either shrink your videos or refuse big files altogether. A link gets around all of that: the file sits in one place, and whoever has the link downloads it straight from there.</p>
<p>This guide shows how it works on <a href="https://vidlify.to/?ref=hashnode">Vidlify</a>, how big your files can be, and what to watch out for.</p>
<h2>Why a link works better than an attachment</h2>
<ul>
<li><strong>One upload, as many people as you like.</strong> You upload the file once and send the same link to one person or a hundred.</li>
<li><strong>Nothing to install.</strong> The other person needs no account and no app. A browser is enough, on a phone or a computer.</li>
<li><strong>No compression.</strong> Files arrive exactly as you uploaded them, byte for byte. A photo stays sharp, a ZIP archive stays intact.</li>
<li><strong>Your inbox stays small.</strong> Neither you nor the receiver has a 2 GB email clogging up the mailbox.</li>
</ul>
<h2>Step by step</h2>
<ol>
<li><strong>Create an account.</strong> You pick a username and a password. We don't ask for an email address. At the end you get a recovery code: keep it somewhere safe, it is the only way to reset a lost password.</li>
<li><strong>Upload the file.</strong> Open Upload and drop the file in, or several at once. Videos get a player you can embed on websites. If you want people to download the original video file instead, switch on "Store videos as plain files" first.</li>
<li><strong>Copy the link</strong> as soon as the upload is done, and send it by chat, email or wherever you like.</li>
</ol>
<p>That's it. The person you send it to opens the link and gets a download button, or a player for videos.</p>
<h2>How big can the file be?</h2>
<table>
<thead>
<tr>
<th>Account</th>
<th>Largest single file</th>
<th>Storage</th>
</tr>
</thead>
<tbody><tr>
<td>Free</td>
<td>5 GB</td>
<td>30 GB</td>
</tr>
<tr>
<td>Paid storage</td>
<td>up to 200 GB</td>
<td>depends on the plan</td>
</tr>
</tbody></table>
<p>The current plans and prices are on the <a href="https://vidlify.to/storage">storage page</a>.</p>
<p>Big files go up in pieces. If your connection drops for a moment, the upload waits and carries on where it stopped instead of starting over. For very large uploads, a cable connection beats WiFi, and your upload speed (not download speed) is what decides how long it takes.</p>
<h2>Who can open the link?</h2>
<p>Uploads on Vidlify are never listed, searchable or shown in a feed, and our upload pages tell search engines not to index them. Only people who have the link can open a file. If you set an upload to <strong>Private</strong>, only you can open it. More on the difference in <a href="https://vidlify.to/blog/unlisted-vs-private-links">Link only vs. private</a>.</p>
<p>For anything sensitive, switch on <strong>Extra security</strong> before uploading. The file is then encrypted in your browser, and we can't read it either. <a href="https://vidlify.to/blog/what-extra-security-does">Here is how that works</a>.</p>
<h2>Tips for sending big files</h2>
<ul>
<li><strong>Zip folders first.</strong> Many small files are easier to send as one archive, and the receiver gets the folder structure in one go.</li>
<li><strong>Give the file a clear name.</strong> "Wedding-video-final.mp4" says more in a download list than "IMG_4821.mp4".</li>
<li><strong>Check the link once</strong> in a private browser window before you send it to many people.</li>
</ul>
<h2>Good to know</h2>
<ul>
<li>Keep your own copy of anything important. A link is for sharing, not your only backup.</li>
<li>Uploads that nobody uses for a long time can be deleted for inactivity. The exact rule is in the <a href="https://vidlify.to/terms#inactivity">terms</a>.</li>
<li>Only upload files you have the rights to share.</li>
</ul>
<p><em>Originally published on the <a href="https://vidlify.to/blog/share-large-files-with-a-link?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to stop other websites from embedding your videos]]></title><description><![CDATA[Once a video is embedded on your website, anyone can open the page source, copy the iframe and put your video on their own site. They get your content, and…]]></description><link>https://vidlify.hashnode.dev/how-to-stop-other-websites-from-embedding-your-videos</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-stop-other-websites-from-embedding-your-videos</guid><category><![CDATA[Web Development]]></category><category><![CDATA[Security]]></category><category><![CDATA[video]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:15:07 GMT</pubDate><content:encoded><![CDATA[<p>Once a video is embedded on your website, anyone can open the page source, copy the iframe and put your video on their own site. They get your content, and you pay for the traffic. A domain lock stops that.</p>
<h2>How the domain lock works</h2>
<p>Every video on <a href="https://vidlify.to/?ref=hashnode">Vidlify</a> has a setting called <strong>Allow embedding only on these domains</strong>. If you enter your domain there, the player checks where it is being loaded:</p>
<ul>
<li>on your website: the video plays as usual</li>
<li>on any other website: the player refuses to load</li>
<li>subdomains of your domain are allowed automatically, so <code>myblog.com</code> also covers <code>shop.myblog.com</code></li>
</ul>
<p>Under the hood this uses two things browsers already support: a security header that tells browsers on which sites the player may be shown, and a check of where the request comes from. Copying the embed code to another site doesn't help, because the address of that site is not on your list.</p>
<h2>Set it up in under a minute</h2>
<ol>
<li>Open the video in <strong>My files</strong> and go to its settings.</li>
<li>Under <strong>Allow embedding only on these domains</strong>, enter your domain, for example <code>myblog.com</code>. Several domains can be separated with commas.</li>
<li>Save.</li>
</ol>
<p>That's it. Your existing embeds keep working, and copies on other sites stop playing.</p>
<h2>Good to know</h2>
<ul>
<li><strong>Leave the field empty</strong> to allow embedding everywhere. That is the default.</li>
<li><strong>Direct links still open.</strong> Someone who opens the video link itself, for example from a chat, can still watch it. The lock is about other websites showing your player. To limit who can open the link at all, set the video to <a href="https://vidlify.to/blog/unlisted-vs-private-links">Private</a>.</li>
<li><strong>Link previews are switched off</strong> for locked videos, so chat apps and social networks don't show the video inline either.</li>
<li><strong>Test it</strong> by opening your page in a private browser window after saving.</li>
</ul>
<h2>When to use it</h2>
<ul>
<li>videos you made for your own website, course or shop</li>
<li>content that other sites like to copy, such as tutorials or clips</li>
<li>videos where you want every view to happen on your site, for example because you earn money with the page around it</li>
</ul>
<p>For anything else, the open default is fine: it lets people share your video wherever they like.</p>
<p><em>Originally published on the <a href="https://vidlify.to/blog/stop-other-sites-embedding-your-videos?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to autoplay an embedded video (and why it has to be muted)]]></title><description><![CDATA[A video that starts by itself can bring a landing page to life: a product in motion, a short loop in the header, a demo that runs while people read. But if…]]></description><link>https://vidlify.hashnode.dev/how-to-autoplay-an-embedded-video-and-why-it-has-to-be-muted</link><guid isPermaLink="true">https://vidlify.hashnode.dev/how-to-autoplay-an-embedded-video-and-why-it-has-to-be-muted</guid><category><![CDATA[Web Development]]></category><category><![CDATA[HTML]]></category><category><![CDATA[video]]></category><dc:creator><![CDATA[Vidlify]]></dc:creator><pubDate>Thu, 26 Nov 2026 16:14:00 GMT</pubDate><content:encoded><![CDATA[<p>A video that starts by itself can bring a landing page to life: a product in motion, a short loop in the header, a demo that runs while people read. But if you have ever tried it, you know browsers often refuse to start the video. Here is why, and how to get it right.</p>
<h2>Why browsers block autoplay</h2>
<p>Nobody likes a website that suddenly starts talking. That is why Chrome, Safari, Firefox and Edge all limit autoplay:</p>
<ul>
<li><strong>Muted videos may start on their own.</strong> This is allowed in all major browsers.</li>
<li><strong>Videos with sound usually may not.</strong> They only autoplay in some cases, for example when the visitor has already interacted with the page or the site, and the rules differ between browsers.</li>
</ul>
<p>So if you want autoplay to work reliably for everyone, the video has to start muted. Visitors can still turn on the sound with one click.</p>
<h2>Autoplay with <a href="https://vidlify.to/?ref=hashnode">Vidlify</a></h2>
<p>Take the embed code of your video (see <a href="https://vidlify.to/blog/embed-video-without-youtube">How to embed a video on your website</a>) and add two parameters to the address:</p>
<pre><code>https://vidlify.to/e/VIDEO-ID?autoplay=1&amp;muted=1
</code></pre>
<ul>
<li><code>autoplay=1</code> tells the player to start right away.</li>
<li><code>muted=1</code> starts it without sound, which is what browsers require.</li>
</ul>
<p>The embed code from Vidlify already contains <code>allow="autoplay"</code> in the iframe, which is the permission the browser needs to let an embedded player start. If you write your own iframe, keep that attribute.</p>
<p>You can combine it with a start time, for example <code>?autoplay=1&amp;muted=1&amp;t=15</code> starts at second 15.</p>
<h2>When autoplay is a good idea</h2>
<ul>
<li><strong>Short, silent clips</strong> that work without sound, like product shots, background visuals or screen recordings.</li>
<li><strong>A page that is about the video,</strong> where the visitor came to watch anyway.</li>
</ul>
<h2>When it isn't</h2>
<ul>
<li><strong>Long videos with speech.</strong> Muted, nobody understands them. Let people press play.</li>
<li><strong>Several videos on one page.</strong> Autoplaying all of them costs your visitors data and makes the page slow.</li>
<li><strong>Mobile visitors on data.</strong> A video that starts on its own uses their data allowance. The player only loads a quality that fits the screen, but it still downloads video.</li>
</ul>
<h2>Tips</h2>
<ul>
<li><strong>Put the key message in the picture,</strong> not in the sound. Muted autoplay should make sense without audio.</li>
<li><strong>Use subtitles burned into the video</strong> if speech matters, so the message comes across muted.</li>
<li><strong>Test on a phone.</strong> Mobile browsers are the strictest about autoplay and data.</li>
</ul>
<p><em>Originally published on the <a href="https://vidlify.to/blog/autoplay-embedded-videos?ref=hashnode">Vidlify blog</a>.</em></p>
]]></content:encoded></item></channel></rss>