Page 1 of 1

Cannot read file error with Panasonic Viera

PostPosted: Fri Feb 10, 2012 11:11 am
by ergolargo
Hi there

I am new to Serviio so perhaps I have missed a config step somewhere, but I've spent very many hours trying to sort this problem out, and I think I need some expert help now!

I have a Panasonic Viera TX-L32E30B with the latest firmware, but it refuses to play an MP4 file from Serviio wired up to my router, through Serviio running on Windows 7 Enterprise. The TV can see the file name of the troublesome file, but then I get the Cannot Read File error on screen, and a WARN error in the Serviio log: [ResourceTransportRequestHandler] Error while processing resource, sending back 404 error. Message: C\<my_path_to_my_local_share>\myfile.mp4 (The system cannot find the file specified).

After much troubleshooting, I am starting to think this is some kind of routing problem for the transcoded streaming traffic, but I should tell you what I have already done for diagnostic purposes, to see if you agree with my conclusion, as I might have missed something obvious.

1. I have the latest version of Serviio along with the very recent "Panasonic Viera with/without AVI" profile.
2. I have the local share rights and security settings all set to allow Full control for everyone for the share folder in question.
3. I have manually and automatically restarted the Serviio service both within the Serviio console and in Windows itself repeatedly.
4. The file plays OK on VLC player so I assume it is not corrupt.
5. I have tried renaming the file extension from .ts to .mp4, and other things too.
6. I have tried to get FFMPEG.EXE -i to examine the file but it gives me a "At least one output file must be specified" error. VLC reports that the file appears to be compatible with what the TV should support, comprising this:

Stream 0
Type: video
Codec: MPEG-4 Video (mp4v)
Resolution: 720 x 576
Frame rate: 25

Stream 1
Type: audio
Codec: MPEG audio layer 1/2/3 (mpga)
Channels: Stereo
Sample rate: 48000 Hz
Bitrate: 128 kb/s

So ... all of this makes me conclude that the TV can see the filename from the server, but when the stream starts up, the data doesn't arrive. I have the computer and the TV wired to a Draytek router, and I'm wondering if there are some specific packet filters that I need to open up on the router, which would then let the stream get to its destination?

Thanks if you can offer any advice about how to proceed with this problem.

Regards

Re: Cannot read file error with Panasonic Viera

PostPosted: Fri Feb 10, 2012 11:23 am
by Cerberus
1 - 4 okkk

5 - ts would be mpg and not mp4.

6 - thats not an error its supposed to say that.

have you tried the new panasonic profile?? viewtopic.php?f=13&t=5119&start=60#p36709

So ... all of this makes me conclude that the TV can see the filename from the server, but when the stream starts up, the data doesn't arrive. I have the computer and the TV wired to a Draytek router, and I'm wondering if there are some specific packet filters that I need to open up on the router, which would then let the stream get to its destination?


your over thinking it. ;)

Re: Cannot read file error with Panasonic Viera

PostPosted: Fri Feb 10, 2012 11:32 am
by ergolargo
Hi there

Thanks for the quick reply. But yes those are the two profiles that I ended up with from my previous efforts, and those are the profiles that still give the error. I thought the router problem was a bit unlikely to begin with, as I managed to get a YouTube download over to the TV through Serviio a while back, but I have changed the config from then so much, it was hardly worth mentioning it now. The only difference would be, that was served from the auto configured 'online' sources tab rather than a local share, which set me off thinking about file permissions etc, but like I say I think I've discounted that now.

I've tried .mpg as the file extension already too, so now I have run out of ideas!

Cheers

Re: Cannot read file error with Panasonic Viera

PostPosted: Fri Feb 10, 2012 5:01 pm
by PMI
Renaming a file generally does not help, because changing the extension does not change what is inside the file.

When using ffmpeg -i to get file information, what you need to know about the file is just before the error line.
(You can also use MediaInfo to get similar data.) If you post the file info here, Cerberus or someone else may be able to tell you why it does not play.

The 404 error in the log file may just be a result of renaming files to change the file extension. When you rename a file, serviio retains the previous name for a while, and then when you open the folder, those errors may happen for renamed files when the Viera TV tries to generate the preview pane, or when you click on it.

A file name may show up in the menu even though it has been renamed, but it cannot be accessed because it is no longer found by the old name. The hint that this is happening is when the Viera TV first displays a message that reads "Please wait a moment" and only after a few seconds it will display "Cannot Read File".

