Page 1 of 1

Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Fri Oct 19, 2012 2:59 am
by Insiteful
I transferred this conversation that was intertwined with another thread http://forum.serviio.org/viewtopic.php?f=12&t=6416 because it is still unresolved. I have a collection of music videos in mpeg-2 files (.vob) I have also archived some of my dvd's onto an external hard drive, and would like Serviio to play them via DLNA to my LG BD670 dvd player. Correct me if I am wrong, but I believe that Serviio does not recognize Video_TS folders as a dvd, and therfore cannot serve dvd content seamlessly (this would be a great feature, if possible!). However, Serviio will play the individual .vob files contaned inside the Video_TS folder, but there is no Fast-Forward or Rewind transport control:

Insiteful wrote:Is there any way to enable fast-forward and rewind functions on these mpeg-2 video files?

Illico wrote:Its probably because fast-forward does not work with mpegps container, try with mpegts container,
or try with mkv/ac3, it will be remuxed to mpegts

Insiteful wrote:Sorry, I am a newbie here. Could you tell me how to change from the mpegps container to the mpegts container? Can this be done in the LG Player profile? Does it require re-encoding the file?

Illico wrote:Do you have mpegts container sample file, or a mkv file ?

Insiteful wrote:I do not have any .mkv files in my media library. What does a mpegts container sample file look like? Does it have a .ts extension? Can it be found in a dvd VIDEO_TS folder? If not, where can I find a sample file?

Illico wrote:for MPEGTS :
http://www.demo-world.eu/trailers/high- ... ailers.php

For example, the first file :
http://www.demo-world.eu/trailers/redir ... lu_ray.jpg
http://www.trailerz.demo-world.eu/downl ... lu_ray.rar

This is a MPEG2TS-BDAV/AVC-1920x1080/AC3-6 media stream (hd_distributor_fox_blu_ray.m2ts).
- Add this sample file to serviio fibrary.
- Check on log file that this file is delivered in native format.
- Try fast-forward with this mpegts file

Please make an archive (zip) of your looong logging file and post here.
Thanks


The sample Transport Stream file above did not play natively on the BD-670. The LG Error was "Video Resolution Not Supported", I am not sure why :-\. So instead, I downloaded the following standard DVD file from http://www.demo-world.eu/trailers/movie-trailers-0-h.php. It is the first file on the list:

http://www.demo-world.eu/trailers/redirect-movie.php?file=movie_10000_bc.rar

This is an Mpeg-2 Program Stream, which is standard DVD format according to http://en.wikipedia.org/wiki/. According to Wikipedia, Program Streams are used on standard DVD's , whereas Transport Streams are "designed for less reliable transmission, namely terrestrial or satellite broadcast. Further, a transport stream may carry multiple programs." This mpeg-2 PS video file (above) plays natively on the BD-670, but does not fast-forward or rewind.

To run this test, I disabled transcoding in Serviio, shut down the service, deleted the log file, re-started the service, and played the above sample file, a 2-minute trailer from the movie "10,000 b.c." I tried to Fast-forward at the beginning, Rewind at 30 seconds, Fast-Forward at 60 seconds, and Rewind at 90 seconds. No FF or Rewind worked. After the file completed playing, I shut down the BD-670, and stopped the Serviio service. The resulting log file is attached here, from C:\Program Files\Serviio\log. Thanks.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Fri Oct 19, 2012 10:58 am
by Illico
Are you sure that fast-forward are supported by LG BD670 dvd player ?
Do you found some format where this feature works ?

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Fri Oct 19, 2012 6:00 pm
by Insiteful
I have played many different video files using Serviio on my BD-670, and I can confirm that Fast-Forward and Rewind DOES work on other video files such as .avi (divx, xvid, etc), .mp4, wmv, and mkv. And, of course transport functions work on physical DVD's (in the dvd drive) and also on Netflix. The only format that i have found where Fast-Forward and Rewind does NOT work is on the mpeg-2 files as described above.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Mon Oct 22, 2012 7:25 am
by Illico
Serviio only support output format : mpegts; mpegps,asf:
targetContainer - compulsory; name of container to transcode into; possible values: asf, mpeg (MPEG2PS), mpegts (MPEG2TS)

