illuspas / Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH/MP4 Media Server
https://www.npmjs.com/package/node-media-server
MIT License
6k stars 1.53k forks source link

Trans coding Issue #76

Open tahabesthive opened 6 years ago

tahabesthive commented 6 years ago

4/20/2018 17:47:40 [INFO] [rtmp publish] New stream. id=WTV3CKWE streamPath=/live/stream streamId=1 4/20/2018 17:47:41 [INFO] verify it. 4/20/2018 17:47:41 [INFO] Debug Transcoder true 4/20/2018 17:47:41 [INFO] [Transmuxing MP4] /live/stream to ./media/live/stream/2018-04-20-17-47.mp4 4/20/2018 17:47:41 [INFO] [Transmuxing HLS] /live/stream to ./media/live/stream/index.m3u8 4/20/2018 17:47:41 [INFO] [Transmuxing DASH] /live/stream to ./media/live/stream/index.mpd [NodeEvent on postPublish] id=WTV3CKWE StreamPath=/live/stream args={"ac":0,"vc":0} [NodeEvent on preConnect] id=7F9LUKT0 args={"app":"live","flashVer":"LNX 9,0,124,2","tcUrl":"rtmp://localhost:1935/live","fpad":false,"capabilities":15,"audioCodecs":4071,"videoCodecs":252,"videoFunction":1} 4/20/2018 17:47:41 [INFO] [rtmp connect] id=7F9LUKT0 ip=127.0.0.1 app=live args={"app":"live","flashVer":"LNX 9,0,124,2","tcUrl":"rtmp://localhost:1935/live","fpad":false,"capabilities":15,"audioCodecs":4071,"videoCodecs":252,"videoFunction":1} [NodeEvent on postConnect] id=7F9LUKT0 args={"app":"live","flashVer":"LNX 9,0,124,2","tcUrl":"rtmp://localhost:1935/live","fpad":false,"capabilities":15,"audioCodecs":4071,"videoCodecs":252,"videoFunction":1} [NodeEvent on prePlay] id=7F9LUKT0 StreamPath=/live/stream args={} [NodeEvent on postPlay] id=7F9LUKT0 StreamPath=/live/stream args={} 4/20/2018 17:47:41 [INFO] [rtmp play] Join stream. id=7F9LUKT0 streamPath=/live/stream streamId=1 4/20/2018 17:47:41 [INFO] [rtmp publish] Handle audio. id=WTV3CKWE streamPath=/live/stream sound_format=10 sound_type=2 sound_size=1 sound_rate=3 codec_name=AAC 44100 2ch 4/20/2018 17:47:41 [INFO] [rtmp publish] Handle video. id=WTV3CKWE streamPath=/live/stream frame_type=1 codec_id=7 codec_name=H264 1092x614 [NodeEvent on donePlay] id=7F9LUKT0 StreamPath=/live/stream args={} 4/20/2018 17:47:42 [INFO] [rtmp play] Close stream. id=7F9LUKT0 streamPath=/live/stream streamId=1 4/20/2018 17:47:42 [INFO] [Transmuxing end] /live/stream 4/20/2018 17:47:42 [INFO] [rtmp disconnect] id=7F9LUKT0 [NodeEvent on doneConnect] id=7F9LUKT0 args={"app":"live","flashVer":"LNX 9,0,124,2","tcUrl":"rtmp://localhost:1935/live","fpad":false,"capabilities":15,"audioCodecs":4071,"videoCodecs":252,"videoFunction":1}

System it self end-up the [Transmuxing end] /live/stream, even its not generating file at [Transmuxing DASH] /live/stream to ./media/live/stream/index.mpd

jeroentip commented 6 years ago

I have a kind the same issue, starting remux and it end without placing files etc., I am now using a second ffmpeg to transcode to hls however it is not the solution I want to have because I want to remux the stream in its origine.

My current workaround is

ffmpeg -v verbose -i rtmp://[server]/live/STREAM_NAME -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 400k -bufsize 1835k -pix_fmt yuv420p -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 /home/stream/public_html/test1/test.m3u8

Please inform me when solution is found anywhere