Page 1 of 1

Divx Web Player on MediaBrowser

PostPosted: Wed Aug 08, 2012 5:35 pm
by Digital God
First of all - thx for great product!

I've large collection of video files and they all are in mkv format (h264 and ac3). Due to the fact that for flowplayer serviio needs to transcode the video, i'm trying to implement DivX Web Player. It supports H.264 / AVC in mkv container, subtitles and change audio track on fly.
I've 2 problems to get it working:
1) need to write application profile with following config (i've never wrote a profile):
Container:.mkv
Video Codec: H.264 / AVC
Audio Codec: AAC

2) rewrite file extension .mkv to video/divx mime-type:
i tried setting
  Code:
<MediaFormatProfile mime-type="video/x-matroska">DIVX</MediaFormatProfile>

but get error Unknown media format DIVX

Finaly, i get DivX Web Player working with ServiiGo profile, but some files can not be played, and some have no sound.
Can someone help with writing correct profile?

Re: Divx Web Player on MediaBrowser

PostPosted: Thu Aug 09, 2012 6:40 pm
by Digital God
I've updated serviio-media-browser.jar to use DivX Web player if plugin is installed, but i still have problem with
  Code:
<MediaFormatProfile mime-type="video/x-matroska">DIVX</MediaFormatProfile>

Re: Divx Web Player on MediaBrowser

PostPosted: Thu Aug 09, 2012 7:34 pm
by zip
it's the other way around:

  Code:
<MediaFormatProfile mime-type="video/divx">MATROSKA</MediaFormatProfile>

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 4:52 am
by Digital God
Finaly, i get it working. But only with aac sound track.
How can i transcode only audio (all formats to aac) and leave video as is (or transcode to h264 codec in mkv container)?

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 9:56 am
by zip
you an't ranscode to mkv, only to mpegts (if you want to keep video unchouched) - will that work?

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 11:10 am
by Digital God
zip wrote:you an't ranscode to mkv, only to mpegts (if you want to keep video unchouched) - will that work?

I read ffmpeg docs and found that it is possible to transcode to mkv.

Serviio calls ffmpeg with this command
  Code:
C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -fflags +genpts -i H:\ServerFolders\Видео\Фильмы\2012\2012.2009.1080p.BluRay.Rus.Ukr.3xEng.HDCLUB.mkv -y -copyts -c:v copy -vbsf h264_mp4toannexb -c:a aac -strict experimental -b:a 192k -ac 6 -map 0:0 -map 0:1 -sn -f mpegts D:\Temp\Serviio\transcoding-temp-142-divxweb-ORIGINAL.stf


where -f mpegts is file format (targetcontainer). if i remove "-f mpegts" from command - it starts transcoding to mkv.

From ffmpeg manual:
-f Force input or output file format. The format is normally auto detected for input files and guessed from file extension for output files, so this option is not needed in most cases.

So, it is possible to transcode in mkv, just remove -f from command.

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 11:49 am
by zip
FFmpeg can do that, yes, but MKV is not format for on-the-fly transcoding - it writes some data at the end of the file, therefore the file would be playable only when the whole file is transcoded. with mpeg/mpegts you can start read as soon as there is some transcoded data.

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 12:24 pm
by Digital God
zip wrote:FFmpeg can do that, yes, but MKV is not format for on-the-fly transcoding - it writes some data at the end of the file, therefore the file would be playable only when the whole file is transcoded. with mpeg/mpegts you can start read as soon as there is some transcoded data.


maybe I do not understand something, but you're wrong. When i use command without "-f mpegts" - file is normally played.

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 12:40 pm
by zip
yes, but only when it finishes, not from the first second it starts transcoding - that's what Serviio needs, not to wait x minutes for the file to finish transcoding and then start playing

Re: Divx Web Player on MediaBrowser

PostPosted: Fri Aug 10, 2012 2:58 pm
by Digital God
zip wrote:yes, but only when it finishes, not from the first second it starts transcoding - that's what Serviio needs, not to wait x minutes for the file to finish transcoding and then start playing

no, i can start watching video even when it's not finished.

in cmd i run ffmpeg command and start video - it works. so, i think it could work with serviio