VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Dear all,

    We are trying to hard code videos with UTF-8 Subtitles. Since the font is not properly depicted using ffmpeg for utf-8 subtitiles, a solution is brilliantly suggested by the Videoburger , member of the group.

    When we make the videos using the code below, it is giving us Compressed and distored audio and jerky frame-rate.

    Can any one suggest us what option we need to add to avoid this behaviour.

    the code used by us is

    ffmpeg -i 646.mp4 -i 646.ass -codec copy -s 720X480 -b:v 494k -b:a 192k temp.mkv
    handbrakecli --subtitle 1 --subtitle-burned -i temp.mkv --rate 3 --vb 494k --ab 192k --width 720 --loose-anamorphic --quality 20 --nlmeans="light" -o 10646.mp4


    Using the combained approach above we are able to get the UTF-8 font with out any issues. But with only either ffmpeg or hand brake cli alone we were not able to get it.

    So kindly help us in addressing the final video's behaviour of Compressed and distored audio and jerky frame-rate

    Regards
    Kamalakar
    Vanipedia
    India
    Quote Quote  
  2. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    Please do not cross post the same thread,i deleted your other threads,just continue in this thread.
    I think,therefore i am a hamster.
    Quote Quote  
  3. Dear all,

    Kindly find the video links of the original video and subtitled video using ffmpeg and hand brake

    Original Video link
    https://www.youtube.com/watch?v=YcTYWx8CaPA

    Subtitled Video link
    https://youtu.be/FT_shLmuxeM


    Original video quality is much better. subtitled video quality is lost.

    I am not sure what additional parameters we need to add to retain the same quality as original qualtiy for the following code


    ffmpeg -i 646.mp4 -i 646.ass -codec copy -s 720X480 -b:v 494k -b:a 192k temp.mkv
    handbrakecli --subtitle 1 --subtitle-burned -i temp.mkv --rate 3 --vb 494k --ab 192k --width 720 --loose-anamorphic --quality 20 --nlmeans="light" -o 10646.mp4

    Can any one suggest us how to fix the problem

    Regards
    Kamalakar
    Last edited by kamalakar108; 4th Feb 2018 at 06:42.
    Quote Quote  
  4. "--rate 3" is 3 fps. Omit the argument (or set to the same as source).
    Quote Quote  
  5. Yes Sir, By Removing the --rate 3, we are able to get the problem fixed. Thanks a lot.
    Quote Quote  
  6. Sir, When we used the following code the Video's audio quality is not as good as the original video. Since my tongue is not english, i dont know exactly what words/audio parameter to use when i say the audio quality is not as good as the original video.

    Original Video
    https://www.youtube.com/watch?v=rF6MVN3qbIs

    Final video obtained by using the code
    https://www.youtube.com/watch?v=0owunIjcIL8


    The code we used to obtain the above output video is

    ffmpeg -i 850.mp4 -i 850.ass -codec copy -s 720X480 -b:v 494k -b:a 192k temp.mkv
    handbrakecli --subtitle 1 --subtitle-burned -i temp.mkv --vb 494k --ab 192k --width 720 --loose-anamorphic --quality 15 --nlmeans="light" -o 10850_3.mp4


    Both the softwares are to be used to get hard code subtitles properly depicted in the video. This we cannot forego.
    Kindly suggest as what additional parameter i need to use/change to retain the original video quality.

    Regards
    Kamalakar
    Quote Quote  
  7. Change quality 15 to 1, 2, or 3. The smaller the number the higher the quality (and larger the resulting file).
    Quote Quote  
  8. Just pass-thru (copy) the audio instead of encoding it:
    Code:
    handbrakecli --subtitle 1 --subtitle-burned  --vb 494k -E copy --width 720 --loose-anamorphic --quality 15  --nlmeans="light" -i temp.mkv -o 10850_3.mp4
    That said, I'm surprised you would notice audio detoriation even when re-encoding. It's not something most people are able to hear.
    Quote Quote  
  9. Sir,
    I was looking at handbrake help and was surpised to see Video copy similar audio copy is not available in handbrake. Am i missing some thing or is it actually available.
    Regards
    Kamalakar

    Following is the handbrake help file with destination and video options
    Destination Options ----------------------------------------------------------

    -o, --output <filename> Set destination file name
    -f, --format <string> Select container format:
    av_mp4
    av_mkv
    default: auto-detected from destination file name)
    -m, --markers Add chapter markers
    --no-markers Disable preset chapter markers
    -O, --optimize Optimize MP4 files for HTTP streaming (fast start,
    s.s. rewrite file to place MOOV atom at beginning)
    --no-optimize Disable preset 'optimize'
    -I, --ipod-atom Add iPod 5G compatibility atom to MP4 container
    --no-ipod-atom Disable iPod 5G atom
    -P, --use-opencl Use OpenCL where applicable


    Video Options ----------------------------------------------------------------

    -e, --encoder <string> Select video encoder:
    x264
    qsv_h264
    x265
    mpeg4
    mpeg2
    VP8
    VP9
    theora
    --encoder-preset <string>
    Adjust video encoding settings for a particular
    speed/efficiency tradeoff (encoder-specific)
    --encoder-preset-list <string>
    List supported --encoder-preset values for the
    specified video encoder
    --encoder-tune <string>
    Adjust video encoding settings for a particular
    type of souce or situation (encoder-specific)
    --encoder-tune-list <string>
    List supported --encoder-tune values for the
    specified video encoder
    -x, --encopts <string> Specify advanced encoding options in the same
    style as mencoder (all encoders except theora):
    option1=value1ption2=value2
    --encoder-profile <string>
    Ensure compliance with the requested codec
    profile (encoder-specific)
    --encoder-profile-list <string>
    List supported --encoder-profile values for the
    specified video encoder
    --encoder-level <string>
    Ensures compliance with the requested codec
    level (encoder-specific)
    --encoder-level-list <string>
    List supported --encoder-level values for the
    specified video encoder
    -q, --quality <float> Set video quality (e.g. 22.0)
    -b, --vb <number> Set video bitrate in kbit/s (default: 1000)
    -2, --two-pass Use two-pass mode
    --no-two-pass Disable two-pass mode
    -T, --turbo When using 2-pass use "turbo" options on the
    first pass to improve speed
    (works with x264 and x265)
    --no-turbo Disable 2-pass mode's "turbo" first pass
    -r, --rate <float> Set video framerate
    (5/10/12/15/20/23.976/24/25/29.97/
    30/48/50/59.94/60/72/75/90/100/120
    or a number between 1 and 1000).
    Be aware that not specifying a framerate lets
    HandBrake preserve a source's time stamps,
    potentially creating variable framerate video
    --vfr, --cfr, --pfr Select variable, constant or peak-limited
    frame rate control. VFR preserves the source
    timing. CFR makes the output constant rate at
    the rate given by the -r flag (or the source's
    average rate if no -r is given). PFR doesn't
    allow the rate to go over the rate specified
    with the -r flag but won't change the source
    timing if it's below that rate.
    If none of these flags are given, the default
    is --pfr when -r is given and --vfr otherwise
    Quote Quote  
  10. You can't "copy" the video if you want burned in subtitles.
    Quote Quote  
  11. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Also it is not possible copy video in Handbrake/vidcoder.

    Bernix
    Quote Quote  
  12. Appreciate your replies for helping me.
    Regards
    Kamalakar
    Quote Quote  
  13. Dear Sneaker Sir, --rate 3 is the culprit that corrupted both the video and audio files. When we removed that, Every thing came out good. Before posting this message, i missed to remove --rate 3 in one of files and hence we saw the issues.

    When i realized this and removed it, with proper Video and audio bit rate given, every thing worked fine.

    Thanks a lot for the help

    Regards
    Kamalakar
    Quote Quote  



Similar Threads

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