AudioTrackApply
AudioTrackApply[f,video]
applies the function f to the first audio track of the Video object video.
Details and Options
![](Files/AudioTrackApply.en/details_1.png)
- AudioTrackApply can be used to edit or process an audio track of a video, such as removing noise, adjusting loudness and more.
- The function f takes an Audio object as an input and should return one.
- The following options can be specified:
-
AudioEncoding Automatic audio encoding to use AudioTrackSelection Automatic audio track to process CompressionLevel Automatic compression level to use GeneratedAssetLocation $GeneratedAssetLocation location of the generated asset OverwriteTarget False whether to overwrite an existing file - All unprocessed video, audio and subtitle tracks are copied over.
![](Files/AudioTrackApply.en/Image_1.gif)
Examples
open allclose allBasic Examples (1)
Scope (2)
The whole audio track is passed to the function as an Audio object. Normalize the audio track:
Options (6)
AudioEncoding (1)
By default, AudioTrackApply attempts to preserve the encoding of the original audio track:
AudioTrackSelection (1)
By default, the function is applied to the first audio track of the input video:
All the remaining tracks are copied over to the result:
Select the audio track to which the function will be applied:
Use AudioTrackSelectionAll to apply the function to all input tracks:
CompressionLevel (1)
Use the CompressionLevel option to control the compression level of the processed track:
GeneratedAssetLocation (2)
Assets are automatically generated in the "Video" folder within $WolframDocumentsDirectory:
Specify the location of the generated asset:
Use a LocalObject as the asset for the resulting Video object:
OverwriteTarget (1)
By default, if a file already exists it is not overwritten:
![](Files/AudioTrackApply.en/2.gif)
Overwrite an existing file by specifying OverwriteTargetTrue:
Properties & Relations (1)
AudioTrackApply applies a function to the audio track of a video file and returns the video with processed audio track:
Show the plot of the transformed audio track:
To get only the transformed audio track, extract the audio track from the video first:
Text
Wolfram Research (2020), AudioTrackApply, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioTrackApply.html.
CMS
Wolfram Language. 2020. "AudioTrackApply." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioTrackApply.html.
APA
Wolfram Language. (2020). AudioTrackApply. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioTrackApply.html