HD Видеоконференции на OpenMCU



Если Вы обнаружили проблему в работе сервера OpenMCU-ru, пожалуйста, сообщите о ней в разделе форума "Обнаруженные ошибки", приложив информацию, которая поможет разработчикам её воспроизвести - трассировку (в случае некорректной работы сервера, либо проблем с согласованием терминалов) и backtrace (при падении сервера с ошибкой).

Автор Тема: The thread of read rtsp data and decode  (Прочитано 1188 раз)

Chen Yifu

  • Новичок
  • *
  • Сообщений: 4
  • Карма: 0
hi, I are porting the openmcu to ARM, and the encode/decode are done by video process unit.
I find that the read rtsp data and decode are in the same thread, after I read the source code.
As a result, the  efficiency is not very well sometime. Because the read rtsp data function 'ReadData' calls 'Select'.
It will cause block. And the decode process will be delay. In our scenario, we need get 30fps. But I found that
the ReadData will spend several decade milliseconds.

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: The thread of read rtsp data and decode
« Ответ #1 : 26 Май 2017, 02:17:12 »
hi!
please send your commits if you want
ARM is very popular now
I thought it's not good for ARM if the daemon has many threads so your post is surprising
I thought same thing when I tried to add traffic shaper for outgoing video RTP
of course I thought of common PC x86_64

Chen Yifu

  • Новичок
  • *
  • Сообщений: 4
  • Карма: 0
Re: The thread of read rtsp data and decode
« Ответ #2 : 26 Май 2017, 04:28:01 »
Hi,
What I modify is ffmpeg. I add the hardware encoder and decoder for the ffmpeg.
And I use the ffmpeg api in the h264 plugin instead libx264 api.
I wiil send the source code after i manage the code.
BTW, The ARM is following the x86. The performance is very well now.
In our scenario, there are two 1.8G cores and four 1.4G cores.

In our test case, four 1080P H264 input and one 1080P H264 out, The cpu usage is 100%(total is 600%).

Chen Yifu

  • Новичок
  • *
  • Сообщений: 4
  • Карма: 0
Re: The thread of read rtsp data and decode
« Ответ #3 : 26 Май 2017, 05:05:26 »
Hi,
I still have one question. If I set 30fps per second. And I print the time 30fps used, it's 1second.
But the time per 1fps used is not steady 33ms. Sometime 1fps used 10ms, sometime 1fps used 50ms.
How can I make 1fps using 33ms steady ? It's import to me.

Chen Yifu

  • Новичок
  • *
  • Сообщений: 4
  • Карма: 0
Re: The thread of read rtsp data and decode
« Ответ #4 : 26 Май 2017, 05:08:39 »
Sorry, I forgot that it's the decode time.

kay27

  • Глобальный модератор
  • Ветеран
  • *****
  • Сообщений: 3058
  • Карма: 58
Re: The thread of read rtsp data and decode
« Ответ #5 : 26 Май 2017, 23:37:45 »
If it's because of intra refresh - you need to disable key frames, x264 plugin allows to do that, https://videoswitch.ru/forum/index.php?topic=351.msg3237#msg3237