FAQ  •  Register  •  Login

Philips PFL8605 (ts or mkv url video streaming)

<<

Genu29

Serviio newbie

Posts: 2

Joined: Tue Nov 01, 2016 10:03 am

Post Sat Nov 05, 2016 4:36 pm

Philips PFL8605 (ts or mkv url video streaming)

Hello team, I am trying to use Serviio to provide a video stream to my Philips PFL8605; the url is a .ts or mkv, and video file is H264 with AAC. I tried to modify profiles.xml on Philips 2010- but I am not able to get it working. However same url is working with a F6500 Samsung. I modified profile name="Philips (2010-)" adding:
</Video>
<Video targetContainer="mp4" vCodec="h264" >
<Matches container="mpegts" vCodec="h264" />
<Matches container="matroska" vCodec="h264" />
</Video>
under Transcoding tab.
May you please suggest what I can do to address issue with right solution ? Many thanks
GB
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Nov 10, 2016 8:53 am

Re: Philips PFL8605 (ts or mkv url video streaming)

mp4 is not a valid targetContainer. try this:

  Code:
<Video targetContainer="mpeg" vCodec="mpeg2video" >
<<

gastuser1

Serviio newbie

Posts: 1

Joined: Wed Apr 05, 2017 6:51 pm

Post Wed Apr 05, 2017 7:53 pm

Re: Philips PFL8605 (ts or mkv url video streaming)

Hallo Genu29,

