5

I am trying to use ffmpeg's built-in x265 library to process .VOB files through h.265codec.

What I understood from the ffmpeg documentation was that:

-c:v libx265 tells ffmpeg to use the h.265 codec for video streams

-x265-params passes options to x265 encoder instead of ffmpeg

But whenever try to run the command, ffmpeg doesn't seem to recognize/pass the options to x265.

It gives the error

Unrecognized option '-y4m'.
Error splitting the argument list: Option not found

Why is this?

Here's the command (edited spacing):

C:\ffmpeg (20170123-e371f03-win64-static)\bin> 
   ffmpeg -i concat:'input1.VOB'\'input.VOB'
   -map 0:v -map 0:a -r 24000/1001 -f yuv4mpegpipe 
   -c:v libx265 -x265-params 
   --y4m --fps 24000/1001 -p veryslow --open-gop --bframes 16 
   --b-p yramid --bitrate 2500 --rect --amp --aq-mode 3 --no-sao --qcomp 0.75 
   --no-strong -intra-smoothing --psy-rd 1.6 --psy-rdoq 5.0 --rdoq-level 1 
   --tu-inter-depth 4 --tu-intra-depth 4 --ctu 32 --max-tu-size 16 --pass 1 
   --slow-firstpass --stats v. stats --sar 1 --range full 'E:\output.hevc'




ffmpeg version N-83195-ge371f03 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --ena
ble-zlib
  libavutil      55. 44.100 / 55. 44.100
  libavcodec     57. 75.100 / 57. 75.100
  libavformat    57. 63.100 / 57. 63.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 69.100 /  6. 69.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Unrecognized option '-y4m'.
Error splitting the argument list: Option not found
halfer
  • 19,824
  • 17
  • 99
  • 186
cdpp
  • 152
  • 2
  • 9

2 Answers2

4

That's not the correct syntax. Use

-x265-params "y4m=1:fps=24000/1001:p=veryslow:...."
Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thanks for the help! Still getting a few errors though, not really sure why – cdpp Jan 31 '17 at 06:16
  • Make sure **all** options are in form `key=value` with value set to `1` if it's a boolean option. – Gyan Jan 31 '17 at 06:22
  • The code now runs, but ffmpeg says that "y4m","D" and "p" are unknown options, guessing the pipe's wrong or something? Oh and sorry missed your last comment haha but yeah would "y4m=1" "D=10" and "p=veryslow", or "p=8" be wrong then? – cdpp Jan 31 '17 at 06:27
  • I don't see `y4m` in my readout of `x265 --help`, so skip it. – Gyan Jan 31 '17 at 06:43
-3

"--y4m" is not a param of x265. in the first place, it should not be there. it is the container for the output that is going into the yuv4mpegpipe. In your syntax, the error there is your codec. x265 don't any idea what yuv4mpegpipe is...

ffmpeg -i concat:'input1.VOB'\'input.VOB'
-map 0:v -map 0:a -r 24000/1001 -f yuv4mpegpipe 
   -c:v libx265(remove this)-x265-params(remove this)and change it to this "yuv4" -o "input1.VOB.output.y4m" 

write this b4 x265-params after erasing --y4m

ffmpeg.exe -i "input1.VOB.output.y4m"<<-this is the output file that went into the yuv4mpegpipe that you want converted to HEVC)(y4m is like mp4 mkv avi mov) --c:v libx265 --x265-params -->>> --y4m --fps 24000/1001 -p veryslow --open-gop --bframes 16 
   --b-pyramid --bitrate 2500 --rect --amp --aq-mode 3 --no-sao --qcomp 0.75 
   --no-strong-intra-smoothing --psy-rd 1.6 --psy-rdoq 5.0 --rdoq-level 1 
   --tu-inter-depth 4 --tu-intra-depth 4 --ctu 32 --max-tu-size 16 --pass 1 
   --slow-firstpass --stats v. stats --sar 1 --range full 'E:\output.hevc'

if I were to write this, it goes like:

ffmpeg.exe -i concat:'input1.VOB'\'input.VOB' --map 0,1 --c:v yuv4 --s 3840x2160 --r 24000/1001 --f yuv4mpegpipe  --pix-fmt yuv444p16le -o "output-yuv444p16le.y4m"

ffmpeg.exe -i "yuv444p16le.y4m" --fps 24000/1001 --p veryslow --c:v libx265 --x265-params --open-gop --bframes 16 --b-pyramid --bitrate 2500 --rect --amp  --aq-mode 3 --no-sao --qcomp 0.75 --no-strong-intra-smoothing --psy-rd 1.6 --psy-rdoq 5.0 --rdoq-level 1 --tu-inter-depth 4 --tu-intra-depth 4 --ctu 32 --max-tu-size 16 --pass 1 --slow-firstpass --stats v. stats --sar 1 --range full -o E:\output_yuv444p16le.hevc'
Vini.g.fer
  • 11,639
  • 16
  • 61
  • 90
  • 1
    Several issues: 1) `ffmpeg` uses `-`, not `--` as an option prefix, such as `-map`, not `--map`. 2) It does not use `-o` to indicate an output. 3) There is no encoder named yuv4. 4) Several options are incorrect. For example `--p` should be `-preset`. 5)`-x265-params` accepts a colon delimited list of options as shown by Mulvya's answer. – llogan Sep 20 '17 at 02:43