FAQ  •  Register  •  Login

Invalid Media Format Exception with mpegts of mp2 only

<<

kakker

User avatar

Serviio newbie

Posts: 6

Joined: Fri Apr 06, 2012 4:43 pm

Location: Columbus, Ohio, USA

Post Fri Apr 06, 2012 5:30 pm

Invalid Media Format Exception with mpegts of mp2 only

First of all, thank you for everything you've put in to Serviio. I have set up a media server (WHS 2011) on my local network, which can now provide live streams (mpegts of mpeg2video/ac3) of our local TV stations (OTA/ATSC), from a Hauppauge HVR-2250 TV Tuner / WinTV with Extend, to DLNA devices, such as our Sony BDP-S580 Blu-Ray Player ... thanks to Serviio.

I would, however, like to be able to do the same with the live streams of our FM radio stations, but Serviio does not appear to like the mpegts of mp2 audio only, as I am encountering the following errors:
2012-04-06 12:02:02,900 WARN [FeedUpdaterThread] Failed to retrieve online item information for http://192.168.1.25:7799/stream?channel=8970. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video codec.
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveAVMetadata(FeedUpdaterThread.java:273)
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveTechnicalMetadata(FeedUpdaterThread.java:208)
at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:101)
Caused by: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video codec.
at org.serviio.library.metadata.FFmpegMetadataRetriever.validateCodecsFound(FFmpegMetadataRetriever.java:347)
at org.serviio.library.metadata.FFmpegMetadataRetriever.retrieveMetadata(FFmpegMetadataRetriever.java:87)
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveAVMetadata(FeedUpdaterThread.java:255)
... 2 more

and I am not able to see the FM radio stations on my Sony.

I have tried a number of fixes, including adding the following to the "Sony BD Player" section of the profiles.xml:
<!-- attempt to fix problem playing mpegts with mp2 audio coming from Hauppauge WinTV FM radio stations -->
<Video targetContainer="mpegts" targetACodec="mp2">
<Matches container="mpegts" ACodec="mp2" />
</Video>

but have not had any luck. I would appreciate any advice you could provide. Thanks.

-kakker
------------------------------------------------------------------------------------------------
ffmpeg output for FM radio live stream:
[mpegts @ 0x7f7f7c04ac00] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x7f7f7c04ac00] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://192.168.1.25:7799/stream?channel=8970':
Duration: N/A, start: 0.213011, bitrate: 384 kb/s
Program 1
Stream #0.0[0x3e9]: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s


ffmpeg output for TV live stream:
[mpeg2video @ 0x7fb8d2850800] mpeg_decode_postinit() failure
Last message repeated 13 times
[mpegts @ 0x7fb8d284ac00] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://192.168.1.25:7799/stream?channel=1041':
Duration: N/A, start: 79941.345378, bitrate: 13240 kb/s
Program 3
No Program
Stream #0.0[0x31]: Video: mpeg2video (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 12856 kb/s, 34.64 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x34]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Fri Apr 06, 2012 5:33 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

  Code:
2012-04-06 12:02:02,900 WARN [FeedUpdaterThread] Failed to retrieve online item information for http://192.168.1.25:7799/stream?channel=8970. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown video codec.


if you look at the error code, it is saying unknown video codec.

run ffmpeg -i "http://192.168.1.25:7799/stream?channel=8970" in a console and post the results here.
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

kakker

User avatar

Serviio newbie

Posts: 6

Joined: Fri Apr 06, 2012 4:43 pm

Location: Columbus, Ohio, USA

Post Fri Apr 06, 2012 8:31 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Thanks, Mark. As I stated in my original post, the ffmpeg output was
[mpegts @ 0x7f7f7c04ac00] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x7f7f7c04ac00] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://192.168.1.25:7799/stream?channel=8970':
Duration: N/A, start: 0.213011, bitrate: 384 kb/s
Program 1
Stream #0.0[0x3e9]: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s


The complete output, if you need it, was
ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 12 2012 18:57:46 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-apple-4.2 --arch=x86_64 --enable-yasm
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
[mpegts @ 0x7f7f7c04ac00] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x7f7f7c04ac00] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://192.168.1.25:7799/stream?channel=8970':
Duration: N/A, start: 0.213011, bitrate: 384 kb/s
Program 1
Stream #0.0[0x3e9]: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
At least one output file must be specified
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Fri Apr 06, 2012 8:44 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Do you have it selected as a video or audio stream in the serviio console?

Look at this group of audio streams.

http://forum.serviio.org/viewforum.php?f=42

I do not think it should not be streaming as a mpegts.
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

kakker

