473 links
267 private links
  • When 140 characters is not enough!
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
  • ffmpeg settings for VHS mpeg2/mp2 to H264/MP4 VBR conversion

    Encoding from a VHS source

    Command line

    ffmpeg -i input -vf "yadif=1:1,hqdn3d=3,drawbox=y=ih-h:w=0:h=6:t=max,format=yuv420p" \
    -crf 23 -preset medium -c:a aac -movflags +faststart \
    -metadata title="Title" output.mp4

    filters

    Encoding form a VHS input can be improved with some filters:

    • yadif is a deinterlacer. See the documentation and try out the different modes to see what looks best to you. Alternatively, you could try the w3fdif deinterlacing filter, but I haven't tested that one yet.
    • hqdn3d is a video denoiser. VHS can be noisy, so experiment with various values, and try without it too. Denoising can improve compressibility, but too much denoising will add noticeable blur.
    • drawbox in this example is is making a 6 pixel black box on the very bottom to mask any head switching noise. You may have to adjust the height, or just remove it. This is better than cropping because simply covering it up avoids changing the aspect ratio: if that is not a concern the feel free to crop instead.
    • format is added to use a widely compatible pixel format. It does not really matter with your input though since it is already yuv420p.

    other options

    • -crf and -preset will allow you to adjust the output quality and encoding speed. See FFmpeg Wiki: H.264 Video Encoding Guide.
    • -movflags +faststart is useful if your viewers will watch via progressive download. After encoding it will move some info to the beginning of the file so it can begin playback quicker.

    You will need to add -strict experimental if using an old ffmpeg: the native FFmpeg AAC encoder used to be considered experimental but that is now no longer the case.

    November 7, 2023 at 09:59:20 GMT+1 * - permalink -
    QRCode
    - https://superuser.com/questions/1005797/ffmpeg-settings-for-vhs-mpeg2-mp2-to-h264-mp4-vbr-conversion-and-reducing-file-s
    ffmpeg vhs encoding
Links per page: 20 50 100
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation