VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    Jun 2017
    Location
    United Kingdom
    Search Comp PM
    I have this particular MKV file and its details are in the pic below.



    Now I want to convert it to MP4 and hard-code the ass subtitle into it.

    I know that I can't avoid re-encoding the video(?) by using

    -c:v copy
    in ffmpeg, so I was wondering if there is anyway to best preserve the quality of the video?

    I don't mind the problem of the file size, since it is a 1-2 minute video anyway.

    Some suggestion is to make a lossless video, so I did
    ffmpeg -i "input.mkv" -preset veryslow -crf 0 -c:a aac -vf "ass=sub.ass" "output.mp4"
    This does work (even though the file is 3 times the original), but still
    the quality was not as good as the original and the colour is slightly brighter.

    Hence, I am curious if there are more ways to do this?
    Quote Quote  
  2. Originally Posted by parumaru View Post
    the quality was not as good as the original and the colour is slightly brighter.
    That isn't really possible. x264 lossless mode is 100% lossless. Maybe it's a playback problem. Or are you talking about subtitle quality/color?

    Provide sample files, ffmpeg log and screenshots showing the problem.
    Quote Quote  
  3. Member
    Join Date
    Jun 2017
    Location
    United Kingdom
    Search Comp PM
    Click image for larger version

Name:	Sub.png
Views:	158
Size:	649.3 KB
ID:	42070Click image for larger version

Name:	MKV.png
Views:	161
Size:	617.3 KB
ID:	42071
    @sneaker Thank you so much for such a quick reply.
    Oh so if I already specified -preset veryslow -crf 0, the video should be exactly the same?
    Am I understanding correct?

    As you can see, the subtitle on Aegisub looks quite sharper and has slightly better colour.
    The difference is very slightly, but I'm just curious if there is a way to make it better?
    Last edited by parumaru; 25th Jun 2017 at 14:42.
    Quote Quote  
  4. I don't know from the top of my head but it could be in Aegisub the subtitles are without chroma-subsampling (4:4:4) while your video is not (4:2:0 / yuv420p). To achieve the same sharpness you'd need to upscale at least the chroma. (see ffmpeg pixel formats)
    Quote Quote  
  5. Member
    Join Date
    Jun 2017
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by sneaker View Post
    x264 lossless mode is 100% lossless.
    @sneaker

    May I ask you to elaborate more about this part?

    When you say x264 lossless mode, did you mean setting -preset veryslow -crf 0 that I did?

    and 100% lossless -> Does this mean the video should be 100% like the original?
    Quote Quote  
  6. Assuming you are using x264 8 bit (like is usually the case): yes.
    Quote Quote  
  7. Member
    Join Date
    Jun 2017
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by sneaker View Post
    Assuming you are using x264 8 bit (like is usually the case): yes.
    Ohh sorrry I forgot to specify that

    yes I believe I'm using x264 (not sure about the bit though) as vcodec is now H264-MPEG-4 AVC(part 10) (avc1)?
    Quote Quote  



Similar Threads

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