aileone / nginx-rtmp-module

add hevc support for rtmp and hls(增加支持H265,修复gcc -Werror警告)
BSD 2-Clause "Simplified" License
38 stars 16 forks source link

HEVC over RTMP in Larix Broadcaster #1

Closed WMSPanel closed 5 years ago

WMSPanel commented 5 years ago

Hello,

I could find any other way to communicate so I'm posting it here. Our team has released support for HEVC over RTMP in our products called Nimble Streamer and Larix Broadcaster: https://wmspanel.com/nimble/rtmp https://softvelum.com/larix/android/ https://softvelum.com/larix/ios/

Feel free to try and let us know of any issues or concerns.

Thank you.

luckcfm commented 5 years ago

Hello @WMSPanel , I just tried larix on iPhone sending a video in HEVC codec but I wasnt able to play it with ffmpeg, I can connect to the server but I cant watch the video in any ways. I'm sending you the log that is generated by ffmpeg.

nginx_rtmp_hevc

WMSPanel commented 5 years ago

@luckcfm It's not quite clear what exactly you do. As I understand, you publish from Larix to nginx-rtmp, then use ffmpeg to pull RTMP stream via ffmpeg, is that correct? What is your nginx-rtmp version? What is your ffmpeg version and have you patched it with HEVC-specific changes? Can you try playing the stream from nginx-rtmp with this player? https://github.com/daniulive/SmarterStreaming/tree/master/WindowsPusher%26Player

luckcfm commented 5 years ago

@WMSPanel Sorry I didnt make that clear, Im using ffmpeg to play the video, I patched it with the code that allows me to play hevc over flv, in the scenario above I was trying to decode the video with ffmpeg and pipe it to ffplay, maybe I did something wrong there.

I'm using ffmpeg version 3.3.9 patched with this: https://gist.github.com/qiaoxueshi/c50fd1f088d431ceb1f59bd4ec40c6d7

I believe I should able to play it like below:

./ffmpeg -i rtmp://127.0.0.1/live/testeL -acodec copy -vcodec copy -f nut - | ffplay -

The nginx-rtmp version is the master of this repo.

And yes, I played the rtmp video with the player that you provided, but I wish to open the stream with ffmpeg, to record the video, for instance.

I can provide more info if needed!

WMSPanel commented 5 years ago

@luckcfm So jut to be clear:

  1. you publish Larix -> nginx-rtmp -> WindowsPusherPlayer and it plays fine;
  2. you publish Larix -> nginx-rtmp -> patched ffmpeg -> ffplay and it doesn't play; Is that correct?

Please also clarify:

  1. Does your build of ffplay support HEVC playback?
  2. Have you tried 2nd scenario but with WindowsPusherPlayer playback instead of ffplay?

Thank you!

luckcfm commented 5 years ago

@WMSPanel ok, here we go:

  1. Plays just fine.
  2. When I play the stream with patched ffplay I get the same error but if I use another rtmp relay with h265 I am able to play it via ffplay seamlessly .

For clarification:

  1. Yes, it does. I removed the ffmpeg part and tried to play it directly, no success.
  2. Not yet, I'm working on it.

Just to be clear the log generated by ffplay is the same. Heres a print: ffplay_rtmp

Its worth mentioning that I can listen to the audio from the stream but I can't watch the video!

Thanks in advance.

alexpokotilo commented 5 years ago

We will check how it works with hevc and ffplay but one thing I observed in your command is that you call ffmpeg from local folder and it probably patched with hevc support while ffplay is called globally without "./" prefix. Could you please run following command

./ffmpeg -i rtmp://127.0.0.1:1935/mytv/stream -acodec copy -vcodec copy -f nut - | ./ffplay - it works to me at least with h264

luckcfm commented 5 years ago

@alexpokotilo yes! In the first print I was running a global ffplay that wasnt compiled with the patch, but it recognizes nut and hevc, In my understanding it should work! On the second I patched and tried to play directly coz I know it should work ok.

alexpokotilo commented 5 years ago

Hi @luckcfm, you made my day - thank you ! We were able to reproduce this problem. It looks like we send incomplete HEVC record and this is why ffmpeg cannot work with stream produced by larix. We'll fix this issue and let you know

luckcfm commented 5 years ago

@alexpokotilo Thanks Alex, glad I could help somehow. I'm looking forward to the update!

alexpokotilo commented 5 years ago

@luckcfm you helped a lot. Actually you made analysis and we just found and fix this on our side. Fix has already been tested and we will let you know once new Larix available in stores. Thanks again

WMSPanel commented 5 years ago

@luckcfm We've released the update for Android and iOS which fixes the problem. Let us know if the issue still shows up. Once again we thank you for your help!

WMSPanel commented 5 years ago

We've also released iOS SDK so I'm closing this ticket if nobody minds.

@luckcfm Thank you very much for your help!