edit ffmpeg out stream
Added by hacksat hacksat almost 6 years ago
hi everyone and happy holidays,
I wanted to ask if it was possible to change the out of the tvh stream? if you can do what?
Replies (25)
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
Be more specific, question is not understandable.
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
Hello,
I wanted to edit the ffmpeg command that generates the stream, the stream profiles, I wanted to try to make changes directly on the profiles
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
use MPEG-TS Spawn/built-in profile
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
yes understand, but uses a lot of cpu and becomes unstable, at least with the command that I created, then if there is a better command of mine and someone want to give me a hand I thank you
this is my command line
/opt/ffmpeg/bin/ffmpeg -i pipe:0 -preset superfast -bitrate 2000k -bufsize 1500k -c:v libx264 -c:a aac -c:s copy -f mpegts pipe:1
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
Use GPU /vaapu, nvidia/, limit treads /-threads 1/, reduce present /ultrafast, realtime/.
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
hello thanks for the answer,
the problem is that it ignores transcoding,so the channel as it enters goes out -> http://prntscr.com/lzczp3
if limits bitrate or size ignores it, and the cpu I have not solved yet with -threads 1
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
ffmpeg -fflags +genpts -nostats -nostdin -hide_banner -loglevel quiet -hwaccel cuvid -c:v h264_cuvid -deint 1 -surfaces 8 -drop_second_field 1 -vsync 0 -resize 1280x720 -i -map 0:v -c:v h264_nvenc -preset slow -profile:v high -level 4.1 -rc vbr -cq 1 -bf 2 -g 25 -b:v 2200k -minrate 2200k -maxrate 2200k -bufsize 1002k -map 0:a -c:a libfdk_aac -ac 2 -b:a 128k -strict experimental
use this as starting point
https://thoaimedia.com/ffmpeg-tools/ffmpeg-command-generator/
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
But for example i can edit the profile strema like example "webtv-h264-aac-matroska" and add -threads 1 ?
i use this webtv-h264-aac-matroska and work fine, my problem is use all threads and CPU if i set -threads 1 it will use a lot less cpu
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
WEBTV profiles are for browser capability
what is your cpu?
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
this is my CPU
Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
With GPU on this CPU you can compress up to 18 HD channels.
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
with the Nvidia video card?
or GPU integrated?
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
unfortunately I'm not an expert on these things, I do not know how to do it, how to move first
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
sorry, but since I know the simple CPU transcoding with the stream profiles use WEBTV codec AAC and it's always fine online, is there a way to simply add add-1 threads? already doing -1 threads I can make someone in more channels in HD
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
modify your
/opt/ffmpeg/bin/ffmpeg -i pipe:0 -preset superfast -bitrate 2000k -bufsize 1500k -c:v libx264 -c:a aac -c:s copy -f mpegts pipe:1
with
/opt/ffmpeg/bin/ffmpeg -i pipe:0 -preset ultrafast -b:v 2048k -minrate 1024k -maxrate 3096k -bufsize 1500k -c:v libx264 -c:a aac -threads 2 -c:s copy -f mpegts pipe:1
or compile tvh with --enable-vaapi
https://tvheadend.org/boards/4/topics/24116
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
thanks for your command
/opt/ffmpeg/bin/ffmpeg -i pipe:0 -preset ultrafast -b:v 2048k -minrate 1024k -maxrate 3096k -bufsize 1500k -c:v libx264 -c:a aac -threads 2 -c:s copy -f mpegts pipe:1
but don't work
the stream start but not trascode in your command there are the
bitrate 2048k
maxrate 3096k
preset ultra fast
but you can see go out 7000/8000k
http://prntscr.com/lzg954
not work the transcoding ffmepg i think
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
nothing to do, forgive me if I insist, but where is the ffmpeg that creates the profile WEBTV codec AAC
add -threads 1 i think work and solve the preblem
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
Test with input url /from playlist/
and output to multicast for example
There is something with is wrong.
test with
http://www.ipvideotrans.com/live-video-transcoding.html
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
my intervention was aimed at modifying an existing profile that is stable, just add the command for the treaders and finished, I can not figure out where the profile command is located webtv-h264-aac-matroska or webtv-h264-aac-mpegts for edit
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
hacksat hacksat wrote:
my intervention was aimed at modifying an existing profile that is stable, just add the command for the treaders and finished, I can not figure out where the profile command is located webtv-h264-aac-matroska or webtv-h264-aac-mpegts for edit
in source code of tvh
https://github.com/tvheadend/tvheadend/blob/66d6161c563181e5a572337ab3509a835c5a57e2/data/conf/transcoder/profiles
https://github.com/tvheadend/tvheadend/blob/66d6161c563181e5a572337ab3509a835c5a57e2/src/webui/static/tv.js
https://github.com/tvheadend/tvheadend/blob/66d6161c563181e5a572337ab3509a835c5a57e2/data/conf/transcoder/codecs
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
thanks for the reply, but how do you add a threaders instead of using them all? it could be interesting for everyone since we know that it consumes less CPU based on the processor
RE: edit ffmpeg out stream - Added by saen acro almost 6 years ago
Fill free to add new issue for this
https://tvheadend.org/projects/tvheadend/issues/new
RE: edit ffmpeg out stream - Added by hacksat hacksat almost 6 years ago
maybe is not best way
i don't have answare