Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 26 of 39
❮Prev Next❯

Generate and Edit Video

Module 3: Computer Vision ⏱ 8 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    A Sora 2 video is an asynchronous job: you create it with a prompt, a size (720x1280 or 1280x720) and a duration of 4, 8 or 12 seconds, poll the status, then download the video. An input reference image must match the video size and can't contain a face. To edit a finished video, remix it by its video ID with a short prompt that asks for one change.

    Simulate it » No Azure account needed

    Exam objective: 3.1.2 Implement a solution that generates videos from text prompts and reference media. 3.1.4 Implement workflows to edit generated videos. (Skills measured as of April 16, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: Create a video with Sora 2 and remix it Deploy Sora 2, create a video from a reference image and remix it.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Deploy <strong>sora-2</strong> from <strong>Models + endpoints</strong>. It's in preview, so check the availability table for regions and deployment type.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Deploy sora-2 from Models + endpoints. It's in preview, so check the availability table for regions and deployment type.
    2. In the Video playground pick the size and duration, add an input reference image of the same size, and describe the shot: subject, action, light, camera.
    3. Video is asynchronous. You create the job, poll the status, then download the MP4. Don't block a web request on it.
    4. Two input rules to remember: the reference image must match the video size, and it can't contain a human face.
    5. To edit a finished video, remix it. Give the source video id and one short change. A single clear change keeps the rest of the clip stable.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    Marketing wants a ten-second product clip in two formats, and one small lighting change means starting over.

    😊 THE SOLUTION

    Create the video as an asynchronous Sora 2 job, anchor it with a reference image and remix instead of regenerating.

    • The web request times out✓ Create, poll the status, then download
    • The kettle looks different in every shot✓ An input reference of the same size
    • A tiny change means a new video✓ Remix the finished video with one change
    🛠️ Solved with: Sora 2 in Foundry

    Start with a question

    You ordered a food delivery, and the app says 'in progress'. Why doesn't the pizza arrive the moment you tap the button?

    Because cooking takes time. The app gives you an order number, you check the status now and then, and you collect the pizza when it’s ready.

    Generating a video works the same way. You don’t get the video back in the reply. You get a video ID, you poll the job, and you download the file when its status says completed.

    Explain it like I’m 10

    The technical explanation

    Deploy sora-2 on your Foundry resource. At the time of writing (25 November 2026) it’s a preview model, so confirm the regions and deployment type on Microsoft Learn.

    Create, poll, download

    import time
    video = client.videos.create(
        model="sora-2",                       # deployment name
        prompt="A brass tea kettle on a wooden table, steam rising, soft morning light, slow push-in",
        size="1280x720", seconds="8",
        input_reference=open("product-1280x720.png", "rb"),   # optional
    )
    while video.status in ("queued", "in_progress"):
        time.sleep(20)
        video = client.videos.retrieve(video.id)
    if video.status == "completed":
        client.videos.download_content(video.id).write_to_file("kettle.mp4")
    ControlValues and rules
    size720x1280 (portrait) or 1280x720 (landscape)
    seconds4, 8 or 12
    input_referenceSame size as the video. No human faces
    PromptShot, subject, action, setting, light, camera movement
    Statusqueued, in_progress, completed

    The prompt does the creative work. A good one reads like a shot list: who or what is in frame, what moves, where, in what light, and how the camera behaves. Prompts that name real people or protected characters are rejected.

    Edit with remix

    remixed = client.videos.remix(
        video.id,
        prompt="Change the morning light to warm sunset light.",
    )

    Remix starts from a completed video, so everything you don’t mention stays close to the original. Ask for one change. If you pile on five, the result drifts, and you may be better off generating again.

    Architect level Where do the finished videos live?

    The service stores jobs and outputs for you, but treat that as temporary. Download the file into your own Blob Storage with your own retention, and delete jobs you don’t need. Generated videos can carry provenance information such as content credentials, so keep that metadata when you publish.

    Real-world business scenario

    Home goods

    Hearth and Brass

    The problem
    Every product clip needed a studio day, and a small lighting request meant a reshoot.
    What they used
    A Sora 2 deployment in Foundry, called from a background job. Product photos at 1280x720 are the input reference, and the team remixes approved clips for seasonal lighting.
    Why that choice
    The reference keeps the kettle looking like the real product, polling keeps the web app responsive, and remix avoids starting over.
    The result
    The team produced drafts for a whole range in a week and sent only the final choices to the studio.

    When to use it and when not to

    ✓ Use it when…

    • You need short concept clips, storyboards or social drafts.
    • You have a product or scene image to anchor the first frame.
    • You want small changes to an approved clip.

    ✕ Think twice when…

    • You need videos longer than 12 seconds in one job.
    • The idea needs a real person or a protected character.
    • You must guarantee behaviour on a preview model in a launch-critical path.

    ↔ Alternatives to consider

    • gpt-image to create stills or storyboards first.
    • Real footage with Content Understanding to analyse it afterwards.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    A web application requests a video from a Sora 2 deployment and must return a response to the browser within two seconds. Which design is correct?

    Question 2

    Question 2 of 5

    A developer submits a request for a 1280x720 video and supplies a 720x1280 product image as the input reference. The request fails. What should the developer do?

    Question 3

    Question 3 of 5

    A request to Sora 2 that includes a team photo as the input reference returns a 400 error. The photo shows five employees. What is the most likely cause?

    Question 4

    Question 4 of 5

    A video generated by Sora 2 is nearly correct, but the lighting must change from morning to sunset. All other content must stay as it is. Which approach minimizes the change to the rest of the video?

    Question 5

    Question 5 of 5

    Which values are valid for the duration of a Sora 2 video request?

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner Why can't a web page wait for a Sora 2 video in one request?

    Model answer

    Video generation takes a while. The service returns a job with an ID, and my app polls the status until it's completed, then downloads the file.

    Intermediate Your create call fails when you add a product photo as a reference. What do you check?

    Model answer

    I check that the image has exactly the same width and height as the video size, and that nobody's face is in it. Both rules cause a 400 error.

    Experienced developer The client likes a video but wants warmer light. How do you handle it?

    Model answer

    I remix the finished video by its ID with one clear change in the prompt. A fresh generation could change everything, and a prompt with many changes drifts away from the original.

    Scenario Sora 2 is in preview. How does that change your design?

    Model answer

    I wouldn't promise it for a customer-facing launch without a fallback. I'd keep limits and regions in configuration, check the Learn page before releases, and store finished videos in my own storage.

    Quick revision

    Key points

    • Video generation is asynchronous: create, poll, download.
    • Sizes are 720x1280 and 1280x720. Durations are 4, 8 or 12 seconds.
    • The input reference must match the video size and can't include a human face.
    • Remix edits a completed video by its ID. One clear change works best.
    • Sora 2 was in preview on 25 November 2026, so check Learn for limits and regions.

    Important terminology

    Sora 2
    The video generation model available in Microsoft Foundry (in preview as of 25 November 2026) that creates short videos from text and images.
    Asynchronous job
    A request that returns an ID right away while the work continues in the background, so the app polls the status.
    Input reference
    An image whose first frame anchors the video. It must match the video size and must not contain a human face.
    Remix
    An edit of a completed video, identified by its video ID, that applies a short change from a new prompt.

    Common mistakes

    • Holding a web request open until the video is ready.
    • Using a reference image of a different size.
    • Asking for many changes in one remix.

    Exam tips

    • "Edit a generated video" = remix with the video ID.
    • "Video job status polling" = asynchronous pattern.
    • "Reference image rejected" = check size match and faces.

    Five quick revision questions

    1. 1.Which durations does Sora 2 accept?Show

      4, 8 or 12 seconds.

    2. 2.Which sizes are allowed?Show

      720x1280 or 1280x720.

    3. 3.What must an input reference match?Show

      The video size exactly.

    4. 4.What happens to a reference image with a face?Show

      It's rejected.

    5. 5.How do you edit a finished video?Show

      Remix it by its video ID with a short prompt.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Multimodal Image Understanding: Captions, Alt Text and Visual Q&A

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.