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.


Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 19th May 2019, 18:10   #1  |  Link
Registered User
Join Date: May 2004
Location: Albuquerque, NM
Posts: 78
audio sync & AR problem.

Hi, I'm unable to use vapoursynth because I get two problems. I've not been successful getting audio muxed into the final encode without a progressive sync problem. I don't think it's a strictly mux problem because I've muxed various ways and get the exact same behavior. Also, using vapoursynth, I'm forced to do a resize to get the correct AR, which using ffmpeg is unnecessary. What's causing this?

vapoursynth script:
from vapoursynth import core
video = core.ffms2.Source(source='<foo.mkv>')

# just use a small bit for filter testing
#video = video[0:1800]

# dot-crawl/rainbow elimination
#video = core.tcomb.TComb(video)

# deinterlace
video = core.tdm.TDeintMod(video, 1)

# denoise

# crop
video = core.std.CropAbs(video,704,464,6,10)
video = core.resize.Bicubic(video, 720, 540)

and finish up with this cmdline followed by audio mux:
vspipe --y4m <foo.vpy> - | ffmpeg -i pipe: -c:v libx265 -preset veryslow -crf 20 -vf "nlmeans=s=10" -y "outfoo.mkv"

ffmpeg commandline that works fine, but lacks comb filter
VCODEC="-c:v libx265 -preset veryslow -crf 20"
FCHAIN='-vf "yadif,nlmeans=s=10,crop=704:464:6:10"'

ffmpeg -i "<foo.mkv>" $VCODEC -c:a copy $FCHAIN -y "<outfoo.mkv>"
extra info regarding AR problem. If I use the vapoursynth script above, commenting out the crop+resize and issue this command:
vspipe --y4m <foo.vpy> - | ffplay -i pipe:
I get the wrong AR compared to just:
ffplay -i <foo.mkv>
and this output from the vpy script on the cmdline:
Input #0, yuv4mpegpipe, from 'pipe:':B vq= 0KB sq= 0B f=0/0
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 720x540, 29.64 fps, 29.64 tbr, 29.64 tbn, 29.64 tbc
^C 2.87 M-V: -0.033 fd= 1 aq= 0KB vq=15380KB sq= 0B f=0/0
I don't really understand what it's telling me, but I'm guessing the pipe causes some kind of loss of stream info that the player needs to show it properly.

Last edited by Nematocyst; 19th May 2019 at 18:47.
Nematocyst is offline   Reply With Quote

aspect ratio, audio sync, vapoursynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 01:11.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.