Announcement

Collapse
No announcement yet.

FFmpeg & Libav Add H.265 Encoder Via x265

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Many people think that FOSS automatically means benevolent, transparent and non-pervasive. The current ffmpeg vs. libav situation is a great illustration of why it's not so. libav is FOSS but it's malicious and destructive (is advertised as a drop-in replacement for ffmpeg while not actually being one), pervasive (disguises itself as ffmpeg at least on Debian and Debian-based distros) and opaque (tries to convince end users that ffmpeg is deprecated at least on Debian and Debian-based distros).

    Likewise, believing that systemd must be harmless just because it's FOSS (and this seems to be a really widespread opinion these days) is just another such fallacy, wishful thinking at its worst. Also note that GPL can do nothing to make things better in such cases. GPL can protect software from bad people but it cannot protect people from bad software, overambitious developers or unscrupulous distro maintainers.
    Last edited by prodigy_; 13 February 2014, 06:55 AM.

    Comment


    • #12
      The horrible situation is also a result of problems with software distribution.
      Each, almost each, distro has it's own package system with it's own walled-garden app store.
      Changing has a lot of barriers, software development to multiple distro's is time-consuming.

      Comment


      • #13
        Originally posted by prodigy_ View Post
        Many people think that FOSS automatically means benevolent, transparent and non-pervasive. The current ffmpeg vs. libav situation is a great illustration of why it's not so. libav is FOSS but it's malicious and destructive (is advertised as a drop-in replacement for ffmpeg while not actually being one), pervasive (disguises itself as ffmpeg at least on Debian and Debian-based distros) and opaque (tries to convince end users that ffmpeg is deprecated at least on Debian and Debian-based distros).

        Likewise, believing that systemd must be harmless just because it's FOSS (and this seems to be a really widespread opinion these days) is just another such fallacy, wishful thinking at its worst. Also note that GPL can do nothing to make things better in such cases. GPL can protect software from bad people but it cannot protect people from bad software, overambitious developers or unscrupulous distro maintainers.
        You were going strong until you shat on the first paragraph with the political stance of hating systemd. I've not seen a technical reason of superiority for Upstart and I sure as hell haven't seen anyone with a brain recognize init systems fully compatible with FreeBSD/OS X is actually intelligent, but I do see all sorts of Wine raves for the past year concerning Windows games as if Microsoft has ever given a flying frack about Linux or any aspect of the Open Source Community it can't legal exploit.

        Comment


        • #14
          Originally posted by Marc Driftmeyer View Post
          I've not seen a technical reason of superiority for Upstart
          Upstart? God forbid! The only sane altenative to classic init today is OpenRC.

          Comment


          • #15
            Originally posted by nakedhitman View Post
            If anyone can figure out the options to pass to ffmpeg/x265 that control quality settings for VBR, please let me know. I tried compressing some video with -crf 16, and it totally spat out video at something like 80kbps. Not even x265 can make that watchable. I also tried adding -qmin 16, but it simply ignored me.
            -c:v libx265 -x265-params crf=23 -preset veryslow
            works but bitrate is higher than with x264 crf 18 and quality is worse

            Comment


            • #16
              Originally posted by JS987 View Post
              -c:v libx265 -x265-params crf=23 -preset veryslow
              works but bitrate is higher than with x264 crf 18 and quality is worse
              Where did you go to find that "-x265-params" thing? Are there any other parameters that can be passed to it? If it supports a qmin and a qmax, I bet there would be a way to tune it to produce some reasonable video. Also, if you know where those presets are stored, I bet some great information could be gleaned from there.

              Thanks for the tip!

              Comment


              • #17
                Originally posted by JS987 View Post
                -c:v libx265 -x265-params crf=23 -preset veryslow
                works but bitrate is higher than with x264 crf 18 and quality is worse
                In my tests i get an equal quality by a lower bitrate.

                The h264 encode has 247.997.811 Bytes and the h265 187.515.148 Bytes

                Comment


                • #18
                  What file format do you use? I tried to encode in raw hevc but not even VLC compiled with x265 seems to understand what it is. Do you encode in mp4 file format? mkv?

                  Comment


                  • #19
                    Raw hevc and VLC 2.3.1 Play it fine.

                    This is the h.265 file and this is the H264 file

                    Both are encoded with this

                    Code:
                    ffmpeg -i "Noragami.mkv" -loglevel repeat+verbose -r 23.976 -frames 1000 -c:v libx265 -preset veryslow -x265-params crf=16 "Noragami.hevc"
                    note: the fps rate information is not written in the stream -.- and all players use 25 fps. maybe i have to set it as x265 option
                    and

                    Code:
                    ffmpeg -i "Noragami.mkv" -loglevel repeat+verbose -frames 1000 -c:v libx264 -preset veryslow -x264opts crf=16.0 "Noragami.h264"
                    psnr are between 45db and 48db

                    ffmpeg Version

                    Code:
                    ffmpeg version N-60646-gd601106 Copyright (c) 2000-2014 the FFmpeg developers
                      built on Feb 15 2014 03:16:36 with gcc 4.8.2 (GCC)
                    btw some ask for the viable x265 options

                    Code:
                    Syntax: x265 [options] infile [-o] outfile
                        infile can be YUV or Y4M
                        outfile is raw HEVC bitstream
                    
                    Standalone Executable Options:
                    -h/--help                	Show this help text
                    				Default: Enabled
                       --cpuid               	Limit SIMD arch 0:auto 1:None 2:SSE2 .. 8:AVX2
                    				Default: 0
                       --threads             	Number of threads for thread pool (0: detect CPU core count)
                    				Default: 0
                    -F/--frame-threads       	Number of concurrently encoded frames
                    				Default: 1
                       --log                 	Logging level 0:ERROR 1:WARNING 2:INFO 3:DEBUG -1:NONE
                    				Default: 2
                       --csv                 	`Comma separated value' log file, appends one line per run
                       --no-progress         	Disable progress reports
                    -o/--output              	Bitstream output file name
                       --depth               	Bit-depth of pixels within encoder
                    				Default: 8
                    
                    Input Options:
                       --input               	Raw YUV or Y4M input file name
                       --input-depth         	Bit-depth of input file (YUV only)
                    				Default: 8
                       --input-res           	Source picture size [w x h], auto-detect if Y4M
                       --fps                 	Frame rate, auto-detect if Y4M
                    				Default: 0
                       --frame-skip          	Number of frames to skip at start of input file
                    				Default: 0
                    -f/--frames              	Number of frames to be encoded (0 implies all)
                    				Default: 0
                    
                    Reconstructed video options (debugging):
                    -r/--recon               	Reconstructed image YUV or Y4M output file name
                       --recon-depth         	Bit-depth of output file
                    				Default: 8
                    
                    Quad-Tree analysis:
                       --no-wpp              	Disable Wavefront Parallel Processing
                       --wpp                 	Enable Wavefront Parallel Processing
                    				Default: Enabled
                    -s/--ctu                 	Maximum CU size (default: 64x64)
                    				Default: 64
                       --tu-intra-depth      	Max TU recursive depth for intra CUs
                    				Default: 3
                       --tu-inter-depth      	Max TU recursive depth for inter CUs
                    				Default: 3
                    
                    Temporal / motion search options:
                       --me                  	Motion search method 0:dia 1:hex 2:umh 3:star 4:full
                    				Default: 3
                    -m/--subme               	Amount of subpel refinement to perform (0:least .. 7:most)
                    				Default: 5
                       --merange             	Motion search range
                    				Default: 60
                       --bpredrange          	Motion search range for bipred refinement
                    				Default: 4
                       --no-rect             	Disable rectangular motion partitions Nx2N and 2NxN
                       --rect                	Enable rectangular motion partitions Nx2N and 2NxN
                    				Default: Enabled
                       --no-amp              	Disable asymmetric motion partitions
                       --amp                 	Enable asymmetric motion partitions, requires --rect
                    				Default: Enabled
                       --max-merge           	Maximum number of merge candidates
                    				Default: 5
                       --no-early-skip       	Disable early SKIP detection
                       --early-skip          	Enable early SKIP detection
                    				Default: Disabled
                       --no-fast-cbf         	Disable Cbf fast mode
                       --fast-cbf            	Enable Cbf fast mode
                    				Default: Disabled
                    
                    Spatial / intra options:
                       --rdpenalty           	penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum
                    				Default: 0
                       --no-tskip            	Disable intra transform skipping
                       --tskip               	Enable intra transform skipping
                    				Default: Enabled
                       --no-tskip-fast       	Disable fast intra transform skipping
                       --tskip-fast          	Enable fast intra transform skipping
                    				Default: Enabled
                       --no-strong-intra-smoothing	Disable strong intra smoothing for 32x32 blocks
                       --strong-intra-smoothing	Enable strong intra smoothing for 32x32 blocks
                    				Default: Enabled
                       --no-constrained-intra	Disable constrained intra prediction (use only intra coded reference pixels)
                       --constrained-intra   	Constrained intra prediction (use only intra coded reference pixels)
                    				Default: Disabled
                    
                    Slice decision options:
                       --refresh             	Intra refresh type - 0:none, 1:CDR, 2:IDR (default: CDR)
                    				Default: 1
                    -i/--keyint              	Max intra period in frames
                    				Default: 250
                       --rc-lookahead        	Number of frames for frame-type lookahead (determines encoder latency)
                    				Default: 10
                    -b/--bframes             	Maximum number of consecutive b-frames (now it only enables B GOP structure)
                    				Default: 3
                       --bframe-bias         	Bias towards B frame decisions
                    				Default: 0
                       --b-adapt             	0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling
                    				Default: 1
                    
                    QP, rate control and rate distortion options:
                       --bitrate             	Target bitrate (kbps), implies ABR
                    				Default: 0
                    -q/--qp                  	Base QP for CQP mode
                    				Default: 32
                       --cbqpoffs            	Chroma Cb QP Offset
                    				Default: 0
                       --crqpoffs            	Chroma Cr QP Offset
                    				Default: 0
                       --rd                  	Level of RD in mode decision 0:least....2:full RDO
                    				Default: 2
                       --no-signhide         	Disable hide sign bit of one coeff per TU (rdo)
                       --signhide            	Hide sign bit of one coeff per TU (rdo)
                    				Default: Enabled
                    
                    Loop filter:
                       --no-lft              	Disable Loop Filter
                       --lft                 	Enable Loop Filter
                    				Default: Enabled
                    
                    Sample Adaptive Offset loop filter:
                       --no-sao              	Disable Sample Adaptive Offset
                       --sao                 	Enable Sample Adaptive Offset
                    				Default: Enabled
                       --sao-lcu-bounds      	0: right/bottom boundary areas skipped  1: non-deblocked pixels are used
                    				Default: 0
                       --sao-lcu-opt         	0: SAO picture-based optimization, 1: SAO LCU-based optimization 
                    				Default: 1
                    
                    SEI options:
                       --hash                	Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum 
                    				Default: 0

                    Comment


                    • #20
                      Sorry VLC 2.1.3 is my Version.

                      Comment

                      Working...
                      X