video_transcoding 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/bin/transcode-video +23 -18
- data/lib/video_transcoding/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 89811ccde1116e1e2eb8005841225587b2e9ce21dd2407d8164b081ed4da7694
         | 
| 4 | 
            +
              data.tar.gz: 652fde3679a6176b5cb587c76a44a095bda1721de984d5f1adaff9f5f6c5685f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 33621c9e885597c9dd0dcfe6662e17fd6e5700a3c5069c3700e4a67b5f473a0d76fec00308fe30790126e5789c98796d8b213174d6ea2af63a3a1be163c0197d
         | 
| 7 | 
            +
              data.tar.gz: 2033fb19aeaf1f169dbd841f4a80497b23bdaaac751d8e54b75fdb2082ad87e3d7b4112ab66ce3e2ebc7a8368b4e2abdd77e4c1b0b6483d9e4a060983b338bbc
         | 
    
        data/README.md
    CHANGED
    
    | @@ -689,6 +689,19 @@ For a few problematic videos, I have to apply options like `--force-rate 23.976 | |
| 689 689 |  | 
| 690 690 | 
             
            ## History
         | 
| 691 691 |  | 
| 692 | 
            +
            ### [0.21.2](https://github.com/donmelton/video_transcoding/releases/tag/0.21.2)
         | 
| 693 | 
            +
             | 
| 694 | 
            +
            Sunday, December 4, 2018
         | 
| 695 | 
            +
             | 
| 696 | 
            +
            * Modify `transcode-video` to pass the target video bitrate to hardware-based encoders available in HandBrake for Windows and Linux as well as HandBrake nightly builds for macOS:
         | 
| 697 | 
            +
                * Check the output of `HandBrakeCLI --help` from one of those builds to find out if your platform has any of these video encoders available.
         | 
| 698 | 
            +
                * The names of these encoders all end with "`_h264`" (for H.264) or "`_h265`" (for HEVC).
         | 
| 699 | 
            +
                * On macOS, adding `--handbrake-option encoder=vt_h264` is all that's needed to enable hardware-based H.264 transcoding. Use `vt_h264` for HEVC.
         | 
| 700 | 
            +
                * On Windows and Linux, use `qsv_h264` or `qsv_h265`. Other encoders might be available as well in nightly builds.
         | 
| 701 | 
            +
                * WARNING: If you request an encoder that is _not_ available, `HandBrakeCLI` may fail or it may just fallback to a software-based encoder. Check your console output while transcoding to be certain.
         | 
| 702 | 
            +
                * With the encoders I've tested so far, `--preset` and `--encoder-option` have no effect no matter what you pass.
         | 
| 703 | 
            +
                * These hardware-based encoders are far faster than the software-based `x264` and `x265` encoders while still delivering _reasonable_ quality. Of course, your mileage (and perception) may vary.
         | 
| 704 | 
            +
             | 
| 692 705 | 
             
            ### [0.21.1](https://github.com/donmelton/video_transcoding/releases/tag/0.21.1)
         | 
| 693 706 |  | 
| 694 707 | 
             
            Sunday, December 2, 2018
         | 
    
        data/bin/transcode-video
    CHANGED
    
    | @@ -899,20 +899,6 @@ HERE | |
| 899 899 | 
             
                    end
         | 
| 900 900 | 
             
                  end
         | 
| 901 901 |  | 
| 902 | 
            -
                  encoder = @handbrake_options.fetch('encoder', 'x264')
         | 
| 903 | 
            -
                  return unless encoder =~ /^x264(?:_10bit)?$/ or encoder =~ /^x265(?:_1[02]bit)?$/
         | 
| 904 | 
            -
             | 
| 905 | 
            -
                  case encoder
         | 
| 906 | 
            -
                  when 'x264'
         | 
| 907 | 
            -
                    handbrake_options['encoder-profile'] = 'high'
         | 
| 908 | 
            -
                  when 'x264_10bit'
         | 
| 909 | 
            -
                    handbrake_options['encoder-profile'] = 'high10'
         | 
| 910 | 
            -
                  when 'x265'
         | 
| 911 | 
            -
                    handbrake_options['encoder-profile'] = 'main'
         | 
| 912 | 
            -
                  when 'x265_10bit', 'x265_12bit'
         | 
| 913 | 
            -
                    handbrake_options['encoder-profile'] = 'main10'
         | 
| 914 | 
            -
                  end
         | 
| 915 | 
            -
             | 
| 916 902 | 
             
                  if width > 1920 or height > 1080
         | 
| 917 903 | 
             
                    encoder_level = '5.1'
         | 
| 918 904 | 
             
                    bitrate = @target_bitrate_2160p
         | 
| @@ -927,10 +913,6 @@ HERE | |
| 927 913 | 
             
                    bitrate = @target_bitrate_480p
         | 
| 928 914 | 
             
                  end
         | 
| 929 915 |  | 
| 930 | 
            -
                  if encoder =~ /^x264(?:_10bit)?$/ and @handbrake_options.fetch('rate', '30').to_f <= 30.0
         | 
| 931 | 
            -
                      handbrake_options['encoder-level'] = encoder_level
         | 
| 932 | 
            -
                  end
         | 
| 933 | 
            -
             | 
| 934 916 | 
             
                  if @target_bitrate.nil?
         | 
| 935 917 | 
             
                    unless media.info[:directory]
         | 
| 936 918 | 
             
                      media_bitrate = ((((media.info[:size] * 8) / media.info[:duration]) / 1000) / 1000) * 1000
         | 
| @@ -949,6 +931,29 @@ HERE | |
| 949 931 | 
             
                    bitrate = @target_bitrate
         | 
| 950 932 | 
             
                  end
         | 
| 951 933 |  | 
| 934 | 
            +
                  encoder = @handbrake_options.fetch('encoder', 'x264')
         | 
| 935 | 
            +
             | 
| 936 | 
            +
                  if encoder =~ /_h26[45]$/
         | 
| 937 | 
            +
                    handbrake_options['vb'] = bitrate.to_s
         | 
| 938 | 
            +
                  end
         | 
| 939 | 
            +
             | 
| 940 | 
            +
                  return unless encoder =~ /^x264(?:_10bit)?$/ or encoder =~ /^x265(?:_1[02]bit)?$/
         | 
| 941 | 
            +
             | 
| 942 | 
            +
                  case encoder
         | 
| 943 | 
            +
                  when 'x264'
         | 
| 944 | 
            +
                    handbrake_options['encoder-profile'] = 'high'
         | 
| 945 | 
            +
                  when 'x264_10bit'
         | 
| 946 | 
            +
                    handbrake_options['encoder-profile'] = 'high10'
         | 
| 947 | 
            +
                  when 'x265'
         | 
| 948 | 
            +
                    handbrake_options['encoder-profile'] = 'main'
         | 
| 949 | 
            +
                  when 'x265_10bit', 'x265_12bit'
         | 
| 950 | 
            +
                    handbrake_options['encoder-profile'] = 'main10'
         | 
| 951 | 
            +
                  end
         | 
| 952 | 
            +
             | 
| 953 | 
            +
                  if encoder =~ /^x264(?:_10bit)?$/ and @handbrake_options.fetch('rate', '30').to_f <= 30.0
         | 
| 954 | 
            +
                      handbrake_options['encoder-level'] = encoder_level
         | 
| 955 | 
            +
                  end
         | 
| 956 | 
            +
             | 
| 952 957 | 
             
                  if @use_abr
         | 
| 953 958 | 
             
                    handbrake_options['vb']         = bitrate.to_s
         | 
| 954 959 | 
             
                    encoder_options['vbv-maxrate']  = ((bitrate * 1.5).to_i).to_s
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: video_transcoding
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.21. | 
| 4 | 
            +
              version: 0.21.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Don Melton
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018-12- | 
| 11 | 
            +
            date: 2018-12-04 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: |2
         | 
| 14 14 | 
             
                  Video Transcoding is a package of tools to transcode, inspect
         |