Page 1 of 1

After upgrading to 6, can't play video on web anymore

PostPosted: Thu Oct 27, 2016 10:26 pm
by ultranol
Problem Description: Trying to play video on a browser won't work after upgrading to 6. As soon as I click on the link of a video, and the player starts, on Firefox and Chrome a blank cover shows up with an URL like this: http://localserver:4040/hls/hls.m3u8?id ... tRate=3000 - on Safari there are three dots that keep blinking and the video is never played.
Troubleshooting Steps: I looked over the transcoding options and I'm using the recommended mp3 audio and streaming definitions.
Playback Application and version: Chrome 55, Firefox 42, Safari 10.0.1
Subsonic Version: 6.0 (build a7857c) – April 30, 2016
Server Version: jetty-6.1.x, java 1.8.0_91, Linux (80.6 MB / 135.0 MB)
Hardware Platform: Ubuntu 16.04
Java Memory Limit: not sure
Problem Filename: all videos produced by my security camera. They are of the MKV format. Other MKV files that I have play fine but these definitely played fine as well. The upgrade was the only thing that changed since then.
Output from ffmpeg -i:

Code: Select all
ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311
  configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/i386-linux-gnu --incdir=/usr/include/i386-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --disable-i686
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Invalid UE golomb code
    Last message repeated 2 times
Input #0, mpeg, from '20161027_155901_M.mkv':
  Duration: 00:05:01.14, start: 74560.451478, bitrate: 631 kb/s
    Stream #0:0[0x1e0]: Video: h264 (Baseline), yuv420p, 1280x720, 90k tbr, 90k tbn
At least one output file must be specified