Re: Cannot read file error with Panasonic Viera

PostPosted: Sat Feb 11, 2012 10:24 am
by ergolargo
Hello again

Here is the input file info from FFMPEG. It was originally downloaded with a .ts extension:

Stream: #0 : 0[0x100]: Video: mpeg4 (Simple Profile) ([16][0][0][0] / 0x0010),
yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 5 tbr, 90k tbn, 25 tbc

Stream: #0 : 1[0x101](eng): Audio: mp3 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
s16, 128 kb/s

The TV does seem to recognize OK the file renamed with a new filename, after a bit of the caching fun you mention, with the old name eventually disappearing, but then even with the 'new' file, again it shows the same pattern: the please wait message while it tries to use the file on the first attempt, and then after 10-15 seconds, the 'Cannot open file' response. It doesn't try to open the same file on subsequent attempts, just going straight to the error as you describe.

If you could shed any light on whether the file looks like it wouldn't match the profile, that would be very useful - but it seems OK to me ...

Cheers

Re: Cannot read file error with Panasonic Viera

PostPosted: Sat Feb 11, 2012 7:51 pm
by PMI
ergolargo wrote:If you could shed any light on whether the file looks like it wouldn't match the profile, ...
I think I have a clue now. I will try to generate a file with the same mpeg4/mp3 combination, and do a test, and then report back later today. I am assuming that file may have originally been a different container, and then someone made it into MPEG-TS w. mpeg4 video and mp3 audio.

Re: Cannot read file error with Panasonic Viera

PostPosted: Sat Feb 11, 2012 10:32 pm
by ergolargo
Hello

OK thanks that would be great - am I right in thinking the combination of an MP4 video stream with an MP3 audio stream is a bit unusual, and possibly a bit of an unhelpful way of doing a TS file? If so, I could do with letting them know, as other folks will have the same trouble on different TV models?

Regards

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 1:53 am
by PMI
ergolargo wrote:...am I right in thinking the combination of an MP4 video stream with an MP3 audio stream is a bit unusual, and possibly a bit of an unhelpful way of doing a TS file?
Honestly, I do not know, but uncommon, yes. I can't duplicate the file exactly by any means I have right now, which should be a hint that it is not common.

As an MP4 container with MPEG-4 video and MP3 audio, it would be common, and it is supported in the profile. As MPEG-TS, not.

If it is just a file that someone can make using one of the tools that can produce almost any combination of video and container format, then I personally would not spend any time on it. In any case, I checked and the file type is not supported by the Viera TV, not in the default profile, and not in the new profile posted here.

You could try to add support for the file to your own profile, by adding a rule which transcodes it into something playable. An example:

<Video targetContainer="mpeg" targetVCodec="mpeg2video" targetACodec="ac3">
<Matches container="mpegts" vCodec="mpeg4" />
</Video>


or,

<Video targetContainer="mpegts" targetVCodec="mpeg2video">
<Matches container="mpegts" vCodec="mpeg4" />
</Video>


This would be inserted into the Transcoding section of the profile you have selected for your TV model, just before the section for Unsupported Codecs, in C:\Program Files (x86)\Serviio\config\profiles.xml, using any text editor (your directory path may be different). Even after that, it may not get through ffmpeg, and you may still have an error trying to play the output.

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 7:27 am
by Cerberus
PMI wrote:
ergolargo wrote:...am I right in thinking the combination of an MP4 video stream with an MP3 audio stream is a bit unusual, and possibly a bit of an unhelpful way of doing a TS file?
Honestly, I do not know, but uncommon, yes. I can't duplicate the file exactly by any means I have right now, which should be a hint that it is not common.

As an MP4 container with MPEG-4 video and MP3 audio, it would be common, and it is supported in the profile. As MPEG-TS, not.

If it is just a file that someone can make using one of the tools that can produce almost any combination of video and container format, then I personally would not spend any time on it. In any case, I checked and the file type is not supported by the Viera TV, not in the default profile, and not in the new profile posted here.

You could try to add support for the file to your own profile, by adding a rule which transcodes it into something playable. An example:

<Video targetContainer="mpeg" targetVCodec="mpeg2video" targetACodec="ac3">
<Matches container="mpegts" vCodec="mpeg4" />
</Video>


or,

<Video targetContainer="mpegts" targetVCodec="mpeg2video">
<Matches container="mpegts" vCodec="mpeg4" />
</Video>


