VideoCombine[{obj1,obj2,…}]
creates a multi-track video by combining all audio, video and subtitle tracks in all obji.
VideoCombine
VideoCombine[{obj1,obj2,…}]
creates a multi-track video by combining all audio, video and subtitle tracks in all obji.
Details and Options
- VideoCombine is typically used to combine a video track and an audio track or to add additional audio or subtitle tracks.
- Possible objects obji can be any of the following:
-
audio an Audio object image an Image object video a Video object subtitle subtitle specification - Subtitles can be given in any of the following forms:
-
string a single string Text[…] positioned and/or styled text {text1,text2,…} show texti in a uniformly distributed sequence {t1text1,…} show each texti at the time interval ti rawSubtitles raw subtitles - By default, all tracks of Video objects obji are included in the resulting video.
- By default, VideoCombine places the new video under the "Video" directory in $WolframDocumentsDirectory.
- The following options can be specified:
-
AudioEncoding Automatic audio encoding to use CompressionLevel Automatic compression level to use GeneratedAssetFormat Automatic the file format of the result GeneratedAssetLocation $GeneratedAssetLocation location of the generated asset OverwriteTarget Automatic whether to overwrite an existing file ShowSubtitles True whether to display the subtitle tracks SubtitleEncoding Automatic subtitle encoding to use SubtitleStyle {} subtitle style to use VideoEncoding Automatic video encoding to use VideoTransparency False whether the output video should have a transparency channel
Examples
open all close allBasic Examples (2)
Generate a video with no audio:
v = AnimationVideo[LinearGradientImage[Hue[t], {200, 100}], {t, 0, 1}]Combine the video with an audio object:
VideoCombine[{v, ExampleData[{"Audio", "Drums"}]}]Check the properties of the final video:
Information[%]v = AnimationVideo[LinearGradientImage[Hue[t], {200, 100}], {t, 0, 1}];VideoCombine[{v, {"Hello", "this is my subtitle"}}]Scope (4)
Combine an image and an audio track:
v = VideoCombine[{RandomImage[], Audio["ExampleData/rule30.wav"]}]Information[v]Combine two video tracks into a single video:
v = VideoCombine[{VideoGenerator[RandomImage[]], VideoGenerator[RandomImage[1, 500]]}]Information[v, "VideoTracks"]Combine two Video objects with video, audio and subtitle tracks:
v1 = Video["ExampleData/bullfinch.mkv"];
v2 = Video["ExampleData/fish.mp4"];v = VideoCombine[{v1, v2}]Information[%%]If a video has multiple tracks, use the track selection options to select which tracks to combine:
v = VideoCombine[{Video["ExampleData/bullfinch.mkv", AudioTrackSelection -> 3], Video["ExampleData/bullfinch.mkv", AudioTrackSelection -> 1]}]Information[v, "AudioTracks"]Options (5)
GeneratedAssetLocation (2)
Assets are automatically generated in the "Video" folder within $WolframDocumentsDirectory:
Information[VideoCombine[{Video["ExampleData/bullfinch.mkv"], ExampleData[{"Audio", "PianoScale"}]}], "ResourcePath"]Specify the location of the asset created by VideoGenerator:
v = VideoCombine[{Video["ExampleData/bullfinch.mkv"], ExampleData[{"Audio", "PianoScale"}]}, GeneratedAssetLocation -> "file.mp4"];
Information[v, "ResourcePath"]Use a LocalObject as the asset for the resulting Video object:
v = VideoCombine[{Video["ExampleData/bullfinch.mkv"], ExampleData[{"Audio", "PianoScale"}]}, GeneratedAssetLocation -> LocalObject[]];
Information[v, "ResourcePath"]OverwriteTarget (1)
By default, if a file already exists it is not overwritten:
VideoCombine[{Video["ExampleData/bullfinch.mkv"], ExampleData[{"Audio", "PianoScale"}]}, GeneratedAssetLocation -> "file.mp4"];Use OverwriteTargetTrue to overwrite an existing file:
v = VideoCombine[{Video["ExampleData/bullfinch.mkv"], ExampleData[{"Audio", "PianoScale"}]}, GeneratedAssetLocation -> "file.mp4", OverwriteTarget -> True];
Information[v, "ResourcePath"]ShowSubtitles (1)
By default, subtitle tracks are displayed:
v = AnimationVideo[LinearGradientImage[Hue[t], {200, 100}], {t, 0, 1}];VideoCombine[{v, {"Hello", "this is my subtitle"}}]Turn off the subtitle track display:
VideoCombine[{v, {"Hello", "this is my subtitle"}}, ShowSubtitles -> False]SubtitleStyle (1)
Combine subtitles with a video using default style:
a = ExampleData[{"Audio", "Apollo11ReturnSafely"}];v = VideoGenerator[Entity["MannedSpaceMission", "Apollo11"]["Image"], Duration[a]];VideoCombine[{v, a, "You will return safely to earth."}]VideoExtractTracks[%, "SubtitleRules"]Specify the text style for the subtitle track:
out = VideoCombine[{v, a, "You will return safely to earth."}, SubtitleStyle -> {Italic, Orange, Bold, Larger, FontFamily -> "Big Caslon", Background -> LightGreen}];VideoExtractTracks[out, "SubtitleRules"]Applications (1)
Generate a video from a Manipulate and add audio to it:
m = Video[Manipulate[Plot[Sin[x(1 + a x)], {x, 0, 6}], {a, 0, 2}]]Combine the generated video with an audio track:
VideoCombine[{m, ExampleData[{"Audio", "PianoScale"}]}]Information[%]Properties & Relations (2)
By default, all tracks are included with their original durations:
v = AnimationVideo[LinearGradientImage[Hue[t]], {t, 0, 1}];a = ExampleData[{"Audio", "Bee"}];Duration /@ {v, a}Import[Information[VideoCombine[{v, a}], "ResourcePath"], "ExactDurations"]Pad the audio track to the duration of the video track:
VideoCombine[{v, AudioPad[a, Duration[v] - Duration[a], "Periodic"]}];Check track durations of the final video:
Import[Information[%, "ResourcePath"], "ExactDurations"]The track order in the result is determined by the order of the input:
v1 = VideoGenerator[RandomImage[]];v2 = VideoGenerator[RandomImage[1, 500]];Information[VideoCombine[{v1, v2}], "VideoTracks"]Information[VideoCombine[{v2, v1}], "VideoTracks"]Related Guides
Text
Wolfram Research (2020), VideoCombine, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoCombine.html (updated 2025).
CMS
Wolfram Language. 2020. "VideoCombine." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/VideoCombine.html.
APA
Wolfram Language. (2020). VideoCombine. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoCombine.html
BibTeX
@misc{reference.wolfram_2026_videocombine, author="Wolfram Research", title="{VideoCombine}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/VideoCombine.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_videocombine, organization={Wolfram Research}, title={VideoCombine}, year={2025}, url={https://reference.wolfram.com/language/ref/VideoCombine.html}, note=[Accessed: 15-June-2026]}