Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
10th September 2021, 01:23 | #121 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
testing about these, so it might help someone
API4 audio_test.py script: Code:
import vapoursynth as vs from vapoursynth import core source_path=r"video.mp4" #stereo audio v = core.lsmas.LibavSMASHSource(source_path) a = core.bas.Source(source_path) v.set_output(0) a.set_output(1) Code:
AUDIO VSPipe -o 1 -c wav audio_tests.py - | neroAacEnc -ignorelength -lc -cbr 96000 -if - -of nero.m4a VSPipe -o 1 -c wav audio_tests.py - | ffmpeg -y -i - ffmpeg_output.wav VSPipe -o 1 audio_tests.py - | ffmpeg -y -f f32le -ac 2 -ar 48000 -i - ffmpeg_output.wav VSPipe -o 1 -c wav audio_tests.py vspipe_to_wav.wav #but double size (32bit if original is 16bit) VSPipe -o 1 audio_tests.py vspipe_to_wav.wav #but double size (32bit if original is 16bit) VSPipe -o 1 -c wav audio_tests.py - | ffplay - VSPipe -o 1 audio_tests.py - | ffplay -f f32le -ac 2 -ar 48000 -i - VSPipe -o 1 -c wav audio_tests.py - | ffmpeg -i video.mp4 -i - -map 0:0 -map 1:0 -f AVI -c:v utvideo -pix_fmt yuv420p -colorspace bt709 -c:a pcm_s16le -y ffmpeg_utvideo.avi VIDEO VSPipe -o 0 -c y4m audio_tests.py - | ffplay -i - VSPipe -o 0 -c y4m audio_tests.py - | mpv - Last edited by _Al_; 10th September 2021 at 01:37. |
10th September 2021, 09:08 | #122 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
No, to do that vspipe needs to wrap the streams into a more complex container like mkv.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
10th September 2021, 09:55 | #123 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
I think what you should do it simply create wrapper functions for the trim, splice and other reorder functions and use those. Most filters don't reorder the clip. That would be my first attempt. I'll write an example some day of it. Avisynth has a weird symbiotic relationship between one audio track and one video track. Have more than one audio track and things get iffy.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
10th September 2021, 15:45 | #124 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
you can attach audio frame(s), possibly audio frames from multiple audio tracks, to a video frame using the C++ API, it should be no more complicated than
Code:
auto [PictureFrame, EngAudioFrame, FrenchAudioFrame] = Node::AcquireFrameGiven(Index, GeneratorContex).From(Video, EngAudio, FrenchAudio); auto CompositeFrame = Core.CopyFrameFrom(PictureFrame); CompositeFrame["_Audio"] += EngAudioFrame; CompositeFrame["_Audio"] += FrenchAudioFrame; Last edited by feisty2; 10th September 2021 at 15:47. |
13th September 2021, 17:49 | #125 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
R55-API4-RC4
Changes:
Will release an api3 build too with the expr and vsrepo fixes if it's working here.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
22nd September 2021, 07:38 | #128 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
If your filter requests frames from the node it should be in the list. Simple rule.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
|