[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Inserting ad breaks\n\nThis page explains how to programmatically insert keyframes for ad breaks in a\ntranscoded video. The Transcoder API does not insert or play ads, or\nstop media playback; video player clients are responsible for handling the\nkeyframe.\n\nUse the [`adBreaks`](/transcoder/docs/reference/rest/v1/JobConfig) array to\ninsert\n[ad break keyframes](/transcoder/docs/reference/rest/v1/JobConfig#adbreak)\nin the output video. You can add this configuration to a\n[job template](/transcoder/docs/how-to/job-templates) or include it in an\n[ad-hoc job configuration](/transcoder/docs/how-to/jobs#create_jobs_ad_hoc).\n\nThe following REST/JSON configuration inserts ad break keyframes at 4, 7, and 11\nseconds in the timeline of the output video: \n\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"4s\"\n },\n {\n \"startTimeOffset\": \"7s\"\n },\n {\n \"startTimeOffset\": \"11s\"\n }\n ],\n\nYou can use a tool like\n[`ffprobe`](https://ffmpeg.org/ffprobe.html) to verify that the\nkeyframes were inserted. The following output shows a sample output video\n*without* ad break keyframes inserted: \n\n $ ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries \\\n frame=pkt_pts_time -of csv=print_section=0 hd.mp4\n 0.000000\n 3.000000\n 6.000000\n 9.000000\n 12.000000\n ...\n\nThe following output shows the same output video timeline with ad break\nkeyframes inserted: \n\n $ ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries \\\n frame=pkt_pts_time -of csv=print_section=0 hd.mp4\n 0.000000\n 3.000000\n 4.000000 \u003c\u003c\u003c Inserted keyframe here\n 6.000000\n 7.000000 \u003c\u003c\u003c Inserted keyframe here\n 9.000000\n 11.000000 \u003c\u003c\u003c Inserted keyframe here\n 12.000000\n ...\n\nYou can also check the output\n[manifest file](/transcoder/docs/reference/rest/v1/JobConfig#manifest) to\nverify that the ad break tags were inserted."]]