So you can try to edit the LG profile to transcode to asf container target. (look at XBOX profile).

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Mon Oct 22, 2012 3:58 pm
by Insiteful
The sample file that I used for the test is an Mpeg-2 Program Stream. That is MPEG2PS, correct? So, if MPEG2PS is supported by Serviio, and the file does play natively (which it does), why can't it Fast-forward or rewind? Are you saying that the identical Mpeg-2 Program stream needs to be contained in an .asf container, in order to have the FF/REW transport controls? The stream itself would not be transcoded, thereby avoiding the loss in quality from the transcoding process?

So, if I understand you correctly, Serviio cannot play standard DVD content natively with FF/REW transport control? Is that a limitation of DLNA? Or, is that a limitation of Serviio? Can it be fixed in a later Serviio update? It seems like it would be a great feature, and a basic need for many users - to be able to play dvd content from stored video_ts folders...

Thanks.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Mon Oct 22, 2012 6:15 pm
by Illico
Insiteful wrote:The sample file that I used for the test is an Mpeg-2 Program Stream. That is MPEG2PS, correct?

Yes, MPEG2 Program Stream is MPEG2PS.
If you select "Generic Profile", this file will be delivered in native format.
If your device support Fast/Forward with MPEGPS format, that should work.

In fact, this is the device that provide the fast/forward function, serviio only respond to a range request.
You can enable detailed logging (see signature links) and look at the request from your device during a fast/forward function.

You said that your device support Fast/Forward with asf container, so I suggest you to try to change transcode target to asf for testing.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Mon Oct 22, 2012 6:37 pm
by Insiteful
Illico wrote:If you select "Generic Profile", this file will be delivered in native format.
If your device support Fast/Forward with MPEGPS format, that should work.

This is the same as turning off transcoding in the serviio console? I tried that, and it does not work.

Illico wrote:You can enable detailed logging (see signature links) and look at the request from your device during a fast/forward function.

I did that. The file appears above for downloading and analysis by the Serviio team.

Illico wrote:You said that your device support Fast/Forward with asf container, so I suggest you to try to change transcode target to asf for testing.

As I said, the LG BD-670 DOES support FF and REWIND with all other file types that I have tried. But, apparently not with MPEG2PS natively.

I will attempt to transcode to asf container target, but not change the Mpeg2PS codec (to maintain quality), which is what I think you have suggested.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Mon Oct 22, 2012 7:26 pm
by Illico
Backup your profiles.xml then edit the file and modify like this :

  Code:
<Profile id="8" name="LG TV / player" extendsProfileId="1">
      <Detection>
         <HttpHeaders>
            <friendlyName.dlna.org>LG.*</friendlyName.dlna.org>
         </HttpHeaders>
      </Detection>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/mp4" name="">AVI</MediaFormatProfile>
      </MediaFormatProfiles>
      <SubtitlesMimeType>text/srt</SubtitlesMimeType>
      <Transcoding>
         <Video targetContainer="asf">
            <Matches container="mpeg" />
            <Matches container="mpegts" />
         </Video>
      </Transcoding>
   </Profile>


Restart serviio services.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Tue Oct 23, 2012 5:07 am
by Insiteful
OK, success. we are making progress. The profile code above works, and I can FF/REWIND the video. BUT: Serviio takes 5 minutes to process before the video starts to play, I assume because of the encoding process. Does that seem right? If the MPEG2PS Program Stream itself does not need to be re-encoded, why should it take 5 minutes to process a 3-minute video file? Is there a way to speed up the process?

