Hi,
this is what I do:
1. demux original ts into audio (ac3) and video (264)
2. open audio with avisynth:ffmpeg -i input.ts -acodec copy audio.ac3 -vcodec copy -f h264 video.264
3. mux back into ts:Code:LoadPlugin("NicAudio.dll") V = BlankClip(height=576, width=720, fps=25) A = NicAC3Source("audio.ac3") A = A.FadeIn(50) A = A.FadeOut(50) AudioDub(V, A)
and I have only couple of seconds of audio in my output file.ffmpeg -i video -i avs -vcodec copy -acodec ac3 -ac 6 -ar 48000 -ab 448k -f mpegts -y output.ts -map 0.0 -map 1.1
What should I change in avs to have full lenght audio after muxing.
Thanks.
+ Reply to Thread
Results 1 to 10 of 10
-
-
BlankClip by default gives a length of only 10 seconds.
The simplest solution is to make the avs deliver audio only:
Since the fade time is measured in frames, the fps parameter on the Fade is required to tell it the duration of each frame. FadeIn() and FadeOut can be combined into FadeIO().Code:LoadPlugin("NicAudio.dll") NicAC3Source("audio.ac3") KillVideo() # kill dummy video from NicAC3Source FadeIO(50, fps=25) -
@Gavino
Thanks, that worked.
@manono
I just wanted to make "one click solution" for fading audio (without help of audacity)
Just have one more question:
how to change 1st frame of 264 video into IDR frame - when I cut (beginning) in VRD on standard I frame than it stays as I frame - if I cut on P or B frame it gets converted to IDR.
I'm asking since I've noticed that mplayer doesn't play any TS with 264 inside which doesn't start at IDR. -
It has to be encoded that way in the first place, or you re-encode it. You can force an IDR frame in x264 by using a qpfile
http://mewiki.project357.com/wiki/X264_Settings#qpfile -
You have to re-encode the GOP. There is no way around it. You can't just change the frametype
When you cut just before P or B frames with videoredo it gets converted to IDR because the entire GOP is re-encoded. It becomes a reference for the new GOP.
How did you expect it to work differently ? -
Yes, that is true - you just misundertsood me - I know that entire GOP must be re-encoded while cutting on P, B-frames and there must be new IDR at beginning.
But what if I cut on I-frames that are not IDR (I'm talking about I-frames inside GOP) then there is no need to re-encode (rebuilt) entitre GOP? - to me it looks so because VRD doesn't convert such frame into IDR - that's what I asked on VRD forum.
Sorry for such questions but I'm still a newb here. -
-
I just got a reply on VRD forum:
If you cut on an I frame or IDR there is no recoding so the frames remain unchangedand that's what VRD is doing.(if) on a B/P frame - VRD forces a recode of that scene and starts with an IDR
But I found another program called smart cutter where if cut is done on i-frame (non IDR) this frame is being converted into IDR so as you say entire GOP is re-encoded.
Thanks.
Similar Threads
-
avisynth - how to fade in (but audio has to fade in faster)
By adom in forum EditingReplies: 13Last Post: 31st Jan 2011, 13:45 -
how to get audio/video AVI from Avisynth?
By spiritgumm in forum Newbie / General discussionsReplies: 10Last Post: 12th Jun 2010, 19:24 -
VDM or AviSynth: audio fade in/out
By hollowman in forum Newbie / General discussionsReplies: 5Last Post: 27th Aug 2008, 09:05 -
how can I add "Fade in / Fade out" effect in my video clips
By mb508 in forum EditingReplies: 5Last Post: 9th Jul 2007, 17:02 -
Fade-in\Fade-out filter, VirtualDub MOD
By GangstaRap in forum Video ConversionReplies: 3Last Post: 21st May 2007, 21:58



Quote