{"action":"created","issue":{"url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/164","repository_url":"https://api.github.com/repos/masmu/pulseaudio-dlna","labels_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/164/comments","events_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/164/events","html_url":"https://github.com/masmu/pulseaudio-dlna/issues/164","id":132410558,"number":164,"title":"Switching to ffmpeg","user":{"login":"masmu","id":7857307,"avatar_url":"https://avatars.githubusercontent.com/u/7857307?v=3","gravatar_id":"","url":"https://api.github.com/users/masmu","html_url":"https://github.com/masmu","followers_url":"https://api.github.com/users/masmu/followers","following_url":"https://api.github.com/users/masmu/following{/other_user}","gists_url":"https://api.github.com/users/masmu/gists{/gist_id}","starred_url":"https://api.github.com/users/masmu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masmu/subscriptions","organizations_url":"https://api.github.com/users/masmu/orgs","repos_url":"https://api.github.com/users/masmu/repos","events_url":"https://api.github.com/users/masmu/events{/privacy}","received_events_url":"https://api.github.com/users/masmu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-02-09T12:44:45Z","updated_at":"2016-02-29T11:14:49Z","closed_at":null,"body":"@klaernie , @leonhandreke , @cygn, @super7ramp, @yegorius, @Takkat-Nebuk, @hlchau, @tgurr and all the others.\r\n\r\nI recently encountered an issue where _Kodi_ was not able to play _flac_ streams. After investigating this I found out that this was because of a missing stream header which most encoders write at the beginning of an encoding process. That bug is solved, but it demonstrated again that those headers are not mandatory for many devices, although quite a lot are able to do their work without them.\r\n\r\nAll the encoders do write this header besides _lame_, since it does this *after* the whole encoding process is finished. You know for streams this is a problem. So, _lame_ never writes that header and when looking back it is impressive that many devices are able to receive _mp3_ streams from _pulseaudio-dlna_.\r\nSince _lame_ is the most important encoder for this project (mainly because of the popularity of _mp3_) I looked for several alternatives and found one in _ffmpeg_.\r\nI created a [branch](https://github.com/masmu/pulseaudio-dlna/tree/feature/ffmpeg-backend) where I replaced all the used encoders with _ffmpeg_ and verified that _ffmpeg_'s _mp3_ encoder is writing that header.\r\n\r\nI also tested all existing encoders and noticed that _faac_'s pipe support is some how broken and therefore unuseable in _wily_. But _ffmpeg_'s _aac_ encoder is working fine despite marked as experimental.\r\n\r\nIn general I am very pleased with the overall performance of _ffmpeg_. All their encoders work fast and reliable, that's why I am thinking of switching completely to _ffmpeg_.\r\n\r\nPro:\r\n- _mp3_ streams will have a correct stream header, which hopefully leads to more compatibility\r\n\r\n- _aac_ works\r\n\r\n- less dependencies (no more: _vorbis-tools_, _sox_, _lame_, _flac_, _faac_, _opus-tools_)\r\n\r\n- better code maintenance, since you do not have to deal with several different CLI options anymore\r\n\r\nContra:\r\n- _ffmpeg_ is missing in _trusty_, no idea what’s the situation in other distributions\r\n\r\n- all the stuff which can go wrong when replacing your core dependencies\r\n\r\nSo, what do you think?"},"comment":{"url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/comments/190159982","html_url":"https://github.com/masmu/pulseaudio-dlna/issues/164#issuecomment-190159982","issue_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/164","id":190159982,"user":{"login":"Cygn","id":10025650,"avatar_url":"https://avatars.githubusercontent.com/u/10025650?v=3","gravatar_id":"","url":"https://api.github.com/users/Cygn","html_url":"https://github.com/Cygn","followers_url":"https://api.github.com/users/Cygn/followers","following_url":"https://api.github.com/users/Cygn/following{/other_user}","gists_url":"https://api.github.com/users/Cygn/gists{/gist_id}","starred_url":"https://api.github.com/users/Cygn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cygn/subscriptions","organizations_url":"https://api.github.com/users/Cygn/orgs","repos_url":"https://api.github.com/users/Cygn/repos","events_url":"https://api.github.com/users/Cygn/events{/privacy}","received_events_url":"https://api.github.com/users/Cygn/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T11:14:49Z","updated_at":"2016-02-29T11:14:49Z","body":"@muammar may I suggest a similar packaging scheme that I use in Fedora (where ffmpeg is out of bounds unfortunately)\r\nI've put sox as the only requirement to pulseaudio-dlna, and its perfectly functional that way with wav (which also works best in most cases if I've gathered correctly). pa-dlna detects other codecs at runtime so they will be available if user have these installed. So I've added them to rpm description as optional and call it a day."}}