Also, some of my music videos have lpcm audio streams, and some have ac3 stereo, some have 5.1 surround. As previously noted, the BD-670 cannot play lpcm streams (see http://forum.serviio.org/viewtopic.php?f=12&t=6416), but can play all the others. As you can see, I added the encoding of all audio to ac3 along with the target asf container.

  Code:
- <Transcoding>
- <Video targetContainer="asf" targetACodec="ac3">
  <Matches container="mpeg" />
  <Matches container="mpegts" />
  </Video>
  </Transcoding>


Also, Illico, can you help me with the programming? Is there a way to split that audio encoding (only for lpcm streams) to another encoding section, so that only lpcm audio streams are transcoded to ac3?

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Tue Oct 23, 2012 7:30 am
by Illico
The first match is took so following should work (check on detailed logging):

  Code:
   <Transcoding>     
      <Video targetContainer="asf" targetACodec="ac3">
         <Matches container="mpeg" aCodec="lpcm" />
         <Matches container="mpegts" aCodec="lpcm" />
      </Video>
      <Video targetContainer="asf">
         <Matches container="mpeg"/>
         <Matches container="mpegts" />
      </Video>
   </Transcoding>

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Tue Oct 23, 2012 7:32 am
by Illico
Insiteful wrote:BUT: Serviio takes 5 minutes to process before the video starts to play, I assume because of the encoding process. Does that seem right? If the MPEG2PS Program Stream itself does not need to be re-encoded, why should it take 5 minutes to process a 3-minute video file? Is there a way to speed up the process?

Don't know !

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Tue Oct 23, 2012 8:02 pm
by Insiteful
Do you think Serviio is processing for such a long time before playing the file, because it is encoding the MPEG2PS Program Stream? The video should not be re-encoded, just muxed into an asf container, correct?

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Wed Oct 24, 2012 6:55 am
by Illico
Insiteful wrote:Do you think Serviio is processing for such a long time before playing the file, because it is encoding the MPEG2PS Program Stream?

Check the detailed log file, and try the same ffmpeg command line locally in windows terminal and check ffmpeg log process.
Insiteful wrote:The video should not be re-encoded, just muxed into an asf container, correct?

Yes

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Wed Oct 24, 2012 10:21 pm
by Insiteful
Illico wrote:Check the detailed log file, and try the same ffmpeg command line locally in windows terminal and check ffmpeg log process.

Well, I know nothing about ffmpeg or creating a log file in windows terminal. I will learn. However run a test in Serviio and generate a detailed log.
In the meantime, is there a software utility that you know of that will manually mux the MPEG2PS stream into an ASF container? I tried AviDemux, but it does not support ASF output.

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Thu Oct 25, 2012 9:14 am
by Illico
Insiteful wrote:In the meantime, is there a software utility that you know of that will manually mux the MPEG2PS stream into an ASF container? I tried AviDemux, but it does not support ASF output.

- FFMPEG
- VLC

Re: Fast Forward & Rewind of DVD & mpeg-2 .vob files?

PostPosted: Tue Oct 30, 2012 2:44 am
by Insiteful
Here are the command-line options for FFMPEG, to losslessly place an MPEG-2 Program Stream with an AC3 audio track in an .asf container - without re-encoding the video. I have tested with Serviio and confirmed that the file will Fast-Forward & Rewind on the LG BD-670:

  Code:
ffmpeg -i inputfile.ext -codec copy -f asf outfile.asf

(replace inputfile.ext and outfile.asf with the input filename and desired output file name)

I found that when I instruct FFMPEG to change the container from mpeg to asf, by default FFMPEG re-encodes the video and audio streams. The "-codec copy" parameter in the FFMPEG command line prevents the re-encoding of the streams. As I noted in a previous post, when my LG profile instructs Serviio to change the container to asf, I believe that Serviio is re-encoding my video and audio streams, and I suspect that is why Serviio is taking so long to play the video once it is selected. Perhaps, as with FFMPEG, re-encoding the streams is the default when switching container to asf... Question: Is there a command or parameter that I can add to the LG profile to specifically prevent re-encoding, in the same way that the "-codec copy" parameter prevents re-encoding in FFMPEG?