Closed fridge closed 6 years ago
Hey fridge Yes this is a problem we discussed here.
We are working on a new backend and this will be an upcoming part in on of our next versions. But currently it is nott possible. You can try this with our Restreamer-Edge (https://github.com/datarhei/restreamer-edge) concept with activated transcoding. But do not foget: transcoding requires high CPU load.
Video transcoding is expensive , but I believe that the audio does not take a lot of resources.
Can you give me a hint how to modify profiles ffmpeg for my purposes?
it seems to me that I should modify the file live.json , and add the appropriate audio transcoding options.
it is the right way?
I try something like this:
{ ... "ffmpeg": { "options": { .... "native_h264_soundless_aac": [ "-f lavfi", "-i aevalsrc=0", "-vcodec copy", "-acodec aac", "-map 0:0", "-map 1:0", "-shortest", "-map_metadata -1", "-metadata application=datarhei/Restreamer", "-metadata server=NGINX-RTMP", "-f flv" ], ...,
but without success
Yes, it is possible by changing the live.json. You have modify the "native_h264" and not the "h264_soundless_aac" profile because it is just selected if your stream has no audio. Your stream has audio with a "wrong" codec.
Create a new live.json in /mnt/live.json with the upcoming modification:
"ffmpeg": {
"options": {
"native_h264": [
"-vcodec copy",
"-acodec aac",
"-f flv"
],
.....
Hope this work.
Keep on streaming Sven
@svenerbeck wow, this took me a while to digest, but glad to report, audio is working for me. Thanks for the tips!
@svenerbeck so, this hack works fine for a few hours, then nginx RTMP process crashed. Something to do with HLS.
[Nginxrtmp]
[26-06-2017 16:04:58.922] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:58 [error] 34#0: *99 hls: force fragment split: -4695.648 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:58.922] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:58 [error] 34#0: *99 hls: force fragment split: 4695.808 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.043] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: -4695.808 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.044] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: 4695.928 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.116] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: -4695.928 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.117] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: 4696.008 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.321] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: -4696.008 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.323] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: 4696.208 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.435] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: -4696.208 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.436] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: 4696.328 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.517] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: -4696.328 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
[26-06-2017 16:04:59.518] [ERROR] The NGINX RTMP process created an error output: 2017/06/26 14:04:59 [error] 34#0: *99 hls: force fragment split: 4696.408 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
[Nginxrtmp]
I looked up and seems like a known issue with nginx rtmp module?
https://github.com/arut/nginx-rtmp-module/issues/346 https://github.com/arut/nginx-rtmp-module/issues/568
Any pointers how to debug this further? One simple solution maybe to restart the container every few hours, but that doesn't solve the real issue
Hi,
I run it on digitalocean vps for 5$, and video works great , but I have no sound ,
I have source with audio: PCM MU-LAW (mlaw) mono 800Hz bits per sample: 16
Can you help me? Is possible, add some transcoding or something?