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. |
13th February 2016, 21:29 | #1 | Link |
Registered User
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
|
VSPipe: how to input audio?
Another newbie VapourSynth/ffmpeg question.
I have this basic script and VSPipe set-up for transcoding native HD AVC.mov clips, recorded on a DSLR camera, to UTVideo: Code:
import vapoursynth as vs core = vs.get_core() clip = core.ffms2.Source("Path....../DSCN0968.MOV") ..Other YV12 filtering... clip = core.std.AssumeFPS(clip,fpsnum=30000,fpsden=1001) clip.set_output() Code:
vspipe Path...../YV12Fullscale.vpy - | ffmpeg -f rawvideo -pix_fmt yuv420p -s 1920x1080 -r 30000/1001 -i pipe: -vcodec utvideo Path....../DSCN0968_VSP_UTVYV12FS.mkv Code:
import vapoursynth as vs core = vs.get_core() clip = core.ffms2.Source("Path....../DSCN0968.MOV") ..Other YV12 filtering... clip = core.fmtc.resample (clip, css="422") clip = core.fmtc.bitdepth (clip, bits=8) clip = core.std.AssumeFPS(clip,fpsnum=30000,fpsden=1001) clip.set_output() Code:
vspipe Path...../YV12Fullscale.vpy - | ffmpeg -f rawvideo -pix_fmt yuv422p -s 1920x1080 -r 30000/1001 -i pipe: -vcodec utvideo Path....../DSCN0968_VSP_UTVYUY2FS.mkv My newbie question is - how/where in the pipe set-up can I feed in the source PCM audio path to get the muxed output?
__________________
Nostalgia's not what it used to be Last edited by WorBry; 13th February 2016 at 21:34. |
13th February 2016, 22:10 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
VapourSynth doesn't do audio. If you pipe the video from VSPipe to FFmpeg, you'll need to add the audio from a separate file...
(FFmpeg can take multiple sources, just use "-i" as often as needed)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 13th February 2016 at 22:12. |
13th February 2016, 23:50 | #3 | Link | |||
Registered User
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
|
Quote:
Quote:
That's what I thought - but taking that first YV12 example again: Code:
import vapoursynth as vs core = vs.get_core() clip = core.ffms2.Source("Path....../DSCN0968.MOV") ..Other YV12 filtering... clip = core.std.AssumeFPS(clip,fpsnum=30000,fpsden=1001) clip.set_output() Code:
vspipe Path...../YV12Fullscale.vpy - | ffmpeg -f rawvideo -pix_fmt yuv420p -s 1920x1080 -r 30000/1001 -i pipe: -vcodec utvideo -i Path....DSCN0968.MOV -acodec copy Path....../DSCN0968_VSP_UTVYV12FS.mkv Quote:
__________________
Nostalgia's not what it used to be Last edited by WorBry; 13th February 2016 at 23:57. |
|||
14th February 2016, 00:38 | #4 | Link |
Pajas Mentales...
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
|
try vspipe with -y
Code:
└───╼ vspipe -y test.vpy - | ffmpeg -i pipe: -i test.mp4 -c:v utvideo -c:a copy -map 0:0 -map 1:1 esee.mkv -y ffmpeg version 2.8.6 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.3.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libdcadec --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-shared --enable-version3 --enable-x11grab libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, yuv4mpegpipe, from 'pipe:': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42mp41isomavc1 creation_time : 2013-02-11 10:03:12 Duration: 00:01:30.72, start: 0.046440, bitrate: 2654 kb/s Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2493 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: creation_time : 2013-02-11 10:03:12 handler_name : L-SMASH Video Handler encoder : AVC Coding Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 157 kb/s (default) Metadata: creation_time : 2013-02-11 10:03:12 handler_name : L-SMASH Audio Handler [matroska @ 0x55d394354a00] Codec for stream 1 does not use global headers but container format requires global headers Output #0, matroska, to 'esee.mkv': Metadata: encoder : Lavf56.40.101 Stream #0:0: Video: utvideo (ULY0 / 0x30594C55), yuv420p, 1280x720, q=2-31, 200 kb/s, 23.98 fps, 1k tbn, 23.98 tbc Metadata: encoder : Lavc56.60.100 utvideo Stream #0:1(und): Audio: aac ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, 157 kb/s (default) Metadata: creation_time : 2013-02-11 10:03:12 handler_name : L-SMASH Audio Handler Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> utvideo (native)) Stream #1:1 -> #0:1 (copy) [yuv4mpegpipe @ 0x55d39433e0e0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) Output 2175 frames in 37,21 seconds (58,45 fps)=00:01:29.63 bitrate=73495.4kbits/s frame= 2175 fps= 59 q=-0.0 Lsize= 812262kB time=00:01:30.76 bitrate=73309.1kbits/s video:810391kB audio:1746kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.015315% Last edited by sl1pkn07; 14th February 2016 at 04:54. |
14th February 2016, 00:55 | #5 | Link |
Registered User
Join Date: Feb 2014
Location: Italy
Posts: 22
|
Try to specify files streams using -map option .
In your case. Code:
vspipe -y Path...../YV12Fullscale.vpy - | ffmpeg -i - -i Path....DSCN0968.MOV \ -map 0:v -map 1:a \ -c:v utvideo \ -c:a copy \ -y Path....../DSCN0968_VSP_UTVYV12FS.mkv |
14th February 2016, 15:59 | #6 | Link | ||
Registered User
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
|
Thanks, yes that works:
Code:
vspipe -y path......./YV12Fullscale.vpy - | ffmpeg -i pipe: -i path.../DSCN0968.MOV -c:v utvideo -c:a copy -map 0:0 -map 1:1 path...../DSCN0968_VSP_utvideoYV12FS.avi -y Code:
ffmpeg -f rawvideo -pix_fmt yuv420p -s 1920x1080 -r 30000/1001 -i pipe: First time I tried it though, I kept getting this message: Quote:
Quote:
So, yes, thanks for the tip about using -map option. Can't say I completely understand at this point how the -y thing works but I'll try and get my ahead around it. I need to learn these things if I'm going to get any further with ffmpeg. Cheers. Edit: Just noticed this recent thread on the same subject: http://forum.doom9.org/showthread.ph...th+pipe+ffmpeg So I'm not alone in working through issues like this.
__________________
Nostalgia's not what it used to be Last edited by WorBry; 15th February 2016 at 03:42. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|