Page 1 of 1

[SOLVED] Change Transcode video Width x Height

PostPosted: Fri Jun 21, 2013 3:46 pm
by ResQue1980
How can i set the Height x Width of video when it is transcoded?

I tried the maxHeight in profile.xml but that didnt seem to do anything:
<Video targetContainer="asf" targetVCodec="wmv2" targetACodec="wmav2" maxVBitrate="15360" forceStereo="true" maxHeight="654" >


The reason i want to do this is because my xBox seems to be cutting off around 64px on the height and width of the picture, in the past i have fixed this issue by just lowering the transcode resolution and everything was perfect.

Re: Change Transcode video Width x Height

PostPosted: Sat Jun 22, 2013 9:39 am
by Illico
After profiles.xml do you restart the serviio service or reboot your PC ?

Re: Change Transcode video Width x Height

PostPosted: Sun Jun 23, 2013 2:23 am
by ResQue1980
I closed ServiioConsole.exe and then stopped the windows service "ServiioService" ("C:\Program Files\Serviio\bin\ServiioService.exe"). After starting them both back up the video was still in its original resolution.

Does anyone know what i am doing wrong here? Maybe there is another way to change the transcoded output resolution?

Re: Change Transcode video Width x Height

PostPosted: Sun Jun 23, 2013 9:52 am
by Illico
Perhaps maxHeight="654" optio n is only supported with targetVCodec="mpeg2video" and not wmv2, I don't know ?
Could you enable detailed logging and check the ffmpeg command line used to transcode your file ?

Re: Change Transcode video Width x Height

PostPosted: Mon Jun 24, 2013 10:04 pm
by ResQue1980
Thanks for the tip Illico, i really appreciate you taking the time to help. i did what you said and enabled the debug logs and checked the FFMPEG line. There is nothing in the command that is changing the resolution in the transcoded file. Is there a way i can pass my own custom commands to FFMPEG from Serviio? Or maybe there is another way to achieve a resolution change.

Here is the FFMPEG command that is getting executed by Serviio
  Code:
C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -threads auto -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -c:v wmv2 -b:v 15360k -maxrate:v 15360k -bufsize:v 15360k -vf subtitles=filename="D\\:/TEMP/Serviio/subtitles_107_3.ass":original_size=1280x720 -r 24000/1001 -g 15 -c:a wmav2 -b:a 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf D:\TEMP\Serviio\transcoding-temp-107-3-ORIGINAL-b36617ee6a6e5395f27e4cf616462909.stf



To save you guys some time i read through the log file and found all references to FFMPEG
  Code:
