memeka 0 Posted March 15, 2017 Posted March 15, 2017 Hi, I want to know if emby server will be able to transcode hw accelerated using my arm board's VPU. I already have ffmpeg patched to make use of hardware acceleration, so I was wondering if I can have some example ffmpeg commands emby builds for transcoding, to check them beforehand (from command line) and debug them outside of emby. Thank you!
memeka 0 Posted March 15, 2017 Author Posted March 15, 2017 I am using a V4L2 encoder for Exynos MFC, it's not in upstream ffmpeg.
Luke 42078 Posted March 15, 2017 Posted March 15, 2017 How does it work? does it require proprietary commands or will it intercept commands that use libx264?
memeka 0 Posted March 15, 2017 Author Posted March 15, 2017 (edited) $ ffmpeg -codecs | grep h264 ffmpeg version 3.2.4-1 Copyright (c) 2000-2017 the FFmpeg developers DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264_v4l2m2m h264 h264_vdpau ) (encoders: h264_v4l2m2m libx264 libx264rgb h264_omx h264_vaapi ) You can see here there's the libx264 encoder and the h264_v4l2m2m encoder that i want to use. I can transcode a file with a command like: ffmpeg -i file.mkv -vcodec h264_v4l2m2m file-encoded.mp4 Actually h264_v4l2m2m currently it's set as "default" so it will be picked automatically just by something like "ffmpeg -i file.mp4 file-encoded.mp4". There should not be any proprietary stuff, it reads from ffmpeg settings like gop size, encoder bit rate, qmin/qmax and h264 profile. h264 level is currently hardcoded to 3.2, as the hardware even tho` it says it's supporting 4.0, it's not working well. I assume if other encoding options are set by ffmpeg, they will just be ignored. This is why I would want to test a transcoding command generated by emby, and redirect output to a file, to be able to debug and modify the code for the encoder (e.g. maybe add more encoding options, if emby uses them). EDIT: so i guess you can say it will intercept commands for libx264 Edited March 15, 2017 by memeka
Luke 42078 Posted March 17, 2017 Posted March 17, 2017 Hi, I'm happy to help, but example command lines are easy to find in server logs. All you have to do is play something. Here's one I just did right now: ffmpeg.exe -analyzeduration 2000000 -f mpegts -i "http://127.0.0.1:8096/LiveTv/LiveStreamFiles/963c4588668a48be84f4ad0f6c976fb5/stream.ts" -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 23 -maxrate 8000000 -bufsize 16000000 -vsync -1 -profile:v high -level 4.1 -level 41 -x264opts:0 subme=0:rc_lookahead=10:me_range=4:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -vf "yadif=0:-1:0" -flags -global_header -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -codec:a:0 aac -strict experimental -ac 2 -ab 384000 -af "adelay=1,aresample=async=1,volume=2" -hls_time 3 -individual_header_trailer 0 -start_number 0 -hls_list_size 0 -hls_base_url "hls/8bba13bcbf97bdb546e9ed6ce1b146c8/" -y "C:\transcoding-temp\8bba13bcbf97bdb546e9ed6ce1b146c8.m3u8"
Luke 42078 Posted July 7, 2019 Posted July 7, 2019 @@memeka The upcoming Emby Server 4.2 will have h264_omx built-in for Raspberry Pi hardware encoding. Thanks guys.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now