This would be inserted into the Transcoding section of the profile you have selected for your TV model, just before the section for Unsupported Codecs, in C:\Program Files (x86)\Serviio\config\profiles.xml, using any text editor (your directory path may be different). Even after that, it may not get through ffmpeg, and you may still have an error trying to play the output.


isnt that change already in our profile PMI ?

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 3:09 pm
by ergolargo
Hello

Well thanks for investigating anyway, maybe I have to give up if the MPEG-TS container is not supported by Panasonic Viera TVs anyway? I am wondering if it is worth looking into the possibility of extracting the two streams from the existing 700MB .TS file and then repackaging them as an MP4 file, seeing as the profile and TV can already handle that combination. Is there any software you could recommend that might be able to have a go at this?

Cheers

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 3:16 pm
by PMI
Cerberus wrote:isnt that change already in our profile PMI ?
I dont think so.

The TV supports MP4/H.264 but not MP4/MPEG-4. Seems strange, but whatever... (shrug).
So, MPEG-4 was added to the unsupported codec section for MP4, (also for MKV).

<!-- unsupported codecs will be transcoded into mpeg-ts, mpeg2 video and ac3 audio -->
<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3">
<Matches container="avi" />
<Matches container="mp4" vCodec="mjpeg" />
<Matches container="mp4" vCodec="mpeg4" />
<Matches container="mpeg" vCodec="mpeg1video" />
<Matches container="matroska" vCodec="mpeg4" />
<Matches container="asf" />
<Matches container="flv" />
<Matches container="ogg" />
<Matches container="3gp" />
</Video>


I never investigated if MPEG-4 was supported in MPEG-TS or MPEG-PS container w/o transcoding.

Not sure how much sense that combination makes, so that would be up to you to decide...

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 3:21 pm
by Cerberus
PMI wrote:
Cerberus wrote:isnt that change already in our profile PMI ?
I dont think so.

The TV supports MP4/H.264 but not MP4/MPEG-4. Seems strange, but whatever... (shrug).
So, MPEG-4 was added to the unsupported codec section for MP4, (also for MKV).

<!-- unsupported codecs will be transcoded into mpeg-ts, mpeg2 video and ac3 audio -->
<Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3">
<Matches container="avi" />
<Matches container="mp4" vCodec="mjpeg" />
<Matches container="mp4" vCodec="mpeg4" />
<Matches container="mpeg" vCodec="mpeg1video" />
<Matches container="matroska" vCodec="mpeg4" />
<Matches container="mpegts" vCodec="mpeg4" /> <---- add that line in like so to get it to work.
<Matches container="asf" />
<Matches container="flv" />
<Matches container="ogg" />
<Matches container="3gp" />
</Video>


I never investigated if MPEG-4 was supported in MPEG-TS or MPEG-PS container w/o transcoding.

Not sure how much sense that combination makes, so that would be up to you to decide...


i think its one of them extremely rare one that wont even come up again codec combos, but the user is welcome to add it in if he has alot of files with this combo. ( see RED text above )

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 4:58 pm
by ergolargo
Hi folks

Good news ....

Adding this entry to the unsupported codecs section seems to have done the trick, as you suggest:

<Matches container="mpegts" vCodec="mpeg4" />

Presumably serviio/FFMPEG is now converting the file on-the-fly to mpeg2 video and ac3 audio, so that answers the other question too, in that I could also use FFMPEG to do the conversion manually beforehand?

It is a file from a BBC website though, not really so obscure over in the UK at least, so maybe you will get queries about this combination again, for Panasonic TVs at any rate.

Thanks for the assistance!

Re: Cannot read file error with Panasonic Viera

PostPosted: Sun Feb 12, 2012 5:01 pm
by Cerberus
ergolargo wrote:Hi folks

Good news ....

Adding this entry to the unsupported codecs section seems to have done the trick, as you suggest:

<Matches container="mpegts" vCodec="mpeg4" />

Presumably serviio/FFMPEG is now converting the file on-the-fly to mpeg2 video and ac3 audio, so that answers the other question too, in that I could also use FFMPEG to do the conversion manually beforehand?

It is a file from a BBC website though, not really so obscure over in the UK at least, so maybe you will get queries about this combination again, for Panasonic TVs at any rate.

Thanks for the assistance!


im in the UK and it deffinately is an obscure combo, but as your saw was an easy fix, well its an easy fix now as PMI and myself have spent alot of hours working on panasonic support.