2013-06-24 22:42:32,090 DEBUG [FFMPEGWrapper] Invoking FFMPEG to extract subtitle file from: [Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv
2013-06-24 22:42:32,091 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -an -vn -map 0:3 -c:s copy -f ass D:\TEMP\Serviio\subtitles_107_3.ass


2013-06-24 22:42:35,960 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv
2013-06-24 22:42:35,961 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -threads auto -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -c:v wmv2 -b:v 15360k -maxrate:v 15360k -bufsize:v 15360k -vf subtitles=filename="D\\:/TEMP/Serviio/subtitles_107_3.ass":original_size=1280x720 -r 24000/1001 -g 15 -c:a wmav2 -b:a 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf D:\TEMP\Serviio\transcoding-temp-107-3-ORIGINAL-b36617ee6a6e5395f27e4cf616462909.stf


2013-06-24 22:42:38,634 DEBUG [FFMPEGWrapper] Invoking FFMPEG to extract subtitle file from: [Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv
2013-06-24 22:42:38,635 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -an -vn -map 0:3 -c:s copy -f ass D:\TEMP\Serviio\subtitles_107_3.ass
2013-06-24 22:42:38,646 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -an -vn -map 0:3 -c:s copy -f ass D:\TEMP\Serviio\subtitles_107_3.ass




Here is the important part of the log file:
  Code:
2013-06-24 22:42:32,076 DEBUG [ServiioHttpService] Incoming request from /192.168.0.5:54592: GET /resource/107/MEDIA_ITEM/WMVHIGH_FULL-0/ORIGINAL HTTP/1.1, headers = [User-Agent: Xenon,Connection: Keep-alive,Host: 192.168.0.3:8895]]
2013-06-24 22:42:32,076 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.0.5
2013-06-24 22:42:32,077 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.0.5
2013-06-24 22:42:32,077 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'Identifier=192.168.0.5, Profile=Xbox 360'
2013-06-24 22:42:32,078 DEBUG [ResourceDeliveryProcessor] Request for resource 107 and type 'MEDIA_ITEM' received
2013-06-24 22:42:32,078 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 107 (local)
2013-06-24 22:42:32,078 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 107)
2013-06-24 22:42:32,078 DEBUG [VideoDAOImpl] Reading a Video (id = 107)
2013-06-24 22:42:32,079 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 107, format WMVHIGH_FULL and profile Xbox 360
2013-06-24 22:42:32,079 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,080 DEBUG [SubtitlesService] Found embedded subtitle track: 3 (eng)
2013-06-24 22:42:32,080 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,081 DEBUG [SubtitlesService] Found embedded subtitle track: 3 (eng)
2013-06-24 22:42:32,081 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file [Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv
2013-06-24 22:42:32,081 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,082 DEBUG [SubtitlesService] Found embedded subtitle track: 3 (eng)
2013-06-24 22:42:32,082 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file [Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv: WMVHIGH_FULL
2013-06-24 22:42:32,083 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 107 (local)
2013-06-24 22:42:32,083 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 107)
2013-06-24 22:42:32,084 DEBUG [VideoDAOImpl] Reading a Video (id = 107)
2013-06-24 22:42:32,085 DEBUG [VideoDeliveryEngine] Delivering item '107' for client 'Identifier=192.168.0.5, Profile=Xbox 360'
2013-06-24 22:42:32,085 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,086 DEBUG [SubtitlesService] Found embedded subtitle track: 3 (eng)
2013-06-24 22:42:32,086 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,087 DEBUG [SubtitlesService] Found embedded subtitle track: 3 (eng)
2013-06-24 22:42:32,087 DEBUG [VideoDeliveryEngine] Delivering file '[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv' using transcoding
2013-06-24 22:42:32,087 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,088 DEBUG [SubtitlesService] Found embedded subtitle track: 3 (eng)
2013-06-24 22:42:32,089 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:32,090 DEBUG [FFMPEGWrapper] Invoking FFMPEG to extract subtitle file from: [Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv
2013-06-24 22:42:32,091 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -an -vn -map 0:3 -c:s copy -f ass D:\TEMP\Serviio\subtitles_107_3.ass
2013-06-24 22:42:35,957 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'Identifier=192.168.0.5, Profile=Xbox 360'
2013-06-24 22:42:35,958 DEBUG [MediaItemDAOImpl] Getting file of media item 107
2013-06-24 22:42:35,960 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv
2013-06-24 22:42:35,961 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -threads auto -i D:\Anime\The Sacred Blacksmith\[Grimorious]The Sacred Blacksmith - Vol.02[BD][720p][Uncensored]\[Grimorious]The Sacred Blacksmith - 04 - Oath Promise[BD][720p][Uncensored].mkv -y -c:v wmv2 -b:v 15360k -maxrate:v 15360k -bufsize:v 15360k -vf subtitles=filename="D\\:/TEMP/Serviio/subtitles_107_3.ass":original_size=1280x720 -r 24000/1001 -g 15 -c:a wmav2 -b:a 192k -ac 2 -map 0:0 -map 0:1 -sn -f asf D:\TEMP\Serviio\transcoding-temp-107-3-ORIGINAL-b36617ee6a6e5395f27e4cf616462909.stf




The complete log file can be found here:
http://tny.cz/018b7ad9

Re: Change Transcode video Width x Height

PostPosted: Mon Jun 24, 2013 11:29 pm
by zip
How does the profile you're using look now?

Re: Change Transcode video Width x Height

PostPosted: Mon Jun 24, 2013 11:55 pm
by ResQue1980
zip wrote:How does the profile you're using look now?


The most important line i edited looks as follows under the default "id="3" name="Xbox 360"" profile:
<Video targetContainer="asf" targetVCodec="wmv2" targetACodec="wmav2" maxVBitrate="15360" forceStereo="true" maxHeight="416">

note a also tried the values 420, 720, 656, and 356 for the maxHeight argument with no success. The debug log shows no sign of any argument being added to the ffmpeg command.


Here is the complete profiles.xml:
http://sdrv.ms/16vB99a

Thank you for taking the time zip, if there is anything else i can do or get to help out let me know. :-D

Re: Change Transcode video Width x Height

PostPosted: Tue Jun 25, 2013 12:12 am
by ResQue1980
Is there any way i can input a custom resolution for example 1216x656

The reason i want to do this is because the picture that my xbox is rendering on the TV is cutting off the edge of the picture by about 64 pixels (just enough to make the subtitles hard to read). In the past to fix this error i have transcoded my videos -64px to the height and width and everything fits perfectly.

Re: Change Transcode video Width x Height

PostPosted: Tue Jun 25, 2013 9:41 am
by zip
Can you try a file without subtitle? Or disable using embedded subtitles.

Re: Change Transcode video Width x Height

PostPosted: Tue Jun 25, 2013 4:42 pm
by ResQue1980
I double checked the settings in profiles.xml and then opened up the temp file created by serviio containing the transcoded video "D:\temp\Serviio\transcoding-temp-100-3-ORIGINAL.stf" and it does appear to be working now. The resolution has in fact been transcoded to height 656px.

The issue was in the Matches containers tag. I changed it from

  Code:
<Video targetContainer="asf" targetVCodec="wmv2" targetACodec="wmav2" maxVBitrate="15360" forceStereo="true" maxHeight="656">
            <Matches container="matroska" />
            <Matches container="mpeg" />            
            <Matches container="mpegts" />
            <Matches container="mpegvideo" />
            <Matches container="avi" vCodec="h264" />
            <Matches container="avi" vCodec="msmpeg4" />
            <Matches container="avi" vCodec="wmv2" />
            <Matches container="avi" vCodec="dvvideo" />
            <Matches container="mp4" vCodec="dvvideo" />
            <Matches container="wtv" />
            <Matches container="ogg" />
            <Matches container="3gp" />
            <Matches container="flv" /> 
            <Matches container="rm" />
</Video>



To this (notice the extra forceVTranscoding="true" and <Matches container="*" />):
  Code:
<Video targetContainer="asf" targetVCodec="wmv2" targetACodec="wmav2" maxVBitrate="15360" forceVTranscoding="true" forceStereo="true" maxHeight="656">
      <Matches container="*" />
</Video>



It appears as though this was my fault, after having a good nights sleep and re reading the transcoding configuration documentation all is well and working as it should: http://www.serviio.org/index.php?option ... icle&id=24


This issue is closed, thanks for the help Illico and zip. :-D

Re: [SOLVED] Change Transcode video Width x Height

PostPosted: Tue Jun 25, 2013 9:04 pm
by zip
forceVTranscoding should only apply if the source and target vCodecs ae the same (ie if true it won't copy the stream but re-transcode it). It should not make any difference for you.