VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. hello.. i am trying to make something like this but is not working

    Code:
    ffmpeg -i /root/Desktop/097.mkv -vf subtitles=097.mkv -i /root/watermark.png -filter_complex \ "overlay=(W-w)/2:(H-h)/2" -c:v libx264 -crf 23 -preset faster -tune animation -c:a aac /root/Desktop/097v1.mp4
    i need the hardsub+watermak in 1 encode or a profile to encode the same video without change quality..

    and better profile to encode anime 720 pixel?? thanks!!!
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    I use avisynth to create the logo script because you can custom make it for the whole movie or just part of it.

    Code:
    v1 = Directshowsource("C:\Users\Bud\Desktop\[dp]Manjandani-1.mp4").ConvertToRGB32.Lanczosresize(864, 368)
    img1 = ImageSource("C:\Users\Bud\Desktop\Image.001.png", pixel_type="RGB32", fps=23.976, end=999).converttoRGB32.LanczosResize(160,90)
    clip1 = v1.trim(0, -999).Overlay(img1, 10, 10,Opacity=1.0, img1.ShowAlpha()) \
     ++ v1.trim(999, 0)
    return clip1
    Then use ffmpeg to combine subtitles with the AVS and set encode setting at the same time.

    Code:
    ffmpeg -i "C:\Users\Bud\Desktop\CreateLogo.avs" -ss 00:00:00.000 -to 99:00:00.000 -vf "subtitles='C\:\\Users\\Bud\\Desktop\\Various test Formats\\Get times ProjectX settings\\tron.srt'",scale=864:368,pad=864:368:0:0 -vcodec libx264 -crf 22 -r 23.976  -acodec aac -ac 2 -ar 44.1k -b:a 128k  "C:\Users\Bud\Desktop\[dp]Manjandani-1_Timed_1.mp4"
    Image
    [Attachment 44580 - Click to enlarge]


    And I encoded successfully:

    Image
    [Attachment 44581 - Click to enlarge]
    Quote Quote  
  3. Just dont use this, is you dont want to encode that encode video and sound.

    scale=864:368,pad=864:368:0:0 -vcodec libx264 -crf 22 -r 23.976 -acodec aac -ac 2 -ar 44.1k -b:a 128k
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    AFAIK: (Courtesy Elder Geek)
    The whole video will get re-encoded if you overlay an image on part of it. One way you could avoid re-encoding the entire thing would be to clip out the portion you wish to overlay and only re-encode that piece (see the -t duration switch and the -ss position switch in the documentation
    If you do not set the codec and quality settings for the video codec, ffmpeg will use what it thinks is correct or error out depending on the source. Either way the quality may not be what you want. Since libx264 and aac was used in the original request example, I used the same in my example and showed other possibilities that he might want but do nothing in my example unless it is changed. The format was at least shown though. (-ss 00:00:00.000 -to 99:00:00.000 means entire video, pad=864:368:0:0 means do not pad)I used common H264 codec and its CRF of 22 to output compatible quality and size. The same for the audio although you could use -acodec copy since the audio need not be reencoded.

    The scale and pad settings were because my video was anamorphic (resolution 1.91 but displayed as 2.35).
    Quote Quote  



Similar Threads

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