Last ten log file lines:
Code: Select all
[10/27/16 5:50:29 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -r 1 -ss 29 -t 1 -i /home/username/Videos/sec-cam/20160404/20160404_073202_S.mkv -s 1067x600 -v 0 -f mjpeg -
[10/27/16 5:50:29 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -ss 0 -t 10 -i /home/username/Videos/sec-cam/20160404/20160404_073202_S.mkv -s 640x360 -v 0 -b:v 1000k -maxrate 1000k -bufsize 256k -flags -global_header -map 0:0 -map 0:1 -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 0 -copyts -
[10/27/16 5:50:32 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -r 1 -ss 29 -t 1 -i /home/username/Videos/sec-cam/20160404/20160404_073202_S.mkv -s 107x60 -v 0 -f mjpeg -
[10/27/16 5:51:56 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -r 1 -ss 29 -t 1 -i /home/username/Videos/sec-cam/20160928/20160928_001911_S.mkv -s 1067x600 -v 0 -f mjpeg -
[10/27/16 5:51:56 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -ss 0 -t 10 -i /home/username/Videos/sec-cam/20160928/20160928_001911_S.mkv -s 640x360 -v 0 -b:v 1000k -maxrate 1000k -bufsize 256k -flags -global_header -map 0:0 -map 0:1 -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 0 -copyts -
[10/27/16 5:51:56 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -r 1 -ss 29 -t 1 -i /home/username/Videos/sec-cam/20160928/20160928_001911_S.mkv -s 107x60 -v 0 -f mjpeg -
[10/27/16 5:52:22 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -r 1 -ss 29 -t 1 -i /home/username/Videos/sec-cam/20160727/20160727_000715_M.mkv -s 1067x600 -v 0 -f mjpeg -
[10/27/16 5:52:22 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -ss 0 -t 10 -i /home/username/Videos/sec-cam/20160727/20160727_000715_M.mkv -s 640x360 -v 0 -b:v 1000k -maxrate 1000k -bufsize 256k -flags -global_header -map 0:0 -map 0:1 -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 0 -copyts -
[10/27/16 5:52:25 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -r 1 -ss 29 -t 1 -i /home/username/Videos/sec-cam/20160727/20160727_000715_M.mkv -s 107x60 -v 0 -f mjpeg -
[10/27/16 6:23:45 PM EDT]   INFO   TranscodeInputStream   Starting transcoder: /var/subsonic/transcode/ffmpeg -ss 0 -t 10 -i /home/username/Videos/sec-cam/20161027/20161027_012225_M.mkv -s 640x360 -v 0 -b:v 1000k -maxrate 1000k -bufsize 256k -flags -global_header -map 0:0 -map 0:1 -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 0 -copyts -

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Fri Oct 28, 2016 11:34 am
by toolman
Hi,
Searching Google for "Invalid UE golomb code", it seems that this is a bug in ffmpeg.
Perhaps it makes sense to download another version ( http://www.ffmpeg.org/download.html) and replace it in the "Transcode" folder?

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Fri Oct 28, 2016 5:15 pm
by ultranol
I've installed the latest ffmpeg (the version distributed for Ubuntu is 2.8.8 and I've followed the compilation instructions to get the latest one from the 3.0 version):

Code: Select all
username@username:~/Videos/sec-cam/20161027$ ffmpeg -i 20161027_08
20161027_080045_M.mkv  20161027_080610_M.mkv  20161027_081254_M.mkv 
username@username:~/Videos/sec-cam/20161027$ ffmpeg -i 20161027_081254_M.mkv
ffmpeg version N-82145-g0779396 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
  configuration: --prefix=/home/username/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/username/ffmpeg_build/include --extra-ldflags=-L/home/username/ffmpeg_build/lib --bindir=/home/username/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, mpeg, from '20161027_081254_M.mkv':
  Duration: 00:05:01.73, start: 46469.618478, bitrate: 497 kb/s
    Stream #0:0[0x1e0]: Video: h264 (Baseline), yuv420p(progressive), 1280x720, 90k tbr, 90k tbn
At least one output file must be specified
username@username:~/Videos/sec-cam/20161027$


You can see the previous error is gone.

I have renamed the ffmpeg on /var/subsonic/transcode/ to something else and placed the new one there. Restarted subsonic. Unfortunately, nothing changed, the error persists.

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Fri Oct 28, 2016 5:32 pm
by toolman
Another suggestion:
Download the previous version of Subsonic and use the ffmpeg-prgram included in that realease.
Or is there a possibility to have your securitycam encode the video in another container like mpeg or mpg?

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Fri Oct 28, 2016 8:06 pm
by ultranol
Nothing... I downloaded the package from Sourceforge and the version is yet different than both the one I had when I realized the problem and the one I compiled earlier.

Other than the extension, I don't know how to figure out how my security camera-generated files are encoded...

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Oct 29, 2016 11:47 am
by toolman

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Nov 05, 2016 2:59 am
by ultranol
Yeah, nothing... I replaced the recommended HLS setting:

ffmpeg -ss %o -t %d -i %s -s %wx%h -v 0 -b:v %bk -maxrate %bk -bufsize 256k -flags -global_header -map 0:0 -map 0:%k -ac 2 -f mpegts -c:v libx264 -preset superfast -c:a aac -b:a 96k -strict -2 -threads 0 -copyts -

with the one on the link, switching the input file to %s:

ffmpeg -ss 0 -i %s -filter:v scale=640:480 -b:v 21504 -t 5

Nothing changes, same problem.

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Nov 05, 2016 11:53 am
by toolman
Can you play the MKV-files with a program like VLC or any other mediaplayer?
You could try to re-install the previous version of subsonic to test if that solves the issue.
Since you say that the problem is only with the MKV-files from your security cam it seems to me that there might be an incompatibility in the way the MKV-files are generated.

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Nov 05, 2016 2:14 pm
by ultranol
It works when I completely remove everything and install 5.3 from scratch. By the way, I found some other MKVs, not from my camera, that can't be played as well, for some reason.

Sucks that I will have to forfeit all the most played/ratings info since I'm starting from scratch... do you know any way to import it?

Thanks for the help.

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Nov 05, 2016 4:56 pm
by toolman
I don't know for sure where all this information is stored but if you still have following folders from your previous installation you might be able to restore it:
DB-folder , db.backup, jetty, Lastfmcache , lucene2. thumbs, and the properties-file.
These folders should all be in your Subsonic-folder.
Sorry I can't be of more help.

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Nov 05, 2016 7:46 pm
by ultranol
Mystery solved.

I realized the transcode settings on the 5.3 is different... it comes out from the box like this apparently. There are commands for other types of files, not only "mp3 audio". For example, there's one for "mkv video" which is:

ffmpeg -ss %o -i %s -c:v libx264 -preset superfast -b:v %bk -c:a libvorbis -f matroska -threads 0 -

I simply added this to the 6.0 installation and it worked.

Thank you again!

Re: After upgrading to 6, can't play video on web anymore

PostPosted: Sat Nov 05, 2016 8:15 pm
by toolman
Great to know that it works now. Thank you for solving the mystery :D and for sharing.