100% of this document was written by Po-Shen Loh, without any AI (even for feedback on grammar/composition). It was then fed into Claude Code to build the initial page. PLAN: This page contains a blog post from me (Po-Shen Loh). It should go into poshenloh.com/posts/20260904-ai-video-ad-campaign. Also make a version at poshenloh.com/posts/20260904-ai-video-ad-campaign-zh which is translated into Chinese at a high quality translation level. My team gave me feedback on your initial translation: "it's understandable most of the time, but it's also quite obvious that it was automatically translated and not manually adjusted. One way to improve the readability might be to have AI translate it in a way that better fits natural Chinese language use and expressions. That could also be a great example of using AI to enhance cross-cultural understanding through translation!" If you auto-detect the browser language is Chinese on the original main page, auto-redirect to the Chinese version. There is no need for a button to change the language to Chinese on the main page. Automatic is enough. The page should be more fun than my usual page, because it corresponds to ads which are seriously fun. Look in ~/ads-live-motion-assets/videos/www/20260904-ads/20260904-initial-c.mp4 for an example, and also look through the other 20260904-initial-*.mp4's too, which are in various stages of polish. And look in ~/ads-live-motion/ to see how they were created, to get their visual language. I wonder if any of that visual language can be used for this page too. The colorful rectangle-shadows behind the embedded videos might be too loud for this page, but see if you can come up with something that jives with the aesthetic. For example, the brain bumping the phone out of Thought Full. Make sure to use the same visuals as the ends of the ad videos we have. That should be easy because those were code anyway. But don't include the "Math made" there, or the link poshenloh.com/thought-full. Just the "thought full" is enough with Mission and Newsletter. This is a very long post. Some parts are prompts I made to Claude/Codex. Think about how to display everything in a more delightful way. I have also interspersed philosophy in the post. I originally was thinking that there could be a way to have the philosophy be in smaller font and 50% bright, where if you click on it, it expands to normal size text and 80% bright. But I also don't know if there's a clean way to separate out philosophy in the way I've written things before. I do think there should be a TL;DR summary somewhere which identifies the key steps that I took which unlocked the possibilities, and lets you jump to the part of the page which talks about them (smooth-scroll quickly down, with easing in and out). I suppose that's like a navigation bar of sorts, but I already have a navbar for my personal website. Some of those key things might be: * Remotion * Lyria * Storyblocks * Teach Claude what's so special about us to give itself full confidence * Blur text using baseline detection Number them without leading 0's. Don't include any links back to our LIVE platform or courses at the bottom of this page. But do include a link to the mission, and to subscribe to my newsletter. Look at the contact page in the poshenloh-www repo for that. If the footer already shows by default, then no need for links to follow my socials. UI: make the video ads play/pause when you click on them, not only on the tiny play button. On desktop, when you click on a video, make it pop up to take up a good chunk of the screen, with an X button on the top right that appears when the mouse moves over the video block. I hope the HLS is smart enough to figure out which resolution to send, so that desktop people get a high-res version. Similarly, on mobile make the video pop up to full width of the screen, but where you can tell that there is still the rest of the page behind (maybe darkened/blurred outside of the video part). In both desktop + mobile, when you pop up the big version, start with a black square, not the thumbnail image, because that introduces a weird jerk. It darkens the video and makes it hard to read. Hide all default video player controls on both desktop + mobile, because they obscure what is showed. We no longer need the ability to full screen, for example, because our default does that. Make our overlaid X button to close out the full screen be at the very top right corner of the screen (usually outside the video itself). Credits: Include all significant tools, but not things like the font. Fine-tuning feedback: * In the subtitle, don't switch between italics and not-italics. * Whenever you use the typing-in animation (e.g., like "in a Weekend With $100"), don't use a vertical cursor bar, because it messes up centering, and it also sometimes leaves artifacts when it stays blinking in the wrong place. And while it's typing, make sure there's no jerk. There was jerk when the first W was typed. * In the video player, make sure the buffering gets ahead of the video before first playing. * On iOS, there was a bug where sound plays but the video is frozen. So make sure you don't introduce such a bug. * Make sure that the website navbar isn't weirdly over a different color background than the first PageBlock. *** TITLE: How Math + AI Made a Video Ad Campaign in a Weekend With $100 DATE: Sep 4, 2026 [Note: I actually wrote this text myself (link to this document placed somewhere reasonable in public/), and then asked Claude Code to build a webpage around it. The initial prompt, including the original post text itself, is also in that file.] The goal of this post is not to explain how to prompt AI, but rather how to think, problem-solve, and use AI responsibly to bring a complex human vision to life, without blurring reality and fiction. Last week, I needed to design a campaign with a whole series of video ads, for advanced math classes that are free for kids in schools that are rural [link to https://okcfox.com/news/local/new-live-program-brings-after-school-math-and-science-coaching-to-oklahoma-schools] or 85%+ free/reduced lunch [link to https://www.santafenewmexican.com/news/local_news/santa-fe-students-offered-unique-opportunity-through-global-math-program/article_73f44048-e277-11ef-bd9c-7b182ed187d9.html], and reasonably priced for everyone else. My vision for the campaign was: what if Apple, Buc-ee's, and Michael Jackson had a collaboration? There was only one problem. I had no designer and no budget. [(display in a muted way which is still visible) Edit added Sep 11: to clarify confusion, I am actually hiring for, and have the budget for, a full-time, mission-aligned designer who would grow long-term with our team [link to live.poshenloh.com/jobs]. But I needed to release this campaign imminently, which prompted me to figure out how to do my best with AI solo. By "no budget", the "no" is not zero, but figuratively relative to big companies' design teams. After this experience, I am even more inspired to search for a designer to explore the limits of creativity. They would use our new AI system for the grunt-work, hyper-accelerating their own iteration and innovation.] I did have an example that I liked, custom-designed over a year ago by the talented Julia Du [link to https://www.linkedin.com/in/julia-du-777jd]. She worked with us part-time between her graduation from Parsons and starting work at Google. [Don't link to Julia's video here, because we should lead with ours.] Thanks to Claude, Codex, Remotion, Storyblocks, Google Lyria, and Elevenlabs, we now have an entire ad campaign. Of course, it's not as good as what a professional designer can create. But it seems to already outclass every other ad campaign in the after-school math enrichment industry. And those companies actually have enormous marketing budgets, while we give away our profits to teach kids in lower-income and rural areas. [Show all of the portrait ads here in a horizontal carousel: video-hosting-pipeline:www:20260904-ads:20260904-initial-{c,e,f,d,g,p,n,m,o,q}-1x1.mp4 (Chinese is -zh-3x4.mp4), where c is centered and first. So presumably there is nothing to the left of it. ] Since I am an educator, I thought I'd share the recipe of how this was done. Note that this task is different from video editing (which many report you can ask GPT-6 Astra to "just do" for you using your regular video editor). This is more akin to Beethoven composing a symphony, than an elite audio engineer mixing tracks. I knew that if I asked AI to "make a video ad", I'd likely get something generic and boring. (There is a mathematical reason which supports this intuition, which I'll explain below.) I didn't bother at the time, but just for fun, I tried that just now, with this prompt: > I'm curious what you can create. Make a video ad inspired by this one. > Here are our unique value props. It should be AWESOME. [I uploaded Julia's video (link to video-hosting-pipeline:www:20260904-ads:202503-julia.mp4) and the 5-page document of our unique value props, but when clicking on the button to view my document, don't scroll to the bottom of the page, because people will have trouble scrolling back up. Maybe make it a pop up?] It made this: [video-hosting-pipeline:www:20260904-ads:202503-julia.mp4 next to video-hosting-pipeline:www:20260904-ads:gpt56-high-ad.mp4, captioned appropriately] Oof. It feels generic (much more on that later). The whole point of the Julia's video was to make the text playfully appear across each frame. That was entirely lost. And ChatGPT had no way to get videos of real people, which lost the human feel. At least it didn't AI-generate fake people. The visual layout and polish look sloppy. The words themselves might not be terrible. In case you're curious, several days later, I also tried using OpenAI Codex with GPT-5.6 Sol High Effort, as another test after I had succeeded already with Claude. Even with prompting, and will full access to Claude's codebase and our later-generated audio tracks, it produced these two iterations. It's always valuable to explore and find out if there are better ways of doing things, but after the experiment I switched back over to Claude Fable 5.1. [video-hosting-pipeline:www:20260904-ads:codex-ad1.mp4] [video-hosting-pipeline:www:20260904-ads:codex-ad2.mp4] There is a mathematical reason why the task of AI-creating videos is hard: the number of dimensions in the space of videos is absolutely enormous. At its most basic, if you simply consider a 30-second 1000x1000 60fps video, that is 30×1000×1000×60 ~= 2 billion [use the word here, not scientific notation] pixels, each of which has a red, green, and blue value, which is a total of 6 billion dimensions. Making an outstanding video amounts to choosing 6 billion values wisely. (If you thought winning the Powerball [link] jackpot was hard, that's "only" picking 6 numbers correctly.) If each value ranges from 0 to 255, that's 256^{6 billion} possibilities to optimize among. In contrast, coming up with an English language 150-character tweet "only" has around 30^150 possibilities. The exponent is the killer, and 150 is a lot smaller than 6 billion, so one could expect text to be easier to generate than video. In reality, the objective of AI algorithms (and perhaps our own human intelligence) is to vastly reduce the dimensionality worth considering. Perhaps that's why AI-generated video often feels "generic": it takes impossibly long to search and optimize over all possibilities. Yet what sets any product apart is to be iconic. A marketing speaker once told me never to claim to be the "best at X". Be the "only one who does X." --- Aside: Math intuition for why dimension-reduction is possible: example --- [Allow the user to click into it this see the whole discussion, but leave it at much much smaller font size and 50% brightness by default. I suppose it's best if it only takes up about 5 lines of space, and then fades out, expanding to full size if you click into it.] Suppose you want to describe a single 100x100 image. The simplest way is to give 3 numbers per pixel (red/green/blue values that determine its color), ordering the pixels such that #1 is the top-left corner, and then going left-to-right across each row, finishing with the bottom row. This totals 30,000 numbers (dimensions). [show a centered diagram which labels pixels #1, #100, #5000, #10000, which on desktop magnifies as you mouse over, and on mobile somehow intelligently gives you the idea. Be sparse on the caption because this takes up space, but giving instructions to mouse over is good.] If you knew only 3 of those 30,000 dimensions, you wouldn't understand much of anything. For example, the first 3 would only tell you the red/green/blue (hence color) of the top left pixel: [show comparison between the true image which I need you to find from some truly free place with no restrictions for any commercial use and no need for attribution, and a black square with the top left pixel matching the true image] Now consider another way of recording 30,000 values. This time, instead of the 1st/2nd/3rd values being the red/green/blue for the top-left pixel, they are: [make sure this also looks good on mobile] 1st = average red value of all pixels 2nd = same for blue 3rd = same for green After that: 4th = (red value of pixel #2) - (average red value of all pixels) 5th = same for blue 6th = same for green and so on, where for every pixel except #1, we record the difference between its color value and the average color value. Now, with just the first 3 values, you already know the average color! If you just used that for the whole image, you'd get: [show comparison with the true image next to a square which is the average color] These 3 alternative dimensions gave way "more bang for our buck". In reality, images are compressed a more sophisticated way, where the remaining dimensions also are sums and differences of values of pixels across the image. But hopefully this gives intuition for how looking at the same problem from a different perspective can capture more valuable information. This extreme example outperforms for pictures of sparse skies, but is less impressive for pictures of stadium crowds. In general, if you deeply understand your problem space, you can design better ways to break down high-dimensional spaces. As another analogy, consider the game "20 questions" to guess a friend's word. If you start with questions like "is the first letter of the word in the first half of the alphabet", and so on until you narrow down each letter one at a time, you'll only figure out a measly 4 letters. Yet many people start by asking "is it alive?", which simultaneously involves all of the letters at the same time. Just like how the average color value involves all of the pixels at once. --- end huge aside --- Whenever I approach a problem, I first try to figure out if its hardness comes from searching for a rare needle in an impossibly-high-dimensional haystack. If so, I then focus on identifying the most important dimensions which hopefully govern most of what's going on. This is analogous to how domain experts ask all of the "right" questions that slice to the heart of the matter. In this case, the insight was to compress dimensionality by asking Claude to find a programming language which could fully specify the whole animation in words and commands. Note that I did not even ask AI to create the ad yet. I asked to research the ideal way to vastly compress the number of dimensions, by searching for an alternative (web) format to express video in. > Open ~/ad.mp4 and look at its style. Then look at the files in ~/julia. > Those are the ingredient clips. I'd like to generate our own spinoff ads. > I wonder if it's now possible to create them in some web format and > render them ourselves and create MP4's instead of using Adobe After > Effects. Because then we could specify everything programmatically. Is > this actually possible? If so, what would be best? Next.js? React? Vue? [These are actually my real prompts. Apparently I still capitalize and use punctuation. I think it is respectful to do that. Who knows, maybe if you're respectful to AI, it might try harder for you too.] The answer was terrific: === FROM CLAUDE COWORK === **Answer: yes, and the framework question was the wrong axis.** Next.js is a web-app framework with no notion of a frame. What the job needs is a *deterministic frame renderer* — where the picture at t=3.2s is a pure function of frame 96, so headless Chrome can be stepped frame by frame and piped into FFmpeg. Researched the field and built two working spinoff ads as proof rather than asserting feasibility. Options considered: | option | verdict | |---|---| | **Remotion** | chosen — shipping, mature, best-in-class audio sync | | HyperFrames (HeyGen, Apache-2.0) | real contender, no licence fee, but 0.7.x and fiddly audio | | Revideo (MIT) | 0.x; OSS repo trails a commercial product by the vendor's own admission | | Motion Canvas | out — no stable release in ~20 months, no headless render path | | Editly / fluent-ffmpeg | out — fluent-ffmpeg archived May 2025 and self-declared broken | | DIY Puppeteer capture | out — means reimplementing deterministic virtual-time capture | | Shotstack / Creatomate / JSON2Video | out — hosted-only, rent-per-minute at variant scale | === END CLAUDE COWORK === And, the first result it produced was already surprisingly not awful! [video-hosting-pipeline:www:20260904-ads:a.mp4] I was not evaluating it based upon its final quality, but rather tracking progress along the pathway of compressing dimensionality. I knew that once I could replicate the capabilities of Adobe After Effects, composed through a Claude Code pipeline in Remotion [link to them] (the first huge part of solving this problem), I would be able to generate a vast variety of videos sharing a common brand identity. And this particular output showed that it was possible to generate professional-quality text animations through code. Then I asked: > This is really good. But the things you made weren't as spiffy as what > she made. Can you attempt to clone hers as well as possible? Also our > brand font has since changed to Plus Jakarta Sans which is open source That produced: [video-hosting-pipeline:www:20260904-ads:live-ad-clone.mp4] I was thrilled to see that my nascent system could not only bring in all of the necessary components (animations and video), but it could understand Julia's video as an example piece, and learn from it. Notably, it got this far from **one single example**, not a ton of training data. That indicated to me that I had found the correct language for expressing Julia's video. I then also knew that this was going to take off, because I could then leverage AI and computers for what they are good at. We humans are very slow at clicking. It is a painstaking process to zoom in, frame-by-frame, and touch up or align images/sound to be just perfect. AI can speed up the clicking process. The creative process and task of artistic direction still remains, but it is hyper-accelerated because what was once laborious is now super fast. I can ask my system to make new version after new version, and iterate quickly. So it was time to iterate. For that, I needed to track all of the editions, because progress would likely be some steps forward and some steps back. > This is really good. I've created a Git repo called Expi/ads-live-motion. > Please put the clone source code and all generating stuff into there. Of > course not the rendered output. And make sure you have instructions and > some record of my commentary. At that point, I also realized I did not need anything from MacOS (initially I wasn't sure), and so I asked if it was time to switch away from my Mac Mini M1. > I'm thinking of switching this work to Claude Code on a AMD Ryzen 5 9600X 6-Core > Processor running Linux. Can I do that, or do I need the full power of Cowork? Once I switched over, progress sped up dramatically. In part because my main Linux workstation has 5 monitors, arranged vertically. [public/images/posts/20260904-ads/5-monitors.jpg] Next up was sound. In the past, we had just bought a soundtrack and used it over and over again. Emboldened by what I had gotten in such a short time, I decided to go for a custom soundtrack. I remembered from conversations with people in the entertainment industry that a sign of true quality in movie production was a custom-composed score that complemented and deepened the emotion of what was on screen. > OK this is pretty good. Are you able to generate your own soundtrack too? > If so, please put it on the spinoff-c. Unfortunately, the soundtrack was laughably bad. It sounded like a 1990's video game. Despite asking Claude to try harder, it didn't improve much. That's when I realized that I needed to reduce dimensionality by searching for a tool that would turn text into a musical production. > The visual is good. But the audio is not. I think the reason why the > visual is so strong is because you're using a really good tool for > rendering the video with very high quality effects. Search for a > similarly good tool for composing and then synthesizing the audio, which > can even take into account timings like what you did here. Of course, the > sound effects would be layered on separately. It found Google Lyria [link] and ElevenLabs Music [link]. Both were less than $10, and so I got access to both of them, and passed their API Keys to Claude Code. It then produced a whole slew of soundtracks for me to listen to. But that was inconvenient, because I had to imagine how the video played along with the sound. So, the natural next request was to: > Can you whip up a simple web app I can use to preview the audio and video > together? It took less than a minute, and even had some style. [public/images/posts/20260904-ads/listening-room.webp] With this user interface, I then engaged in 7 rounds of providing feedback to train the music. Music is also extraordinarily-high-dimension. I realized that the way to reduce that dimension could be to establish 3 phases of moods: starting pensive, then piqued-interest, and concluding triumphantly. I remembered listening to one of my college roommates from 20+ years ago, who was really into the theory of music, and I remembered that there existed things called chord progressions, minor and major keys, and key changes. I didn't know much about any of those things, but that general knowledge gave me things to prompt about. Finally, I had a general engine for producing a variety of soundtracks to use, which are those that appear in the videos I showcased at the beginning. (Those audio tracks are not final, and I'm still experimenting with instructions, particularly around chords and keys.) [So when writing the Lyria unlock, don't mention key changes because that's not done yet.] From there, I moved back to the visuals. I generally dislike AI-generated visuals, because I don't want to show fake things. Through discussion with Claude, I learned that it was able to search stock footage on a platform called Storyblocks [link]. I then asked it to research all of the possible providers: > I would be happy to get released clips from a paid library. This is going > to be a paid campaign. But the pricing needs to be good. The two main contenders ended up being Adobe Stock and Storyblocks. But crucially, Claude was not able to search Adobe Stock, while it was able to search Storyblocks without login. (Of course, it couldn't get the high quality video files, but it would be able to sift through footage and recommend video clips.) That became the deciding factor. Claude Code's searching ability, combined with its ideation of each ad's story, would provide the necessary real human footage to complete each piece. At that point, I had settled into a design framework for each piece: whenever we talk about our classes, we would use actual screen recordings from real classes (not staged and definitely not AI-generated)! And whenever we show pain points in the rest of the world, we would use stock footage. All of this would be interlinked with playful text animations: > Also, learn from Julia’s video, which still feels more refined and > creative in some points. Like she had the idea of panning stock footage. > And she had many playful effects from Adobe After Effects. We don’t need > to clone all of them. But just like how I suggested using the copy paste > animation in C, think about how to have clever animation choices support > the story. I don’t think we need gratuitous distractions. But we can be > clearly deeply thoughtful. I want the ads to tickle the intellect and > make people say, wow, this is so deep. Yet so in tune with modern kids > and entertainment. Like how a Disney movie has many parallel meanings > that appeal to kids and adults in different ways. By the way, record > somehow this philosophy so we can have an iconic ad series. Actually, > very good if you can help brainstorm what it is that would be iconic. > Just like how Buc-ee’s has their iconic style. Remember that we are > aiming for iconic because as you have researched yourself, we are head > and shoulders above the rest. Oh, a note about the last sentence in the prompt. My understanding from reading Claude's Constitution [link to https://www.anthropic.com/constitution] (yes, I read the whole thing) was that Claude is not supposed to deceive. So, I was fairly sure that Claude wouldn't go all-out unless it was itself convinced that there was something special here. To that end, I had previously passed in a document which I had written some years ago, about the unique value propositions of our classes [make it possible to click and open public/live-unique.md on this page, also with a link to that exact file for SEO], and also specifically asked Claude to do its own independent research to develop the necessary conviction: > OK this is reasonably good. Please sharpen the words. Remember, you are > making ads for literally the best product in the market. To make you more > confident of that, please do a deep research yourself into what else > there is in the market for beyond-curricular math classes that are taught > online. Scour YouTube too. You are allowed to use Google Chrome. If you > need me to connect something, let me know what to click. By the end of this, Claude was spitting out ad after ad after ad. I even got it to create in Chinese. [video-hosting-pipeline:www:20260904-ads:20260904-initial-c-zh.mp4] And since I had settled on the correct languages to reduce dimensionality for visuals, storyline, and music, Claude was able to synthesize entire campaigns automatically, while I could interact with normal conversation and nudge it along to make definitive improvements. For example, since I had the correct language, Claude could reliably change the timing, color, or position of anything I asked in plain English. My goal of Buc-ee's meets Apple meets Michael Jackson was coming to fruition. There were a few more things I did. Most notably, since we showcased real screen recordings of classes, I had to redact students' names. That is as painful work as removing a mustache from a Hollywood film [link to https://www.buzzfeed.com/delaneystrunk/henry-cavill-had-his-mustache-digitally-removed-in]. In the past, my team would just put up a big blur rectangle. Now we can do this: [video-hosting-pipeline:www:20260904-ads:live-62-redact.mp4] I originally just asked to blur out the last names. But that was inconsistent. The final success came from asking OpenAI Codex GPT-5.6 Sol High Effort to perform a Goal Seek to remove all last names, with this instruction on how to precisely blur out each name: > For each last name, identify the text baseline. Blur out the rectangle > whose bottom is 30% below the text baseline, top is 15% above the top of > the text line, left is one pixel after the end of the previous word, and > right is one pixel before the start of the next word (or if there isn't > one, one pixel after the end of the last name). Do not use this > computer's OCR system because your visual system is better. [Note: this is the synthesis of several prompts I asked Codex.] I used Codex because it appears to be better at understanding images than Claude. Definitely GPT 5.6 Sol High was better at that than Opus 5. (I had run out of Fable 5 credits.) So I also assumed GPT 5.6 Sol High would be better at making the final video. But it turns out it was much worse than Claude. Maybe Claude is like Beethoven, who could compose even after he was deaf. All of the above steps took only about a weekend. I say "about" because by the end of the weekend, I already had videos which you would recognize as having the storyline and visual effects of these versions shared here, just with a few rough edges here and there. It took a few more days working on-and-off to give fine-tuned feedback for perfection. That said, I also barely worked on it during the weekend. I spent most of the weekend taking the Greyhound bus from Pittsburgh to Indianapolis and back, because I was out there giving a talk on the future of the world after AI. THOUGHTS I never thought I'd make a post teaching how to make videos. I majored in pure math in college, and all of my later degrees are in pure math. But it seems to be that in today's AI world, the pure math intuition for complexity and its reduction, when combined with a wide base of general knowledge/experience, is very useful. Am I as good as a professional designer? Absolutely not. And I always admire people who explore the limits of creativity and ability. But my space of possibilities of what I can do (with very limited budget) has just expanded dramatically. For example, now I'm considering starting a video podcast series, because I can build an automatic pipeline for editing and sharing highlights. Where, then, is the person, or is that just making more AI slop? Well actually, in this particular process, the entire goal is to create something iconic, not generic. It remains extraordinarily valuable to be a thinker who can break down big things into smaller parts, because that is what enables you to communicate your vision effectively. Generic things emerge from the lack of vision. Be iconic. Figure out what really is you. In some sense, the core of this whole campaign came from our decision years ago to fuse the worlds of math stars, professional actors, Internet live-streaming, and social impact. That's what took me on road trips all across the country, on my speaking and listening tours [link to /wsj-tour], to help people get ahead of the advance of AI. Those tours led me to discover the wonders of Buc-ee's, which I took photos of on my iPhone, in between Michael Jackson songs.