3

After solving on problem I cam coming to a next one. After adding subtitles, discussed here, with the command:

ffmpeg -i grdedFinal.mov -vf subtitles=portSbs.srt gradedFinalwithSubs.mov

the quality of the generated file significantly decreased. The original file was of size 1,5GB whereas the resulting file was of size ~300MB. The subtitles are added correctly but the compression is unnecessary. In a word I would like for the FFmpeg to add subtitless and do only that leaving the sound and picture quality untouched.

1 Answer 1

6

As you are hardcoding subtitles, the video (with the subtitles added) will be re-encoded.

You can use the CRF rate control method to modulate the quality of the output.

So, start with

ffmpeg -i grdedFinal.mov -vf subtitles=portSbs.srt -crf 18 -c:a copy gradedFinalwithSubs.mov

If the quality's not acceptable, lower that value till it is - in exchange for a larger file. Of course, don't decide based on file size but on visual quality. x264 is very good at compressing video while maintaining subjectively perceived quality.

4
  • Thanks very much, I had a look here and put crf 0.
    – Konrad
    Commented Jan 31, 2016 at 12:36
  • Unnecessary, but that's your choice. Use edited command for audio passthrough.
    – Gyan
    Commented Jan 31, 2016 at 12:37
  • 1
    So what crf would be optimal for lack of quality loss? Side question, the created file does not open in QuickTime but it runs in VLC so I'm guessing that the file is no longer mov but avi for example?
    – Konrad
    Commented Jan 31, 2016 at 12:45
  • 2
    For being mathematically lossless? None. For being visually lossless, 18 is generally transparent, but YMMV. Try -crf 1 - I think ffmpeg has chosen a pixel format for CRF 0 that QT doesn't work with.
    – Gyan
    Commented Jan 31, 2016 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.