AssumeSampleRate
From Avisynth wiki
(Difference between revisions)
Raffriff42 (Talk | contribs) m (added category) |
Raffriff42 (Talk | contribs) (formatting, links, phrasing) |
||
Line 1: | Line 1: | ||
− | {{Template:FuncDef|AssumeSampleRate(clip ''clip'', | + | {{Template:FuncDef|AssumeSampleRate(clip ''clip'', int ''samplerate'')}} |
− | + | Changes the sample rate of the current clip without changing the number of samples. | |
+ | :This changes the pitch, playback speed and running time of the audio. | ||
+ | :It will also affect synchronization with the video. | ||
− | + | ==== Examples ==== | |
− | + | <div {{BoxWidthIndent|38|1}} > | |
− | # Let's say that this video is 25fps, 44100hz | + | # Let's say that this video is 25fps, audio 44100hz. |
− | AviSource("video_audio.avi") | + | [[AviSource]]("video_audio.avi") |
+ | |||
+ | # Play video at half speed: | ||
+ | [[AssumeFPS]]([[Clip_properties|FrameRate]]/2) | ||
# Play audio at half speed: | # Play audio at half speed: | ||
− | AssumeSampleRate( | + | AssumeSampleRate([[Clip_properties|AudioRate]]/2) |
− | + | ||
− | + | ||
− | + | ||
− | # Video and audio | + | # Video and audio are now in sync. |
+ | </div> | ||
+ | ==== See Also ==== | ||
+ | * [[AssumeFPS]]: {{FuncArg|''sync_audio''}} | ||
+ | :If ''true'', the audio sample rate is changed by the same amount; the pitch of the resulting audio is shifted. | ||
+ | :If ''false'' (the default), the audio is unchanged; this means the audio will lose synchronization over time. | ||
[[Category:Internal filters]] | [[Category:Internal filters]] | ||
[[Category:Audio_filters]] | [[Category:Audio_filters]] | ||
+ | [[Category:Timeline_editing_filters]] |
Revision as of 13:31, 14 January 2016
AssumeSampleRate(clip clip, int samplerate)
Changes the sample rate of the current clip without changing the number of samples.
- This changes the pitch, playback speed and running time of the audio.
- It will also affect synchronization with the video.
Examples
# Let's say that this video is 25fps, audio 44100hz. AviSource("video_audio.avi") # Play video at half speed: AssumeFPS(FrameRate/2) # Play audio at half speed: AssumeSampleRate(AudioRate/2) # Video and audio are now in sync.
See Also
- AssumeFPS: sync_audio
- If true, the audio sample rate is changed by the same amount; the pitch of the resulting audio is shifted.
- If false (the default), the audio is unchanged; this means the audio will lose synchronization over time.