User avatar

Serviio newbie

Posts: 6

Joined: Fri Apr 06, 2012 4:43 pm

Location: Columbus, Ohio, USA

Post Fri Apr 06, 2012 8:57 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

I've tried the streams as Video and as Audio, but have encountered basically the same exception for both. The exception for the Audio version is
2012-04-06 16:51:41,445 WARN [FeedUpdaterThread] Failed to retrieve online item information for http://192.168.1.25:7799/stream?channel=8970. It might not play.
java.io.IOException: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown audio file type.
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveAVMetadata(FeedUpdaterThread.java:273)
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveTechnicalMetadata(FeedUpdaterThread.java:233)
at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:101)
Caused by: org.serviio.library.local.metadata.extractor.InvalidMediaFormatException: Unknown audio file type.
at org.serviio.library.metadata.FFmpegMetadataRetriever.validateCodecsFound(FFmpegMetadataRetriever.java:359)
at org.serviio.library.metadata.FFmpegMetadataRetriever.retrieveAudioMetadata(FFmpegMetadataRetriever.java:111)
at org.serviio.library.online.metadata.FeedUpdaterThread.retrieveAVMetadata(FeedUpdaterThread.java:257)
... 2 more
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Fri Apr 06, 2012 9:05 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

have you tried to listen to the stream using xbmc or any other program capable of listening to streams? A plugin might need to be created for it.

Check you stream url.

192.168.1.xxx is usually an internal lan at a company or home.
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

kakker

User avatar

Serviio newbie

Posts: 6

Joined: Fri Apr 06, 2012 4:43 pm

Location: Columbus, Ohio, USA

Post Fri Apr 06, 2012 9:35 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Mark, as I mentioned in my original post, I set up my own media server on my local network (at home). I have the Hauppauge card in the Windows Home Server 2011 system, and I am running WinTV with Extend. The IP address of the system is 192.168.1.25, and Extend is set up for port 7799. I am able to view/listen to the TV and radio live streams via the Extend client application on an iPad 2, and via VLC, etc.

If I had to guess, I would say that validateCodecsFound, retrieveMetadata, retrieveAudioMetadata, and/or retrieveAVMetadata is/are choking on the process of validating mpeg transport streams which don't contain a video stream.

-kakker
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Fri Apr 06, 2012 9:56 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

kakker

User avatar

Serviio newbie

Posts: 6

Joined: Fri Apr 06, 2012 4:43 pm

Location: Columbus, Ohio, USA

Post Sat Apr 07, 2012 3:46 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Thanks again, Mark, but VLC is not really an option for me, as such, and I've found nothing I can tweak with Serviio. Seems like Serviio should be able to handle an mpegts stream like this (no video stream, containing mp2 audio only), but that it's not set up to validate a video Online Resource which doesn't contain a video stream, or an audio Online Resource, which has an mpegts container.
<<

moltra

DLNA master

Posts: 1871

Joined: Thu Mar 24, 2011 11:00 pm

Location: Ohio USA

Post Sat Apr 07, 2012 5:14 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Zip will be able to help you better with this than I can.

I found this, it might be able to help you with this.

http://forum.xbmc.org/showthread.php?tid=111366
Mark
Beta Tester Group
http://www.serviidb.com Online media resource repository

Netgear EVA2000 | Samsung BD-D5300 | XBOX 360 | Windows 7 | Mint Debian 12 | Raxz Maxx
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sun Apr 08, 2012 6:53 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

http://www.serviio.org/index.php?option ... icle&id=24

Serviio does not support audio file with mpegts container:

Audio Matches Attributes:
container - compulsory; name of container; possible values: mp4, asf, mp3, lpcm, flac, ogg, flv, rtp, rtsp, adts
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Apr 10, 2012 12:00 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Yep, mpegts has to have a video track, it's considered a video container. Can't you wrap the stream in a mp2 / mp3 file?
<<

kakker

User avatar

Serviio newbie

Posts: 6

Joined: Fri Apr 06, 2012 4:43 pm

Location: Columbus, Ohio, USA

Post Wed Apr 11, 2012 1:51 pm

Re: Invalid Media Format Exception with mpegts of mp2 only

Thanks, Illico and Petr. Whether or not an mpegts is supposed to always contain a video stream is rather pointless to me, right now, as the audio only stream is what I'm stuck with. I am attempting to write a remux plugin solution, but will be writing it for a different server application. If I'm going to have to write a plugin, there's no sense keeping Serviio in the mix that is my media center. The plugin support is much stronger for the other app, anyway.

Thank you for trying to help, gentlemen.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 31 guests

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