I've the same TV as you. In parallel I've a Panasonic HDD Recorder. This Recorder is much better for DLNA support regarding the diffrent formats. This TV is here a little bit Horror :D. Nevertheless I tried to find a way to increase the support for the different video Containers (My wife is the usage of the Panasonic for this functionallity to complex...). Now, after some fitghing I got the breakthrough (I'm a beginner for Linux).
The Approach was to get video films working with "äöü...", blanks in the filenames and files with a framerate of 50FPS (not supported by the TV)
My Serviio installation is no a a DS716+, Serviio 1.8.

First I put the DS716 to UTF-8 to work with the Umlauts (Google was here my friend). This was very helpful:
(http://www.synology-forum.de/showthread ... -auf-UTF-8)

I tried everything with the "Philips Profil 2009". Some files were working directly. But most of them with transcoding.
Then, additionally I found out that the files with the blanks were not running with FFMPEG for transcoding and therefore not entered into the libary of Serviio. After a couple of hours and checking this forum and the Internet the following idea was born.

Build of a "own wrapper script + adapted profil". And finally, Yes this works fine for me.

Profil Information:
  Code:
<!-- ########################################################################################################################### -->

   <Profile id="20Syn" name="Philips 46PFL8605K02 Synology" extendsProfileId="1">
   <!-- <Profile id="20Syn" name="Philips 46PFL8605K02 Synology" extendsProfileId="plps2010">  -->

      <Detection>
         <HttpHeaders>
            <X-AV-Client-Info>.*Philips TV*</X-AV-Client-Info>
         </HttpHeaders>

      </Detection>
         
      <Transcoding>
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="99999" targetACodec="ac3" aBitrate="999" forceInheritance="true">

            <!-- Matches Panasonic G70  -->
            <Matches container="mp4" vCodec="h264" profile="high" />            
            <!-- Matches .mov from Canon-Camera  -->
            <Matches container="mp4" vCodec="h264" profile="c_baseline"  />
            <!-- others 264  -->
            <Matches container="mp4" vCodec="h264" profile="baseline"  />
            <Matches container="mp4" vCodec="h264" profile="main"  />
            <Matches container="mp4" vFourCC="avc1" />
            
            <!-- Catch any remaining unsupported video codecs -->
                     <Matches container="avi" vFourCC="div3,div4,div5,divx,dm4v,dx50,xvid,avc1" />
         </Video>

         <Video targetContainer="mpeg" targetACodec="ac3" targetVCodec="mpeg2video">
            <Matches container="ogg" />
         </Video>
         
         <!-- if audio is DTS, audio must be transcoded -->
         <Video targetContainer="mpegts" targetACodec="ac3">
            <Matches container="*" aCodec="dca" />
            <Matches container="*" aCodec="dts-hd" />   
         </Video>

         <Video targetContainer="mpeg" targetACodec="ac3" targetVCodec="mpeg2video" DAR="16:9">
            <Matches container="matroska" />
            <Matches container="mpegts" />       
            <Matches container="mpegvideo" />
            <Matches container="asf" />
            <Matches container="ogg" />
            <Matches container="flv" />
            <Matches container="rm" />
            <!-- if audio different to ac3, must be transcoded -->
            <Matches container="mpeg" aCodec="aac" />
            <Matches container="mpeg" aCodec="mp3" />
            <Matches container="mpeg" aCodec="dca" />
            <Matches container="mpeg" aCodec="dts-hd" />   
         </Video>

      </Transcoding>
      
      <AudioTrackRemux>
         <Video targetContainer="mpeg" targetVCodec="mpeg2video"  targetACodec="ac3" DAR="16:9">
            <Matches container="*" vCodec="h264" />
            <Matches container="*" vCodec="mpeg2video" />
            <Matches container="*" vCodec="mpeg1video" />
            <Matches container="*" vCodec="mpeg4" />
            <Matches container="*" vCodec="msmpeg4" />
            <Matches container="*" vCodec="vc1" />      
         </Video>      

      </AudioTrackRemux>
   </Profile>

<!-- ########################################################################################################################### -->
 


In the profil I use: maxVBitrate="99999" aBitrate="999" as special indikator to react on. As example FPS correction.

My own wrapper-script then changes the parameters for the FFMPEG call in the command-line given by Serviio. One point is the adaptation of the input filename. The filename is put into " ' " that "blanks" are ok, the FPS rate is adapted if it is 50fps and the bitrate for the video transcoding is set to a value which makes the transcoding on the DS716II+ possible to view on the TV without nearly any jiggle (just at the beginning).

  Code:
 #!/bin/sh

blank="   ."

FFMPEG_BIN="ffmpeg"
FOLDER="`dirname $0`"
COMMANDLINE=$@
NEW_COMMANDLINE=$@
#NEW_COMMANDLINE="-i /volume1/video/TeastÄ  2016-04-03 11-35.mp4"

datum=`date +%Y-%m-%d-%H-%M`
LogFile='/volume1/@appstore/Serviio/bin/ffmpegWrapper.log'

LogEcho=$datum

#-----------------------------------------------------------------
#  Identifier for video files (array with 'endmarker' as last item!!)
#  Attention:  Extension with 1 blank afterwards is required !!!!
#-----------------------------------------------------------------
Filenamen=(".mov " ".mp4 " ".flv " ".wmv " ".gp3"  ".mpg " ".mpeg "
            ".mkv " ".avi " ".ogg "  ".mp3 "  ".rm " ".asf "
            ".jpg " ".raw " ".mpc " ".ape " ".flac " ".wav " ".dsf "
            ".lpcm " ".xvid "  ".vob "   
      "endmarker")

#-----------------------------------------------------------------
#  Identifier out of the Profile for the TV"
#  maxVBitrate="99999"  + targetACodec="ac3" aBitrate="999"
#-----------------------------------------------------------------

SuchString1="-b:v 99999k -maxrate:v 99999k -bufsize:v 99999k"
# for the same bitrate as input file
#Ersetzen1="-qscale:v 1"
#set special bitrate : this one works with ds716+
Ersetzen1="-b:v 15000k -maxrate:v 15000k -bufsize:v 15000k"

#Bitrate for Audio
SuchString2="-b:a:0 999k"
Ersetzen2="-b:a:0 388k"

#Framerate adaptation
SuchString3="-r 50"
#If the tv does not support a fps of 50
Ersetzen3="-r 49"

# Adaptation for filenames with 'blanks"
SuchString4="-i /"
Ersetzen4="-i '/"

   # Check Log-File size
   #----------------------------------------------
   typeset -i maxKB
   typeset -i FileGroesse

   maxKB=200*1024
   
   if [ ! -f "$LogFile" ]; then
      dummy="Dummyanwesiung"
   else
      echo Hallo $FileGroesse

      FileGroesse=$(stat -c %s "$LogFile")
      if [ $FileGroesse -gt $maxKB ]; then
         LogFile2=${LogFile/".log"/"1.log"}
         cp -f "$LogFile" "$LogFile2"
         rm -f "$LogFile"
      fi
   fi

#echo $FileGroesse $maxKB
#exit


   # Codec values adaptation
   #--------------------------------------------------------
   if [[ $NEW_COMMANDLINE =~ $SuchString1 ]]; then
      
      LogEcho="${LogEcho}String 1 gefunden:$SuchString1"
      #echo {String 1 gefunden !! \n$SuchString1}    >> $LogFile

      if [[ $NEW_COMMANDLINE =~ $SuchString2 ]]; then
         LogEcho="${LogEcho}-String 2 gefunden:$SuchString2"
         #echo {String 2 gefunden !! \n$SuchString2}    >> $LogFile         
         

         # Setzen der Standardwerte für die Video-Bitrate und Audio-Bitrate
         #---------------------------------------------------------------------
         NEW_COMMANDLINE=${NEW_COMMANDLINE/"$SuchString1"/"$Ersetzen1"}
         NEW_COMMANDLINE=${NEW_COMMANDLINE/"$SuchString2"/"$Ersetzen2"}
         
         # Bildwiederholfrequenz anpassen auf XX fps
         #---------------------------------------------------------------------
         
         if [[ $NEW_COMMANDLINE =~ $SuchString3 ]]; then
            NEW_COMMANDLINE=${NEW_COMMANDLINE/"$SuchString3"/"$Ersetzen3"}
            LogEcho="${LogEcho}-FPS angepasst:$Ersetzen3"

         fi
      fi      
   fi

         echo $LogEcho  >> $LogFile         

      #---------------------------------------------------------------------
      # Input filename quotes-start
      #---------------------------------------------------------------------
         
         if [[ $NEW_COMMANDLINE =~ $SuchString4 ]]; then
            
            LogEcho="FileInput -i: found"
            #echo {String 4 gefunden !! \n$SuchString4}    >> $LogFile

            #norming to lower case, for case detection of Array
            #---------------------------------------------------
            tmpString=$NEW_COMMANDLINE
            declare -l tmpString
            tmpString=$tmpString$blank
            
                          # need for using the array values including blanks
            IFS=""
            
            for value in ${Filenamen[*]}
            do
               if [[ $tmpString =~ $value ]]; then
               laenge="${#value}"
               
               # gets the position of the found file extension
               #------------------------------------------------
               x="${tmpString%%$value*}"
               [[ "$x" = "$1" ]] && pos=0 || pos="${#x}"
               
               # extracts the origin file-extension from the command-line (kind of mid$)
               #------------------------------------------------
               suchstring_org="${NEW_COMMANDLINE:$pos:$laenge-1}"
               
               # end-quote implementation
               #------------------------------------------------
               NEW_COMMANDLINE=${NEW_COMMANDLINE/"$suchstring_org"/"$suchstring_org"\'}
               # start-quote implementation
               #------------------------------------------------
               NEW_COMMANDLINE=${NEW_COMMANDLINE/"$SuchString4"/"$Ersetzen4"}
                  
               break
                fi
            done   
         fi

         LogEcho="${LogEcho}-Fileanalyse done: $value Position: $pos Laenge: $laenge OrgString: $suchstring_org"

         
   if [[ "endmarker" =~ $value ]]; then
      echo $datum Fehlerhafte Datei >> $LogFile
   fi

   echo "$LogEcho"  >> $LogFile
   echo AlteVersion: {"$COMMANDLINE"} >> $LogFile
   echo NeueVersion: {"$NEW_COMMANDLINE"}  >> $LogFile


# echo NeueVersion: $NEW_COMMANDLINE
# exit 0


   #-----------------------------------------------------------------
   #need to use eval here otherwise the quotes aren't handled properly
   #http://fvue.nl/wiki/Bash:_Why_use_eval_with_variable_expansion%3F

   # closing old transcoding Threads
   killall ffmpeg64

   # start transcoding
   eval ${FOLDER}/${FFMPEG_BIN} $NEW_COMMANDLINE

   #return FFmpeg status
   exit $?


This wrapper, I put into the folder of the ffmpeg file (/...program-path/bin) and I set the execution flag.

In the serviio.sh script I adapted the Java-calling with the following: -Dffmpeg.location=$SERVIIO_HOME/bin/'own wrapper name' -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8"

Now it's really nice running and my wife is totally pleased with the solution :lol:
I hope this could help you for your TV (if you've still this open question)..

Known BUG:
    * Still no identification of the Philips TV in the Status Screen "NMR" --> Looks like the response of the DLNA-Request
    * Only one Video could be played at the same time, wrapper-script is killing all running ffmpeg processes during call

I like the Server very much :D . I tried before "Twonky" and it was (for me) not possible to get the transcoding running and UMS was not running fine on the DS716II+. Personal the Serviio adaptation was more understandable and logic for me (Kind of old school basic programming).
Please, if there are hints for optimisation post them to me :mrgreen:


Do you have any idea if it is possible to view video and pictures on one folder at the same time (like a vacation folder including pictures and videos as presentation for "visitors") ?

Cheers
OS

( I hope this post is understandable, I'm from Germany and I think it's a little typical GermanEnglish :roll: )

Return to Philips

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.