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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd September 2009, 03:10   #1  |  Link
ryujin
Registered User
 
Join Date: May 2009
Location: Japan
Posts: 2
Missing ~4 sec audio when using yadif

#############################
The original file is a Canopus avi file:
#############################

Input #0, avi, from '3109000451.avi':
Duration: 00:57:08.02, start: 0.000000, bitrate: 147477 kb/s
Stream #0.0: Video: CUVC / 0x43565543, 1920x1080, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s

##############################
My avisynth script:
##############################
LoadPlugin("DirectShowSource.dll")
DirectShowSource("3109000451.avi")
ConvertToYV12
Trim(0, -0)
LoadCplugin("yadif.dll")
pointresize(width,height+(4), 0,-2, width,height+(4))
Yadif(mode=1, order=0)
Crop(0,2,-0,-2)
Crop(0, 0, -0, -0)
AddBorders(0, 0, 0, 0, $000000)


##############################
The encoding command
##############################
ffmpeg -i "3109000451.avi.avs" -threads 0 -vcodec libx264 -vpre default -r 29.97 -pix_fmt yuv420p -padtop 0 -padbottom 0 -padleft 0 -padright 0 -croptop 0 -cropbottom 0 -cropleft 0 -cropright 0 -sws_flags lanczos -s 1280x720 -b 2000000 -bt 2000000 -pass 2 -acodec aac -f mp4 "3109000451.mp4" -map 0:0 -map 0:1


##############################
The problem
##############################

When the original file is larger than 30 minutes the resulting mp4 has a hard silence at the last four seconds of the clip.

I tried a lot of diferent combinations and when removing the yadif the problem disappears.

###############################
The question
###############################

Has anyone experienced this? is this a bug of yadif, avisynth or ffmpeg? I tried with three different versions of ffmpeg including latest svn as today and the result is the same. I bet for yadif but I do not want to remove it as I get the best deinterlaced picture with it.


regards....
ryujin is offline   Reply With Quote
Old 3rd September 2009, 03:14   #2  |  Link
shoopdabloop
Registered User
 
Join Date: Mar 2009
Posts: 166
First off, perhaps you should try a better alternative to DirectShowSource? I would like to help more than that, but I only work with avis and virtualdubmod.

Last edited by shoopdabloop; 3rd September 2009 at 03:25.
shoopdabloop is offline   Reply With Quote
Old 3rd September 2009, 08:41   #3  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
When encoding AVI's I noticed ages ago that the audio may by cut off at the end of some files, and it happens quite frequently. Actually that is over more than one system, different installations and different OS's! but nobody seemed to corroborate my claim (I'm sure you could find it if you searched).

Some files are fine, but the length cut off of those that aren't are never the same, it could be a few seconds to 5 mins or more. The extracted audio from the avi file is the problem, I thought it was probably an issue with virtualdubmod and possible with vbr mp3 files?
burfadel is offline   Reply With Quote
Old 3rd September 2009, 11:46   #4  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,405
What happens if you simply play the script (from beginning to end) in a player?
If the audio is intact in that case, it would show the problem is downstream of Avisynth.
Gavino is offline   Reply With Quote
Old 17th September 2009, 09:08   #5  |  Link
ryujin
Registered User
 
Join Date: May 2009
Location: Japan
Posts: 2
Quote:
Originally Posted by shoopdabloop View Post
First off, perhaps you should try a better alternative to DirectShowSource? I would like to help more than that, but I only work with avis and virtualdubmod.

Can you specify a better source?? I use DirectSource because with it I can decode almost anything as long as I have the VistaCodec Pack installed. Also it can decode the Canopus AVI files that I require.


regards
ryujin is offline   Reply With Quote
Reply

Tags
audio., yadif

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 20:18.


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