VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    Hi,

    this is what I do:

    1. demux original ts into audio (ac3) and video (264)
    ffmpeg -i input.ts -acodec copy audio.ac3 -vcodec copy -f h264 video.264
    2. open audio with avisynth:
    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)
    3. mux back into ts:
    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
    and I have only couple of seconds of audio in my output file.
    What should I change in avs to have full lenght audio after muxing.

    Thanks.
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    BlankClip by default gives a length of only 10 seconds.
    The simplest solution is to make the avs deliver audio only:
    Code:
    LoadPlugin("NicAudio.dll")
    
    NicAC3Source("audio.ac3")
    KillVideo() # kill dummy video from NicAC3Source
    FadeIO(50, fps=25)
    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().
    Quote Quote  
  3. I just do the fades and other audio tweaking in Audacity.
    Quote Quote  
  4. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    @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.
    Quote Quote  
  5. Originally Posted by adom View Post
    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
    Quote Quote  
  6. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    It has to be encoded that way in the first place...
    I asked on VRD forum if there is a way of doing this - will see.
    ...or you re-encode it
    I wouldn't want to
    Quote Quote  
  7. 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 ?
    Quote Quote  
  8. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    Originally Posted by poisondeathray View Post
    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.
    Quote Quote  
  9. Originally Posted by adom View Post
    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.
    If it's cut on NON IDR frame (aka "i" frame as opposed to "IDR" frame) ,entire GOP must be re-encoded
    Quote Quote  
  10. Member
    Join Date
    Jan 2011
    Location
    poland
    Search Comp PM
    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 unchanged
    (if) on a B/P frame - VRD forces a recode of that scene and starts with an IDR
    and that's what VRD is doing.

    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!