Closed BobOkisama closed 5 years ago
Should be --device not volume map (-v). i.e --device /dev/dri/renderD128:/dev/dri/renderD128 \
Added -v /dev/dri/renderD128:/dev/dri/renderD128 \ to my container `
I changed it to --device and tried both nvidia and vaapi with the same results. Nvidia just goes straight to software dec/enc and vaapi just sits and spins and never starts. I tried vaapi with both renderD128 and D129. I tried both /usr/bin/ffmpeg and the Van's static 4.1 sitting at /opt/ffmpeg/ffmpeg-4.1-64bit-static/ffmpeg on my system.
Okay. @BobOkisama you are actually right. SInce V10 release, HW transcoding is not working for me either using static build from John. My test is from an Intel based server. I believe my issue is almost same expect ffmpeg exits for me. Doesn't even try software decode. Previous JF version had working HW transcode. I append my related logs here for further inquiry into why HW transcode fails with v10:
I just emailed Van asking if the 4.1 static build he has includes NVenc/NVdec and VAAPI. Hopefully I will hear back from him soon, and maybe if it does not get him to do one with those baked in.
Also, as far as I can tell from the logs when I have nvidia transcode enabled, does not look like it is even passing the commands to use it:
/opt/ffmpeg/ffmpeg-4.1-64bit-static/ffmpeg -i file:"/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset veryfast -crf 21 -maxrate 2616000 -bufsize 5232000 -profile:v high -level 4.1 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 384000 -af "volume=2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/tmp/transcoding-temp/bc48ad2f04a6257b2553f1d2be5d3318.m3u8" -y "/tmp/transcoding-temp/bc48ad2f04a6257b2553f1d2be5d3318%d.ts"
I expect to see a h264_nvenc/h265_nvenc or -hwaccel nvdec in that command, but unless I am blind I am not. I did just change my preset to slow and I show that being used in the command, but still no NV commands.
Got a reply from Van:
It's not possible to statically link to vaapi or NVidia's driver because they only ship shared libs.
Well, things got more interesting now.
I did verify that jellyfin is not passing the proper CLI commands to ffmpeg for nvenc/nvdec transcoding in linux. On my test box which is win10 I enabled nvidia transcode (1080ti on that machine) and here is the command line passed:
D:\Jellyfin-server\ffmpeg.exe -c:v hevc_cuvid -resize 1278x534 -i file:"M:\BobOki\4K\Avengers.Infinity.War.2018.2160p.UHD.BluRay.x265-TERMiNAL\avengers.infinity.war.2018.2160p.uhd.bluray.x265-terminal.mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -pix_fmt yuv420p -preset default -b:v 3360000 -maxrate 3360000 -bufsize 6720000 -profile:v high -force_key_frames "expr:gte(t,n_forced*3)" -copyts -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "C:\Users\bobok\AppData\Roaming\jellyfin\transcoding-temp\2b2ab34e680117a83c1659f605a1d80e.m3u8" -y "C:\Users\bobok\AppData\Roaming\jellyfin\transcoding-temp\2b2ab34e680117a83c1659f605a1d80e%d.ts"
You can see the -codec:v:0 h264_nvec and -c:v hevc_cuvid
string being called. I see about 11% cpu in use and a solid crazy like 85% GPU. Mind you this is not my P2000 and I do not have any patched drivers loaded for this card, but it certainly is passing the proper commands.
cc @MatMaul
Hum I think the GPL christmas gift breaks it. It looks like MediaController.MediaEncoding get removed and completely replaced ? I'll have a look tomorrow, for now I don't even know where I can find the previous version to diff it, some history got rewritten right ? @nvllsvm I need your help here, if you have some way to get or an archive of the repo before chritmas I would be helpful.
@MatMaul how about https://github.com/MatMaul/jellyfin 😃 ?
... I think I need to go to sleep xD I erased my local branches after the force push, didn't think about my remote ^^ Thanks !
Don't you need to install the nvidia GPU and CUDA drivers on both the host and in the docker image for this to work?
i.e. https://stackoverflow.com/questions/25185405/using-gpu-from-a-docker-container
Or using the nvidia-docker ?
Updated to current and tested and working on Unraid, Dockerfile to build an image:
i.e. - docker build -t imagename .
FROM ubuntu:16.04
MAINTAINER Jonathan Kosgei <jonathan@saharacluster.com>
# A docker container with the Nvidia kernel module and CUDA drivers installed
ENV CUDA_RUN https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux
RUN apt-get update && apt-get install -q -y \
wget \
module-init-tools \
build-essential
RUN cd /opt && \
wget $CUDA_RUN && \
chmod +x cuda_10.0.130_410.48_linux && \
mkdir nvidia_installers && \
./cuda_10.0.130_410.48_linux -extract=`pwd`/nvidia_installers && \
cd nvidia_installers && \
./NVIDIA-Linux-x86_64-410.48.run -s -N --no-kernel-module
RUN cd /opt/nvidia_installers && ls -alh && \
./cuda-linux.10.0.130-24817639.run -noprompt
# Ensure the CUDA libs and binaries are in the correct environment variables
ENV LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.0/lib64
ENV PATH=$PATH:/usr/local/cuda-10.0/bin
RUN cd /opt/nvidia_installers &&\
./cuda-samples.10.0.130-24817639-linux.run -noprompt -cudaprefix=/usr/local/cuda-10.0 &&\
cd /usr/local/cuda/samples/1_Utilities/deviceQuery &&\
make
WORKDIR /usr/local/cuda/samples/1_Utilities/deviceQuery
Now run the image and test:
sudo docker run -ti --device /dev/nvidia0:/dev/nvidia0 --device /dev/nvidiactl:/dev/nvidiactl --device /dev/nvidia-uvm:/dev/nvidia-uvm <built-image> ./deviceQuery
You should see output similar to:
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GRID K520
Result = PASS
Also yes, ffmpeg in the docker does not appear to support NVENC so we might want to raise an issue for them to include an ffmpeg that does.
Just found out that the latest ffmpeg in the 18.04 ubuntu repo (3.4.4-0ubuntu0.18.04.1) does have nvenc and nvdec/cuda. I am running 16.04 so this does not help me.... yet.
Anyone know a way to load that same ffmpeg package on 16.04?
You would need to compile ffmpeg with that support turned on.
Has there been any further development on this?
Depending on the docker image base operating system integrating the nvidia packages may be extremely straightforward * assuming it is the same OS as one of the nvidia provided pre-made images.
Here's how they make their own images: https://gitlab.com/nvidia/cuda/blob/ubuntu16.04/10.0/base/Dockerfile
cc @nvllsvm @sparky8251
On further investigation - it looks like the docker might simply need to package an FFMPEG compiled with NVENC support for the acceleration to work*
*But the CUDA SDK versions need to match from the host to the version FFMPEG is compiled with!
I'm running jellyfin in docker, and this already works. You just need to make sure you have the nvidia drivers installed and nvidia-docker set up properly. Then set the runtime to nvidia
for your docker container. Here is my docker-compose for my jellyfin container:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
hostname: jellyfin
runtime: nvidia
restart: always
ports:
- '8096:8096/tcp'
volumes:
- /zfs/docker/appdata/jellyfin:/config
- /mnt/ssd/cache:/cache
- /zfs/media:/media
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
devices:
- "/dev/dri:/dev/dri"
I don't think the /dev/dri
is needed, but I have it in there just in case.
Are you saying the native Jellyfin container now has NVENC support in the FFMPEG package?
If so, which nvidia SDK was it built upon?
Yes:
root@nas:~# docker exec -it jellyfin ffprobe -encoders | grep nvenc
configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gnutls --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg
V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_hevc NVIDIA NVENC hevc encoder (codec hevc)
V..... hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)
root@nas:~# docker exec -it jellyfin ffprobe -decoders | grep cuvid
configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gnutls --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg
V..... h264_cuvid Nvidia CUVID H264 decoder (codec h264)
V..... hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc)
V..... mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg)
V..... mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
V..... mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
V..... mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4)
V..... vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1)
V..... vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8)
V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)
I have no idea what nvidia SDK it was built against. If you have recent nvidia drivers installed, I doubt it matters. Here is what I have:
root@nas:~# nvidia-smi
Sun May 26 11:30:38 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 2060 Off | 00000000:03:00.0 Off | N/A |
| 12% 55C P0 1W / 190W | 0MiB / 5904MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
Yes:
root@nas:~# docker exec -it jellyfin ffprobe -encoders | grep nvenc configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gnutls --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264) V..... nvenc NVIDIA NVENC H.264 encoder (codec h264) V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264) V..... nvenc_hevc NVIDIA NVENC hevc encoder (codec hevc) V..... hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc) root@nas:~# docker exec -it jellyfin ffprobe -decoders | grep cuvid configuration: --disable-debug --disable-doc --disable-ffplay --enable-vaapi --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gnutls --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-postproc --enable-cuvid --enable-nvenc --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg V..... h264_cuvid Nvidia CUVID H264 decoder (codec h264) V..... hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc) V..... mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg) V..... mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video) V..... mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video) V..... mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4) V..... vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1) V..... vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8) V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)
I have no idea what nvidia SDK it was built against. If you have recent nvidia drivers installed, I doubt it matters. Here is what I have:
root@nas:~# nvidia-smi Sun May 26 11:30:38 2019 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce RTX 2060 Off | 00000000:03:00.0 Off | N/A | | 12% 55C P0 1W / 190W | 0MiB / 5904MiB | 0% Default | +-------------------------------+----------------------+----------------------+
Thank-you for the clarification.
It might matter for some people as desync between the CUDA libraries used in the driver and those for FFMPEG compiling will result in errors, see:
https://github.com/binhex/arch-jellyfin/issues/2#issuecomment-485604637
We ship nvdec/nvenc-enabled ffmpeg in our docker builds for quite a while. What you really have to do is to make sure you use nvidia-enabled "docker driver" for running the container, but this is out of scope (at best it warrants a section in the JF documentation).
I think there should at least be a note of which SDK/driver the ffmpeg is compiled against for the reasons I said above.
Does the build script count for noting?
ARG NVCODECHEADERS_VERSION=n9.0.18.1
I guess that works when people know where to look :)
I was thinking more documentation with a link to it or similar.
If you have an idea how to document it (and as you now know the version), could you please open a PR at https://github.com/jellyfin/jellyfin-docs with proposed changes?
I'd probably stick a paragraph of something in here: https://jellyfin.readthedocs.io/en/latest/administrator-docs/hardware-acceleration/#enabling-hardware-acceleration
"Hardware acceleration in Docker Containers" for example.
But again - I'm not familiar with how Jellyfin is doing documentation though if I get the time I will look into it.
I'd probably stick a paragraph of something in here: https://jellyfin.readthedocs.io/en/latest/administrator-docs/hardware-acceleration/#enabling-hardware-acceleration ...
@Aterfax ah that’s our old docs page. Everything is now on docs.jellyfin.org. The repo that @JustAMan linked will publish there.
Was chatting with guys on a reddit thread about this, here is what we have tried thus far: Added -v /dev/dri/renderD128:/dev/dri/renderD128 \ to my container Chmod 777 /dev/dri/renderD128 Downloaded Van's 4.1 latest and mapped that to the container Pointed JF to the static 4.1 and tried to use that direct
Basically what it is doing is just going directly to software transcoding and does not even looks like it attempts nvenc/dec. I have also tried multiple files, just forcing 720p 3 meg to make it transcode atm. Also worth noting that HW transcoding is working on my plex load on this same box and my card is the Quadro P2000 with 390.59 drivers.
Logs (click to expand)
``` {"Protocol":"File","Id":"4792459ea92c04bb4f8bd731d4e29c21","Path":"/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.mp4","Type":"Default","Container":"mov,mp4,m4a,3gp,3g2,mj2","Name":"Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL","IsRemote":false,"ETag":"31bffc11008697604b578bf151298851","RunTimeTicks":69822717952,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"hevc","CodecTag":"hev1","Language":"eng","TimeBase":"1/16000","CodecTimeBase":"125/2997","VideoRange":"SDR","DisplayTitle":"4K HEVC","IsInterlaced":false,"BitRate":21114367,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":1608,"Width":3840,"AverageFrameRate":23.9760017,"RealFrameRate":23.9760246,"Profile":"Main 10","Type":"Video","AspectRatio":"2.40:1","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p10le","Level":150},{"Codec":"dts","CodecTag":"mp4a","Language":"eng","TimeBase":"1/48000","CodecTimeBase":"1/48000","DisplayTitle":"Eng DTS 7.1 Default","IsInterlaced":false,"ChannelLayout":"7.1","BitDepth":24,"Channels":8,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"DTS-HD MA","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"srt","Language":"ger","DisplayTitle":"Ger","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":2,"IsExternal":true,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":"/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.de.srt"},{"Codec":"srt","Language":"eng","DisplayTitle":"Eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":3,"IsExternal":true,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":"/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.en.srt"},{"Codec":"srt","Language":"spa","DisplayTitle":"Spa","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":4,"IsExternal":true,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":"/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.es.srt"}],"Formats":[],"Bitrate":25332586,"RequiredHttpHeaders":{}} /opt/ffmpeg/ffmpeg-4.1-64bit-static/ffmpeg -i file:"/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset veryfast -crf 21 -maxrate 2616000 -bufsize 5232000 -profile:v high -level 4.1 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 384000 -af "volume=2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8" -y "/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c%d.ts" ffmpeg version 4.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:/media/boboki/Media/BobOki/4K/Arrival.2016.2160p.Remux.UHD.BluRay.HDR.DTS-HD.MA7.1.x265-UHDCL.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2017-04-14T17:46:00.000000Z title : Arrival (2016) - Release for ULTRAHDCLUB encoder : Lavf58.2.103 Duration: 01:56:22.27, start: 0.000000, bitrate: 25332 kb/s Chapter #0:0: start 0.000000, end 589.213000 Metadata: title : 00:00:00.000 Chapter #0:1: start 589.213000, end 1052.842000 Metadata: title : 00:09:49.213 Chapter #0:2: start 1052.842000, end 1407.571000 Metadata: title : 00:17:32.842 Chapter #0:3: start 1407.571000, end 2033.447000 Metadata: title : 00:23:27.571 Chapter #0:4: start 2033.447000, end 2460.999000 Metadata: title : 00:33:53.447 Chapter #0:5: start 2460.999000, end 3145.392000 Metadata: title : 00:41:00.999 Chapter #0:6: start 3145.392000, end 3453.867000 Metadata: title : 00:52:25.392 Chapter #0:7: start 3453.867000, end 3785.740000 Metadata: title : 00:57:33.867 Chapter #0:8: start 3785.740000, end 4168.497000 Metadata: title : 01:03:05.740 Chapter #0:9: start 4168.497000, end 4568.689000 Metadata: title : 01:09:28.497 Chapter #0:10: start 4568.689000, end 5121.115000 Metadata: title : 01:16:08.689 Chapter #0:11: start 5121.115000, end 5736.355000 Metadata: title : 01:25:21.115 Chapter #0:12: start 5736.355000, end 6325.985000 Metadata: title : 01:35:36.355 Chapter #0:13: start 6325.985000, end 6982.272000 Metadata: title : 01:45:25.985 Stream #0:0(eng): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608, 21114 kb/s, SAR 1:1 DAR 160:67, 23.98 fps, 23.98 tbr, 16k tbn, 23.98 tbc (default) Metadata: creation_time : 2017-04-14T17:46:00.000000Z handler_name : VideoHandler Stream #0:1(eng): Audio: dts (DTS-HD MA) (mp4a / 0x6134706D), 48000 Hz, 7.1, s32p (24 bit) (default) Metadata: creation_time : 2017-04-14T17:46:00.000000Z handler_name : SoundHandler Stream #0:2(eng): Data: bin_data (text / 0x74786574) Metadata: creation_time : 2017-04-14T17:46:00.000000Z handler_name : SubtitleHandler Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (dts (dca) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help [libx264 @ 0x6bf2b00] using SAR=1/1 [libx264 @ 0x6bf2b00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0x6bf2b00] profile Main, level 4.1, 4:2:0, 8-bit [libx264 @ 0x6bf2b00] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=4 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=17 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=21.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=2616 vbv_bufsize=5232 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00 [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c0.ts' for writing Output #0, segment, to '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c%d.ts': Metadata: encoder : Lavf58.20.100 Stream #0:0: Video: h264 (libx264), yuv420p, 1280x536 [SAR 1:1 DAR 160:67], q=-1--1, 23.98 fps, 90k tbn, 23.98 tbc (default) Metadata: encoder : Lavc58.35.100 libx264 Side data: cpb: bitrate max/min/avg: 2616000/0/0 buffer size: 5232000 vbv_delay: -1 Stream #0:1: Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp (24 bit), 384 kb/s (default) Metadata: encoder : Lavc58.35.100 libmp3lame frame= 18 fps=0.0 q=0.0 size=N/A time=00:00:01.27 bitrate=N/A speed=2.52x frame= 54 fps= 54 q=26.0 size=N/A time=00:00:02.76 bitrate=N/A speed=2.74x frame= 90 fps= 60 q=26.0 size=N/A time=00:00:04.27 bitrate=N/A speed=2.83x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c1.ts' for writing frame= 127 fps= 63 q=26.0 size=N/A time=00:00:05.80 bitrate=N/A speed=2.88x frame= 163 fps= 65 q=26.0 size=N/A time=00:00:07.31 bitrate=N/A speed= 2.9x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c2.ts' for writing frame= 198 fps= 65 q=26.0 size=N/A time=00:00:08.78 bitrate=N/A speed=2.91x frame= 234 fps= 66 q=26.0 size=N/A time=00:00:10.27 bitrate=N/A speed=2.91x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c3.ts' for writing frame= 269 fps= 67 q=26.0 size=N/A time=00:00:11.73 bitrate=N/A speed=2.91x frame= 305 fps= 67 q=26.0 size=N/A time=00:00:13.27 bitrate=N/A speed=2.93x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c4.ts' for writing frame= 342 fps= 68 q=26.0 size=N/A time=00:00:14.78 bitrate=N/A speed=2.93x frame= 379 fps= 68 q=26.0 size=N/A time=00:00:16.32 bitrate=N/A speed=2.94x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c5.ts' for writing frame= 416 fps= 69 q=26.0 size=N/A time=00:00:17.87 bitrate=N/A speed=2.95x frame= 453 fps= 69 q=26.0 size=N/A time=00:00:19.41 bitrate=N/A speed=2.96x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c6.ts' for writing frame= 490 fps= 69 q=26.0 size=N/A time=00:00:20.95 bitrate=N/A speed=2.97x frame= 526 fps= 70 q=26.0 size=N/A time=00:00:22.46 bitrate=N/A speed=2.97x [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c7.ts' for writing [segment @ 0x6bf1600] Opening '/tmp/transcoding-temp/593adbf39edffecacee6e1d207fa208c.m3u8.tmp' for writing frame= 557 fps= 69 q=-1.0 Lsize=N/A time=00:00:23.85 bitrate=N/A speed=2.97x video:3340kB audio:933kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x6bf2b00] frame I:10 Avg QP:14.90 size: 24519 [libx264 @ 0x6bf2b00] frame P:168 Avg QP:19.02 size: 10206 [libx264 @ 0x6bf2b00] frame B:379 Avg QP:20.67 size: 3851 [libx264 @ 0x6bf2b00] consecutive B-frames: 7.2% 3.6% 8.1% 81.1% ```