[301 / 53 / ?]

Store data in youtube videos

No.51079713 ViewReplyReportDelete
Continued from

>>51076203

Original post:

What if you could use youtube as your own cloud backup solution?

We've been experimenting a little, an when you take into account the artifacts caused by youtubes compression algorithm, you can fit data like QR codes per 1080p frame and stay within the noise profile needed to read the QR code.

Since they have a certain amount of overhead some user came up with a solution to just force ffmpeg to output the data using en encoder script like this one, that has been confirmed working, is as follows:

#!/bin/sh
input=$1
width=1280
height=720
rate=30

## pad input to avoid truncation
framesize=$(($width*$height/(8*8)/8))
truncate -s %$framesize $1

## create intermediary
"/home/valk/Desktop/ffmpeg" -f rawvideo -pix_fmt monob -s $(($width/8))x$(($height/8)) -r $rate -i $input -vf "scale=iw*8:-1" -sws_flags neighbor -c:v libx264 -crf 0 ${input%.*}-step1.mkv
## convert to desired format
"/home/valk/Desktop/ffmpeg" -i ${input%.*}-step1.mkv -c:v libvpx -b:v 256k -deadline best -threads 8 ${input%.*}-step2.webm
## decode it for testing
"/home/valk/Desktop/ffmpeg" -i ${input%.*}-step2.webm -vf "format=pix_fmts=monob,scale=iw/8:-1" -sws_flags area -f rawvideo ${input%.*}-step3.${input#*.}