# Ace Stream Player source code и бинарные билды

**URL:** <https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507>\
**Category:** Released\
**Created:** [09.Июнь.2019 20:49:40 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507 "2019-06-09T20:49:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [09.Июнь.2019 20:49:40 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/1 "2019-06-09T20:49:40Z")

</div>

Решил покопаться в исходном коде Acestream плеера.

> **[Ace Stream Player / Open Source (EN)](http://oldforum.acestream.media/index.php?topic=2970.0)**
>
> Ace Stream Player / Open Source (EN)

Вот что из этого получилось:

> **Spoiler**
>
> [https://b9.icdn.ru/j/jcryton/9/64309749PrO.jpg](https://b9.icdn.ru/j/jcryton/9/64309749PrO.jpg)
> 
> [https://b9.icdn.ru/j/jcryton/0/64309750eSw.jpg](https://b9.icdn.ru/j/jcryton/0/64309750eSw.jpg)
> 
> [https://b9.icdn.ru/j/jcryton/1/64309751kCt.jpg](https://b9.icdn.ru/j/jcryton/1/64309751kCt.jpg)
> 
> вывод плера при запуске из консоли:
> 
> [https://b9.icdn.ru/j/jcryton/2/64309752YaH.jpg](https://b9.icdn.ru/j/jcryton/2/64309752YaH.jpg)
> 
> [https://b9.icdn.ru/j/jcryton/3/64309753WzK.jpg](https://b9.icdn.ru/j/jcryton/3/64309753WzK.jpg)

Сейчас у себя пользуюсь версий основанной на VLC-2.2-git (v2.2.8 от 2018-07-24)  
Преймущество версии на более новом vlc очевидны.  
Эот возможность линковки как с ffmpeg-2 так и с ffmpeg-3, а также  
использование актуальной libgcrypt.so.20.

Пару слов об исходном коде на [Bitbucket](https://bitbucket.org/AceStream/acestreamplayer)

Если использовать последнюю версию патчей (последний коммит), то  
при сборке версий 2.1.5 2.1.6 наблюдается баг:  
После запуска плеера, при попытке скормить ему acestreamID или открытии плейлиста - плеер крашиться с ошибкой ‘std::bad\_alloc’.  
Природа этой ошибки точно подмечена здесь [c++ - regarding: instance of 'std::bad\_alloc' - Stack Overflow](https://stackoverflow.com/questions/32666285/regarding-instance-of-stdbad-alloc)  
Полность убирает эту ошибку откат на 4 коммита назад:

git clone [Bitbucket](https://bitbucket.org/AceStream/acestreamplayer.git)  
git checkout efae1b2c7383b202dc48a992d191119651be2414  
или HEAD~4

После этого отката полученные патчи, можно наложить на версии 2.1.5 и 2.1.6  
И все три версии: 2.1.4 2.1.5 2.1.6 начинают работать одинаково стабильно.

Но версии vlc-2.1.x имеют зависимости от старых библиотек ffmpeg и libgcrypt, поэтому  
версии 2.2.x будут куда поинтересней.  
Последняя версия VLC-2.2-git v2.2.8 от 2018-07-24 весьма еще актуальна.  
Взяв патчи от коммита efae1b2c7383b202dc48a992d191119651be2414 - я переработал их для версии VLC-2.2  
Дополнительно добавил патчи для VLC от gentoo.

Полученные исходные коды можно взять здесь:

> **[GitHub - Jcryton/acestreamplayer-2.1: Player for watching p2p TV over...](https://github.com/Jcryton/acestreamplayer-2.1)**
>
> Player for watching p2p TV over acestream protocol - GitHub - Jcryton/acestreamplayer-2.1: Player for watching p2p TV over acestream protocol

> **[GitHub - Jcryton/acestreamplayer-2.2: Player for watching p2p TV over...](https://github.com/Jcryton/acestreamplayer-2.2)**
>
> Player for watching p2p TV over acestream protocol - GitHub - Jcryton/acestreamplayer-2.2: Player for watching p2p TV over acestream protocol

Готовые бинарные пакеты здесь:  
[https://github.com/Jcryton/acestreamplayer-2.1](https://github.com/Jcryton/acestreamplayer-2.1/releases)  
[https://github.com/Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases)

Версии 2.2.4-2.2.7 при сборке слинкованы с ffmpeg 2.8.10  
Версия 2.2.8 и v2.2.8-git от 2018-07-24 при сборке слинкованы с ffmpeg 2.8.10 и с ffmpeg 3.3 на выбор  
Нужную версию можно выбрать в разделе Release.

Так как я использую gentoo - deb пакеты делать не стал.  
При желании вы можете их сделать из бинарных билдов используя зависимости взятые от ебилдов gentoo.

> **[vlc-2.2.8.ebuild « vlc « media-video - repo/gentoo.git - Official Gentoo...](https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/vlc/vlc-2.2.8.ebuild?id=df3878d5f0c142965f05030c8e57ee4711b474d6)**
>
> Browse the Gentoo Git repositories

Пользуйтесь на здоровье.

---

<div class="post-metadata">

**Author:** ![Benny](https://forum.acestream.media/letter_avatar_proxy/v4/letter/b/49beb7/32.png) [@Benny](https://forum.acestream.media/u/Benny)\
**Post date:** [09.Июнь.2019 22:10:08 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/2 "2019-06-09T22:10:08Z")

</div>

j.cryton,  
спасибо за проделанную работу.

Есть пару вопросов, а именно:

- закрывает ли эта сборка баг, описанный в [(падения при навигации по плейлисту Вперёд-Назад)](http://oldforum.acestream.media/index.php?topic=12094.msg26296#msg26296)?
- поддерживается ли H265/HEVC кодек (HDR вроде как только с 3 версии сами VLC-тим поддерживают)?
- нет ли желания “заодно” собрать и под винду бинарник?

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [11.Июнь.2019 01:45:52 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/3 "2019-06-11T01:45:52Z")

</div>

Да, поддержка H.265/HEVC в ffmpeg 2.8.10 и в vlc v2.2.4-v2.2.8 есть.  
Соответственно в Acestrem Player v2.2.4 - v2.2.8 тоже есть.  
[https://trac.ffmpeg.org/wiki/Encode/H.265](https://trac.ffmpeg.org/wiki/Encode/H.265)

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/3/64329793CpX.jpg](https://o9.icdn.ru/j/jcryton/3/64329793CpX.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/4/64329794PkO.jpg](https://o9.icdn.ru/j/jcryton/4/64329794PkO.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/5/64329795mEa.jpg](https://o9.icdn.ru/j/jcryton/5/64329795mEa.jpg)

В версии 2.1.4-2.1.6 и в ffmpeg 1.2.10 поддержки H.265/HEVC нет.

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/6/64329796zZw.jpg](https://o9.icdn.ru/j/jcryton/6/64329796zZw.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/7/64329797GiP.jpg](https://o9.icdn.ru/j/jcryton/7/64329797GiP.jpg)

Я бывает листаю каналы один за другим, стоп и плей не нажимаю при этом.  
Вылетов не происходило.  
Вчера попробовал добавить несколько музыкальных файлов в список воспроизведения и всплыл этот баг.

Баг профиксил. Исходники на гитхабе обновил.  
Билды без этого бага тут:

> **[Release AcestreamPlayer v2.2.8-rc2 · Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases/tag/v2.2.8-rc2)**
>
> This is p2p TV acestream player based on vlc-2.2.8 with Qt4.
> Ubuntu 18.04 LTS
> acestreamplayer-2.2.8-rc2\_bionic0\_amd64.deb
> Install:
> sudo apt-get install libqtwebkit4 gdebi
> sudo gdebi-gtk acestreampl...

  

> **[Release AcestreamPlayer v2.2.8.1-rc2 · Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases/tag/v2.2.8.1-rc2)**
>
> This is p2p TV acestream player based on VLC player with Qt4.
> Version: vlc-2.2.git ( v2.2.8 - 2018-07-24).
> Ubuntu 18.04 LTS
> acestreamplayer-2.2.8.1-rc2\_bionic0\_amd64.deb
> Install:
> sudo apt-get insta...

Сделать версию под windows в ближайшее время нет возможности.

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [11.Июнь.2019 12:55:24 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/4 "2019-06-11T12:55:24Z")

</div>

Природа этого бага оказалась очень простая.  
В input\_manager,cpp input\_manager,hpp были добавлены новые события и сигнылы для p2p.  
В vlc. в обработчике событий QEvent была отладочная функиция assert(0), которая реагировала на неопознанный сигнал.  
В vlc этих сигналов и событий нет - поэтому он не останавливался в отличие от acestream player.  
Aseert(0) ставят для отладки и обычно убирают макросом NDEBUG.  
[http://www.c-cpp.ru/content/assert](http://www.c-cpp.ru/content/assert)

Для acestream player отладочная функция Aseert(0) не нужна, событие отработается в другом месте,  
А отладочный аварийный останов из-за дополнительного сигнала совершенно не нужен.

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [14.Июнь.2019 15:39:56 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/5 "2019-06-14T15:39:56Z")

</div>

Сделал пакеты для Ubuntu 18.04 Bionic.

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/6/64366266jSf.jpg](https://o9.icdn.ru/j/jcryton/6/64366266jSf.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/9/64366349zXw.jpg](https://o9.icdn.ru/j/jcryton/9/64366349zXw.jpg)

UPD:

Добавил пакеты для последней версии Debian 9.9 Stretch

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/0/64377680qLf.jpg](https://o9.icdn.ru/j/jcryton/0/64377680qLf.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/1/64377681IlO.jpg](https://o9.icdn.ru/j/jcryton/1/64377681IlO.jpg)

Для запуска acestreamengine на Debian 9.9 Stretch нужно добавить две библиотеки libcrypto.so.1.0.0 и libssl.so.1.0.0 в /usr/lib/x86\_64-linux-gnu, а также установить пакет python-apsw. Для Ubuntu 18.04 потребуется только установка пакета python-apsw

Пакеты тут:

> **[Releases · Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases)**
>
> Player for watching p2p TV over acestream protocol - Jcryton/acestreamplayer-2.2

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [14.Июль.2019 10:34:20 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/6 "2019-07-14T10:34:20Z")

</div>

На основе мануала: [https://wiki.videolan.org/Win32Compile/](https://wiki.videolan.org/Win32Compile/) - сделал acestreamplayer версий 2.1.4 и 2.1.6 для windows.  
Хост - gentoo, гостевая система ubuntu.  
contrib компилировался вручную несколько часов.

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/6/64725366nEk.jpg](https://o9.icdn.ru/j/jcryton/6/64725366nEk.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/7/64725367ZuL.jpg](https://o9.icdn.ru/j/jcryton/7/64725367ZuL.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/8/64725368CsB.jpg](https://o9.icdn.ru/j/jcryton/8/64725368CsB.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/9/64725369aVf.jpg](https://o9.icdn.ru/j/jcryton/9/64725369aVf.jpg)
> 
> [https://b9.icdn.ru/j/jcryton/0/64725370fTh.jpg](https://b9.icdn.ru/j/jcryton/0/64725370fTh.jpg)

Запускаем, выбираем Direct3D в настройках: и пользуемся

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/1/64725371AeV.jpg](https://o9.icdn.ru/j/jcryton/1/64725371AeV.jpg)

Тестировал на windows 7 32-bit.

Скачать можно отсюда:

> **[Jcryton/acestreamplayer-2.1](https://github.com/Jcryton/acestreamplayer-2.1)**
>
> Player for watching p2p TV over acestream protocol - Jcryton/acestreamplayer-2.1

> **[Releases · Jcryton/acestreamplayer-2.1](https://github.com/Jcryton/acestreamplayer-2.1/releases)**
>
> Player for watching p2p TV over acestream protocol - Jcryton/acestreamplayer-2.1

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [20.Июль.2019 11:02:53 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/7 "2019-07-20T11:02:53Z")

</div>

Я кстати ошибался. Когда собирал contib - увидел наличие файлов для поддержки HEVC/H.265

> ****
>
> ![](https://forum.acestream.media/uploads/default/original/2X/9/94968c9fa02c2b94a8237f76a5972e789790305b.png)

После сборки плеера открыл файл в формате hevc. Все прекрасно работает.  
Так что в версиях 2.1.4 2.1.5 2.1.6 поддержка HEVC/H.265 есть.

> ****
>
> ![](https://forum.acestream.media/uploads/default/original/2X/d/d92e6c72690b09f621ae947ce69656f1b88a85d0.jpeg)
> 
> ![](https://forum.acestream.media/uploads/default/original/2X/e/eb04ce58c9ebddc7d7d0eaa5282f2ede4134ab4d.jpeg)

Сделал отдельный git для contib

> **[Jcryton/ace-contrib](https://github.com/Jcryton/ace-contrib/tree/master/2.1)**
>
> Contrib for AcestreamPlayer. Contribute to Jcryton/ace-contrib development by creating an account on GitHub.

Теперь сборка под windows сводится всего лишь к двум скриптам:  
./win32prepare.sh  
./win32build.sh

На выходе готовый архив с плеером для windows.

Подробнее тут:

> <https://github.com/Jcryton/acestreamplayer-2.1/blob/master/README.md>

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [24.Июль.2019 14:18:17 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/8 "2019-07-24T14:18:17Z")

</div>

Сделал версии 2.2.6, 2.2.8, 2.2.8.1 (vlc-2.2.git от 24-Jul-2018) для windows.

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/6/64822986PyU.jpg](https://o9.icdn.ru/j/jcryton/6/64822986PyU.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/8/64822988pEt.jpg](https://o9.icdn.ru/j/jcryton/8/64822988pEt.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/9/64829579StV.jpg](https://o9.icdn.ru/j/jcryton/9/64829579StV.jpg)
> 
> [https://o9.icdn.ru/j/jcryton/0/64829580GtN.jpg](https://o9.icdn.ru/j/jcryton/0/64829580GtN.jpg)
> 
> [https://b9.icdn.ru/j/jcryton/5/64822985pMf.jpg](https://b9.icdn.ru/j/jcryton/5/64822985pMf.jpg)

Поддержка Hevc естественно присутствует:

> **Spoiler**
>
> [https://o9.icdn.ru/j/jcryton/7/64822987yQp.jpg](https://o9.icdn.ru/j/jcryton/7/64822987yQp.jpg)
> 
> [https://b9.icdn.ru/j/jcryton/4/64822984GiE.jpg](https://b9.icdn.ru/j/jcryton/4/64822984GiE.jpg)

Готовые билды:

> **[Release AcestreamPlayer v2.2.6-win32-rc1 · Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases/tag/v2.2.6-win32-rc1)**
>
> This is windows version of p2p TV acestream player based on vlc-2.2.6 with Qt4.

  

> **[Release AcestreamPlayer v2.2.8-win32-rc1 · Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases/tag/v2.2.8-win32-rc1)**
>
> This is windows version of p2p TV acestream player based on vlc-2.2.8 with Qt4.

  

> **[Release AcestreamPlayer v2.2.8.1-win32-rc1 · Jcryton/acestreamplayer-2.2](https://github.com/Jcryton/acestreamplayer-2.2/releases/tag/v2.2.8.1-win32-rc1)**
>
> This is windows version of p2p TV acestream player based on VLC player with Qt4.
> Version: vlc-2.2.git ( v2.2.8 - 2018-07-24).

  
Просто распаковываем архив в удобном месте и запускаем плеер. Движок запуститься автоматически, (если он установлен). С версиями 2.1.4 и 2.1.6 - аналогично.

Собрать плеер можно самому запустив по очереди два скрипта, по аналогии с версиями 2.1.4 и 2.1.6.  
Более подробно тут:

> <https://github.com/Jcryton/acestreamplayer-2.2/blob/master/README.md>

Первоначально, когда делал версию под линукс, даже не думал что буду делать версию для windows.  
Ну раз попросили - сделал.  
Приятного просмотра.

---

<div class="post-metadata">

**Author:** ![Constantin](https://forum.acestream.media/user_avatar/forum.acestream.media/constantin/32/1995_2.png) [@Constantin](https://forum.acestream.media/u/Constantin)\
**Post date:** [26.Июль.2019 08:16:59 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/9 "2019-07-26T08:16:59Z")

</div>

j.cryton, Спасибо вам за инициативу и сделанную работу!

Помимо “Спасибо” мы хотели бы вам еще выразить свою благодарность материальным поощрением. 😉

Подробности, в личку…

---

<div class="post-metadata">

**Author:** ![j.cryton](https://forum.acestream.media/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@j.cryton](https://forum.acestream.media/u/j.cryton)\
**Post date:** [28.Июль.2019 23:59:56 UTC](https://forum.acestream.media/t/ace-stream-player-source-code-i-binarnye-bildy/3507/10 "2019-07-28T23:59:56Z")

</div>

Спасибо. Написал в ЛС.
