FAQ  •  Register  •  Login

[SOLVED] Problem Transcoding SOPCAST streams

<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Sep 08, 2012 5:13 pm

[SOLVED] Problem Transcoding SOPCAST streams

Some SOPCAST streams are HD 1280x720 transmitted as h264/mp3.mpegts
streams.

When processed by ffmpeg in Serviio the transcoding often fails with
2012-09-08 07:51:14,128 WARN [ProcessExecutor] Process cmd has a return code of 1! This is a possible error.


When I run the same command manually, it will often fail with the message
[mpegts @ 0183F3A0] max_analyze_duration 5000000 reached at 5015467
[mpegts @ 0183F3A0] decoding for stream 1 failed
[mpegts @ 0183F3A0] Could not find codec parameters (Video: h264 ([27][0][0][0]
/ 0x001B))

but if I repeat the command it will eventually find the parameters and run successfully, and explains why Serviio sometimes fails.

This failure has 2 impacts on Serviio. First when refreshing a Webresource containing that stream, the refresh will often fail because ffmpeg fails, and the stream will not be listed by Serviio. Secondly if the webresource does refresh correctly, the playback will often fail because ffmpeg fails on the transcode.

I tried adding the -analyzeduration parameter to extend the amount of the file that is searched (I intercept Serviio ffmpeg calls and change the parameters) and it seems to have fixed the webresource refresh which are info only calls, but that parameter has no effect on encoding calls and so transcoding continues to frequently fail.

This problem makes impossible to transcode SOPCAST streams within Serviio. Any suggestions on how to get ffmpeg to extend its search for the h264 parameters?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Sep 09, 2012 1:37 am

Re: [Solved]Problem Transcoding SOPCAST streams

After a lot of testing, I have determined that the -analyzeduration parameter will also work with ffmpeg encoding commands if it is specified before the input parameter hence
ffmpeg.exe" -analyzeduration 10000000 -i http://localhost:8902 -y -threads 4 -copyts -c:v mpeg2video -b:v 2000k -maxrate:v 2000k -bufsize:v 2000k -vf scale=854:480 -g 15 -c:a copy -map 0:1 -map 0:0 -sn -f mpegts pipe:

will extend the search for the h264 parameters beyond 5000000 and successfully transcode the stream. This needs to be added to the Serviio ffmpeg command generator.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sun Sep 09, 2012 7:37 am

Re: [Solved]Problem Transcoding SOPCAST streams

Good work !
Could you add a bitbucket ticket ? This parameter is only need with live stream.
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: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Sep 09, 2012 10:01 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

Does the change have any effect on performance? IE should I add it to processing local files as well, or just online content?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Sep 09, 2012 10:43 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

zip wrote:Does the change have any effect on performance? IE should I add it to processing local files as well, or just online content?

Not that I can see, and its only an online stream problem
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Sep 12, 2012 12:02 am

Re: [SOLVED] Problem Transcoding SOPCAST streams

jhb50 wrote:
zip wrote:Does the change have any effect on performance? IE should I add it to processing local files as well, or just online content?

Not that I can see, and its only an online stream problem


Looks like ffmpeg will only scan until it finds the files parameters so there will be no performance hit on any files, and its only these problematic live streams that will take a little longer than normal.
<<

zenix

Serviio newbie

Posts: 1

Joined: Thu Dec 20, 2012 8:30 pm

Post Thu Dec 20, 2012 8:32 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

I am experiancing the same problem, the connection just is lost after couple of minutes.

I have been trying to figure out from this post where to insert those attributes?
Can anyone help a newbie?

Thanks!
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Dec 20, 2012 9:26 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

This has nothing to do with lost connections.
<<

ljw69

Serviio newbie

Posts: 2

Joined: Thu Jan 03, 2013 9:10 pm

Post Sun Jan 13, 2013 5:23 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

i could do with a a hand on inserting the above text... any help would be much appreciated
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Tue Jan 15, 2013 11:43 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

As I said the "Problem Transcoding SOPCAST streams" had nothing to do with "lost connections". As the thread documented the [solved] solution was to add the parameter and this is now added to all ffmpeg commands with Serviio 1.1
<<

ljw69

Serviio newbie

Posts: 2

Joined: Thu Jan 03, 2013 9:10 pm

Post Tue Jan 29, 2013 7:46 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

So im guessing this problem has not been resolved...
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Tue Jan 29, 2013 10:36 pm

Re: [SOLVED] Problem Transcoding SOPCAST streams

Do I really need to say it again? The problem addressed by this thread has been solved! As posted above it had nothing to do with a different "lost connections" problem which this thread is not attempting to solve.

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 40 guests

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