Page 1 of 1

.WTV file transcoding - occasional issue

PostPosted: Thu Jan 05, 2012 7:44 am
by purevector
I am trying to stream OTA HD signals from my PC to a WDTV Live. The files are created by Win7 WMC. Generally, everything works fine, but occasionally some files do not transcode. I used the debug log to look at the ffmpeg command and I ran it in a command prompt. I found that occasionally I got an error relating to genpts. After some searching around this forum and the web, I found that the solution is to add the following flags to the ffmpeg command line; "-fflags +genpts".

This problem was apparently fixed in a previous version according to this tread viewtopic.php?f=3&t=665&start=10, but my 6.0.1 does not include those flags. Could it be possible to add them? Also, in the interim, I wanted to use a .bat file to just add the flags manually, but since Serviio specifically calls ffmpeg.exe, I cannot do that. I tried to compile the bat, but that didn't seem to work well. Does anyone have a solution?

Re: .WTV file transcoding - occasional issue

PostPosted: Thu Jan 05, 2012 8:36 am
by Illico
You could try this:

added this on ServiioService.exe.vmoptions:
-Dffmpeg.location=C:\Serviio\lib\ffmpeg.exe -fflags +genpts

you probably have to change the ffmpeg.exe path

Re: .WTV file transcoding - occasional issue

PostPosted: Thu Jan 05, 2012 10:00 am
by Illico
I did not find this option on ffmpeg documention, could you point me?

Re: .WTV file transcoding - occasional issue

PostPosted: Thu Jan 05, 2012 11:13 pm
by purevector
I got the tip from the thread I mentioned before, as well as various webpages. The error this flag solves is: first pts value must set av_interleaved_write_frame(): Operation not permitted.

Your suggestion about ServiioService.exe.vmoptions helped me solve the problem. I changed the target to a batch file I created called ffmpeg2.bat. The batch file called ffmpeg with the -fflags genpts flags. This has seemed to solve my problem, but if it was included in the official release, I'm sure it will help others.

Re: .WTV file transcoding - occasional issue

PostPosted: Mon Jan 09, 2012 1:14 pm
by Illico
purevector wrote:Your suggestion about ServiioService.exe.vmoptions helped me solve the problem.
I changed the target to a batch file I created called ffmpeg2.bat. The batch file called ffmpeg with the -fflags genpts flags.
This has seemed to solve my problem, but if it was included in the official release, I'm sure it will help others.

Could you provide your ffmpeg2.bat file please?

Re: .WTV file transcoding - occasional issue

PostPosted: Mon Jan 09, 2012 2:58 pm
by purevector
It's very simple:

ffmpeg.exe -fflags genpts %*

Re: .WTV file transcoding - occasional issue

PostPosted: Mon Jan 09, 2012 3:32 pm
by Illico
purevector wrote:It's very simple:

:D yes simple.
It seems that with the latest ffmpeg 0.9 version, command order is now important. What is your ffmpeg version?
Sony Aspect Ratio workaround doesn't work with latest ffmpeg version: viewtopic.php?f=11&t=2956&start=30#p27617

Re: .WTV file transcoding - occasional issue

PostPosted: Mon Jan 09, 2012 3:52 pm
by zip
I'll be releasing a patch release soon which will have this added in. Join the beta group if you want to test this issue.

Re: .WTV file transcoding - occasional issue

PostPosted: Sat Feb 04, 2012 12:53 am
by uspino
I'm trying to stream WTV files to my WDTV Live. It looks like it tries to read the files but after 15 seconds I get the "file not supported" message. I hace selected the WDTV profile. I'm runing 0.6.2

Is there something I'm doing wrong? I actually bought the WDTV Live after reading this thread under the impression that WTV files could be streamed from Serviio. They stream great to my Samsung Smart TV.

Any help?


UPDATE: I guess I helped myself. I solved the problem by changing:

<Video targetContainer="mpegts">
<Matches container="wtv" />

to

<Video targetContainer="mpeg">
<Matches container="wtv" />

in the WDTV Live section of the Profiles.xlm file. What a difference two letters make. Now I have WTV streaming working beautifully. Thanks Serviio.

Re: .WTV file transcoding - occasional issue

PostPosted: Sat Feb 04, 2012 12:17 pm
by zip
thanks, will be included in the next release

Re: .WTV file transcoding - occasional issue

PostPosted: Sun Feb 05, 2012 4:06 pm
by PMI
Just as an aside, Panasonic suggested to me transcoding wtv files to MPEG-PS and not MPEG-TS for their devices.
(Had that discussion with new Panasonic profile Cerberus was kindly working on). This was added to the profile to solve that issue:

<!-- Remux WTV files to MPEG-PS with no transcoding-->
<Video targetContainer="mpeg">
<Matches container="wtv" />
</Video>


Since it also affects WDTV Live, it may really be a general issue, and not specific to one family of devices.

I am wondering now, does this also affect files recorded as wtv in WMC, and then converted to dvr-ms?

Re: .WTV file transcoding - occasional issue

PostPosted: Sun Feb 05, 2012 8:12 pm
by Cerberus
yep i can confirm that WTV files should be remuxed to MpegPS and not TS as ffmpeg is having issue with muxing to TS at the current time, i saw a bug ticket for this on there site but i forget exactly were.