Lab
  • DRM packaging tutorialsCourse
  • 5 things you need to know about multi-DRMCourse
  • Getting started with Doverunner Anti PiracyCourse
  • Getting started with Doverunner Forensic WatermarkingCourse
  • Getting started with Doverunner Mobile App SecurityCourse
  • Getting started with Doverunner Multi-DRMCourse
  • Getting started with Doverunner Transcoding & PackagingCourse
  • Packaging content with the DRM CLI PackagerLesson · DRM packaging tutorials
한국어

Watermark preprocessing with Transcoding & Packaging

Use Doverunner Transcoding & Packaging to watermark-preprocess and DRM-package a source video into 0/1 (A/B) variant streams, start to finish.

Lesson 14 min

DRM: —FWM: —Status: idle

Transcript
Getting started with Transcoding & Packaging — prepare a DRM-protected, watermark-preprocessed stream with Doverunner's managed service. Before you start, you'll need three things. First, a Doverunner account with a trial or paid plan for Transcoding & Packaging, Multi-DRM, and Forensic Watermarking. Second, S3 buckets in Seoul or Oregon, with an access key and secret that can read and write them. Third, an MP4 video longer than five minutes — AVC or HEVC video, AAC or AC3 audio. Login to Doverunner Console and choose Seoul or Oregon for the Transcoding & Packaging backend — pick whichever's closer to your preferred AWS region. Need a different region? Contact Doverunner support. In your AWS account, create two S3 buckets — one for input, one for output — then upload your source video into the input bucket. The S3's region should be the same as the TnP service region. Then create an IAM user with read and write access to the buckets. Go to Transcoding & Packaging Storages at Doverunner Console. Register the input and output S3 buckets with the access key ID and secret key created for the IAM user. Go to TnP Job Create page and pick the type: Transcode, Forensic Watermark, and DRM together. You can use the packaged output for DRM and forensic watermark integration. Name the job, set a content ID, point it at the source file in the input bucket, and choose where the packaged output lands. Output Directory Path is required — enter a folder name even if you don't need any extra folder structure. Select DASH and HLS for streaming format. TnP proposes a sensible ABR ladder automatically based on the input MP4 source video. Getting Started keeps the defaults. DASH reaches Widevine and PlayReady on Chrome and Edge. HLS reaches FairPlay on Safari. CMAF could cover all three DRMs in one package — that's a different tutorial. This job packages DASH and HLS to cover every browser. TnP detects the tracks already inside the source file — here, one AAC audio track — and asks you to tag its language. DRM options stay simple for this lesson — no audio encryption, no multi-key, no clear lead. Advanced options like these come in later lessons. One review screen shows the entire job — every choice from every step — before anything runs. Confirm, and start the job. The job lands in the queue immediately with an ID, then moves through transcoding, segmenting, and copying — trackable the whole way. Once the job finishes, the packaged output lands in the output bucket — a 0 folder and a 1 folder, one for each forensic-watermarking variant. The full output path breaks down as wm-contents, then your Output Directory Path, then the content ID — TnP always adds it here — then the 0/1 variant, then dash or hls, down to the manifest: stream.mpd or master.m3u8. Storage, job config, review, submit — that's Transcoding & Packaging end to end. For the full content security product integration, see docs.doverunner.com/content-security/.

What is watermark preprocessing?

Preprocessing runs during video encoding. It inserts watermark values (0 and 1) into the unencrypted source frames and produces two encoded variants of the same video (A/B). The watermark is encrypted with a secret key unique to each content service provider, so nobody outside can extract it.

You can preprocess in several ways:

  • Transcoding & Packaging (TnP) service: Doverunner's managed service transcodes, preprocesses, and DRM-packages in one job
  • Preprocessor library: a C++ library you integrate into your own encoder
  • FFmpeg filter: a plug-and-play FFmpeg video filter module
  • Hybrik: a preprocessor for the Dolby Hybrik transcoding service

This lesson uses TnP, the easiest option. You don't run any encoder yourself: you register S3 storage, create one job in Doverunner Console, and get a stream that is both watermark-preprocessed and DRM-protected. See the Watermark Preprocessing guide for the other options.

Before you start

  • Doverunner account: a trial or paid plan for Transcoding & Packaging, Multi-DRM, and Forensic Watermarking
  • AWS S3 buckets: in Seoul (ap-northeast-2) or Oregon (us-west-2), with an access key ID and secret key that can read and write them
  • Source video: an MP4 file longer than 5 minutes, with H.264 (AVC) or H.265 (HEVC) video and AAC or AC3 audio

1. Choose the service region

Log in to Doverunner Console and go to Content Security > Transcoding & Packaging > Settings. Set Packaging Service Region to Seoul or Oregon, whichever is closer to the AWS region you use. TnP jobs run in this region. If you need a different region, contact Doverunner support.

2. Create S3 buckets and upload the source

In your AWS account:

  1. Create two S3 buckets in the same region as the TnP service region, one for input and one for output (this lesson uses dr-lab-input and dr-lab-output).
  2. Upload the source MP4 to the input bucket.
  3. Create an IAM user with read and write access to both buckets, and issue an access key for it.

3. Register input and output storage

In Doverunner Console, go to Transcoding & Packaging > Storages. Register the input and output buckets with the access key ID and secret key of the IAM user. Both buckets then appear in the storage list with their region.

4. Create the job

Go to the TnP Job Create page. The wizard has six steps.

Step 1: Job type

Select Transcode & Forensic Watermark & DRM. The output is preprocessed for forensic watermarking and packaged with Multi-DRM, so you can use it for both integrations.

Step 2: Input and output

Enter a job name and a content ID, select the input storage and the source video path, then select the output storage.

Output Directory Path is required. Enter a short folder name such as output, even if you don't need extra folder structure. TnP adds the content ID below this folder on its own, so if you type the content ID here, it appears twice in the path.

Step 3: Video

Select DASH and HLS as the streaming formats. TnP proposes an ABR ladder (bitrate and resolution per rendition) based on the source video, and you can keep the defaults for this lesson.

Packaging both formats covers every major browser:

  • DASH: Widevine and PlayReady, for Chrome and Edge
  • HLS: FairPlay, for Safari

CMAF can cover all three DRMs in a single package, but that setup is covered in a separate tutorial.

Step 4: Audio and captions

TnP detects the tracks inside the source file. For a single MP4 with one AAC track, select the language of that track (for example, English).

Step 5: DRM options

Leave Audio Track Encryption, Multi-Key, and Multi-Manifest disabled and Clear Lead at 0 seconds. These advanced options are covered in later lessons.

Step 6: Review and start

The review screen shows every setting from the previous steps. Check it, then select Start Job.

5. Track the job

The job appears in Job History with a job ID right away. Its status moves from Queued through transcoding, segmenting, and copying, and you can follow each stage on the job detail page.

6. Check the packaged output

When the job finishes, open the output bucket in the S3 console. The output is stored under this path:

wm-contents/
└── <Output Directory Path>/
    └── <content ID>/
        ├── 0/
        │   ├── dash/stream.mpd
        │   └── hls/master.m3u8
        └── 1/
            ├── dash/stream.mpd
            └── hls/master.m3u8

The 0 and 1 folders are the two watermark variants (A/B), and each contains a DRM-packaged DASH and HLS stream. In the next lesson, these variants are combined per viewer session to embed the watermark at delivery time.

Next steps

Before you generate session URLs for this output, read FWM preprocessing through Transcoding & Packaging in Doverunner Docs: content packaged this way needs prefix_folder: "wm-contents" in the Session URL API request. Other preprocessing methods are listed in the preprocessing guide.