Hello,
first of all thanks for keeping ampache alive.
it works well on all my devices - both audio and video - my android
kitkat phone uses Dsub as a client.
the only problem i have is with certain video streams.
it seems to be a problem with ac3 audio.
on my android device, it (Dsub + MXPlayer) plays video but not
audio.
on my home machine (arch linux, iceweasel 42) it doesn't play at all
(Unsupported).
i can copy the affected videos to my phone's sd card, and they play
ok.
I thought it might help to transcode videos on the fly.
i tried all sorts of settings, but it looks like transcoding audio
only (e.g. flac => ogg) works ok, but transcoding video never
works.
i tried the transcode commands on the server (debian stable, i use
avconv) to a file, and i can play that file.
i tried the transcode commands on my desktop (archlinux, uses
ffmpeg) and i can even pipe the output to mpv.
this last option, however, only works for avi, and the resulting
video seems to be missing some metadata/headers.
the logs don't show any errors, avconv is getting busy on request
and stops again when i stop the video or close the client.
the error seems to occur elsewhere.
my thoughts:
it seems that some formats are not suitable for streaming, or at
least they work locally but not remotely. ac3 audio seems to be the
culprit.
do i have to choose a transcode format that will work over the web?
i think i tried all the presets in the config file.
the server is an old laptop, maybe it can't handle the processing. i
tried to transcode only the audio to mp3. this works manually and is
_much_ easier on resources, but doesn't influence the problem.
i spent days researching this, i think i did all the troubleshooting
and have all the information needed, but no solution.
any thoughts?
log excerpt on transcoding to avi, requested by Dsub on android
kitkat phone.
transcoding: video stream copy, audio from ac3 to mp3:
2015-12-22 15:01:43 [sub-andro] (media) -> Using default
target format
2015-12-22 15:01:43 [sub-andro] (media) -> Transcode settings:
from mkv to avi
2015-12-22 15:01:43 [sub-andro] (media) -> Command: avconv
Arguments: -i %FILE% -c:a libmp3lame -f avi -c:v copy pipe:1
2015-12-22 15:01:43 [sub-andro] (media) -> Changing play url
type from {mkv} to {avi} due to encoding settings...
2015-12-22 15:01:43 [sub-andro] (session) -> Session created:
96061698db6e38e7281d384abd37bcff
2015-12-22 15:01:43 [sub-andro] (subsonic) -> Stream proxy:
http://89.27.2.34:8888/play/ssid/96061698db6e38e7281d384abd37bcff/type/video/oid/1/uid/4/client/DSub/noscrobble/1/transcode_to/avi/player/api/name/Better%20Call%20Saul%20S01E06%20%20%20%20MRSK.avi
2015-12-22 15:01:43 [ampache] (play) -> Asked for type {video}
2015-12-22 15:01:43 [sub-andro] (session) ->
96061698db6e38e7281d384abd37bcff has been extended to Tue, 22 Dec
2015 17:01:43 +0200 extension length 7200
2015-12-22 15:01:43 [sub-andro] (User Ip) -> Login from ip
adress: 89.27.2.34
2015-12-22 15:01:43 [sub-andro] (play) -> Playing file
(/home/mus/media/video/Better.Call.Saul.S01.Season.1.Complete.720p.HDTV.x264-MRSK[cttv]/Better.Call.Saul.S01E06.720p.HDTV.X264-MRSK.mkv}...
2015-12-22 15:01:43 [sub-andro] (play) -> Media type {mkv}
2015-12-22 15:01:43 [sub-andro] (play) -> Custom play action {}
2015-12-22 15:01:43 [sub-andro] (play) -> Transcode to {avi}
2015-12-22 15:01:43 [sub-andro] (play) -> Transcoding due to
explicit request for avi
2015-12-22 15:01:43 [sub-andro] (stream.class.php) -> Starting
transcode for
{/home/mus/media/video/Better.Call.Saul.S01.Season.1.Complete.720p.HDTV.x264-MRSK[cttv]/Better.Call.Saul.S01E06.720p.HDTV.X264-MRSK.mkv}.
Type {avi}. Options: Array
2015-12-22 15:01:43 [sub-andro] (stream.class.php) -> (
2015-12-22 15:01:43 [sub-andro] (stream.class.php) -> )
2015-12-22 15:01:43 [sub-andro] (stream.class.php) -> }...
2015-12-22 15:01:43 [sub-andro] (media) -> Explicit format
request {avi}
2015-12-22 15:01:43 [sub-andro] (media) -> Transcode settings:
from mkv to avi
2015-12-22 15:01:43 [sub-andro] (media) -> Command: avconv
Arguments: -i %FILE% -c:a libmp3lame -f avi -c:v copy pipe:1
2015-12-22 15:01:43 [sub-andro] (stream) -> Configured bitrate
is 4096
2015-12-22 15:01:43 [sub-andro] (stream) -> Final transcode
bitrate is 4096
2015-12-22 15:01:43 [sub-andro] (stream) -> %SAMPLE% not in
transcode command
2015-12-22 15:01:43 [sub-andro] (stream) -> %BITRATE% not in
transcode command
2015-12-22 15:01:43 [sub-andro] (stream) -> %MAXBITRATE% not in
transcode command
2015-12-22 15:01:43 [sub-andro] (stream) -> %RESOLUTION% not in
transcode command
2015-12-22 15:01:43 [sub-andro] (stream) -> %QUALITY% not in
transcode command
2015-12-22 15:01:43 [sub-andro] (stream) -> Transcode command:
avconv -i
'/home/mus/media/video/Better.Call.Saul.S01.Season.1.Complete.720p.HDTV.x264-MRSK[cttv]/Better.Call.Saul.S01E06.720p.HDTV.X264-MRSK.mkv'
-c:a libmp3lame -f avi -c:v copy pipe:1
2015-12-22 15:01:43 [sub-andro] (stream) -> Transcode command
prefix: exec
2015-12-22 15:01:43 [sub-andro] (play) -> Starting stream of
/home/mus/media/video/Better.Call.Saul.S01.Season.1.Complete.720p.HDTV.x264-MRSK[cttv]/Better.Call.Saul.S01E06.720p.HDTV.X264-MRSK.mkv
with size 594232069
2015-12-22 15:01:43 [sub-andro] (play) -> Registering stream
stats for {Better Call Saul S01E06 MRSK}...
2015-12-22 15:01:43 [sub-andro] (user.class.php) -> Updating
stats for {video/1} {Mozilla/5.0 (Linux; Android 4.4.2; en-US; E39
Build/Acer_AV0K0_E39_1.024.00_EMEA_GEN1) MXPlayer/1.7.40}...
2015-12-22 15:01:43 [sub-andro] (user.class.php) -> Scrobbling
explicitly skipped