[ ffmpeg51 ] Record, convert and stream audio and video

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
Post Reply
User avatar
outkastm
Gold Member
Posts: 1457
Joined: 29 Dec 2020, 23:52

[ ffmpeg51 ] Record, convert and stream audio and video

Post by outkastm »

Image

About : https://www.ffmpeg.org

Applicable models: x.64 series
Applicable TOS4:
Applicable TOS5: 5.1.13 or later versions
App download: https://tmnascommunity.eu/download/ffmpeg51

Required packages:
ModBase1
ffmpeg

How to manully install this app on TerraMaster application store?

With hardware acceleration via vaapi and qsv

Make sure you enable the correct driver for your platform to benefit the hardware transcoding

Provide ffmpeg branch 5.1.x

FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge.
User avatar
rojsan
Posts: 2
Joined: 24 Jun 2024, 06:41
France

Re: [ ffmpeg51 ] Record, convert and stream audio and video

Post by rojsan »

Hey ! First of all thank you for your hardwork,

I've installed modbase and both ffmpeg/and 51 on TOS6,

I still get :
[puff@bean ~]# vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit


AND 2 days ago it was working with VAAPI:

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:/dev/dri/renderD128,driver=iHD -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/media/movies/In a Violent Nature (2024)/In a Violent Nature (2024) WEBRip-1080p.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 3050134 -maxrate 3050134 -bufsize 6100268 -sei -a53_cc -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=w=1280:h=720:format=nv12:extra_hw_frames=24" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "e5fe263551e27f6d25f0fbf9bf848eda-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/e5fe263551e27f6d25f0fbf9bf848eda%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/e5fe263551e27f6d25f0fbf9bf848eda.m3u8"

Is there a way to reinstall the drivers that you are aware of ?

Thanks again
User avatar
m00ndogg
Posts: 10
Joined: 09 Dec 2023, 01:30
United States of America

Re: [ ffmpeg51 ] Record, convert and stream audio and video

Post by m00ndogg »

ffmpeg51 Should I use ffmpeg or ffmpeg51 for my Jellyfin setup?

I'm using:

TOS 5.1
TNAS PC Setup 5.0.35.exe
and
Jellyfin TOS5 10.9.2.0 x86_64.tpk

Also, I'm not sure if I should use ModBase1 TOS5 1.00.17 x86_64.tpk
User avatar
outkastm
Gold Member
Posts: 1457
Joined: 29 Dec 2020, 23:52

Re: [ ffmpeg51 ] Record, convert and stream audio and video

Post by outkastm »

Each app frontend will inform you if any dependency app is missing.
For Jellyfin you need all what you described (best to use the more recent version) : ModBase1, ffmpeg and ffmpeg51
User avatar
m00ndogg
Posts: 10
Joined: 09 Dec 2023, 01:30
United States of America

Re: [ ffmpeg51 ] Record, convert and stream audio and video

Post by m00ndogg »

should I be using ffmpeg or ffmpeg51?

I have TOS 5.1 and Jellyfin 10.10.3.0 on a F2-223.

It seems like I have to use both to make it work.
Is that normal or can I un-install one of them?
User avatar
outkastm
Gold Member
Posts: 1457
Joined: 29 Dec 2020, 23:52

Re: [ ffmpeg51 ] Record, convert and stream audio and video

Post by outkastm »

Is normal, ffmpeg51 require some libraries that are included in ffmpeg.
User avatar
richt
Posts: 6
Joined: 01 Jun 2024, 01:55
United States of America

Re: [ ffmpeg51 ] Record, convert and stream audio and video

Post by richt »

Running TOS 6.0.0610 on an F4-423. Have ffmpeg and ffmpeg5.1 installed and enabled iHD driver for both. Am able to transcode files using qsv and vaapi, however qsv transcodes fail if I attempt to use CBR. Am able to use qsv with CQP.
Using this basic command:

Code: Select all

/Volume1/@apps/ffmpeg51/sys/bin/ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -i input.ts -ss 00:00:05 -to 00:01:00 -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M -maxrate 5M output1.mp4
Results in errors

Code: Select all

[h264_qsv @ 0x2902ac0] Selected ratecontrol mode is unsupported
[h264_qsv @ 0x2902ac0] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Question - Is CQP rate control supported in this implementation of ffmpeg5.1 on the F4-423 running TOS6?
If it is supported, I'll keep looking for an error on my part.


edit - vaapi reports a similar error

Code: Select all

[h264_vaapi @ 0x25a5240] Driver does not support any RC mode compatible with selected options (supported modes: CQP).
Post Reply

Return to “Developer Discussion Room”