NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Other Clients Old Stuff (legacy) NextPVR Web Smart TV app Identify recording type

 
  • 0 Vote(s) - 0 Average
Identify recording type
trummel
Offline

Senior Member

Posts: 276
Threads: 34
Joined: Oct 2008
#1
2015-09-21, 12:07 AM
I'm working on a Tizen port of this App which is needed for 2015 Samsung TV's. I have a reliable way of playing either HD or SD recordings, but the process is different. Is there a simple way in javascript of identifiyng the H.264 encoded video so that I can handle it appropriately.

Server: Ci5 2500k, 3GB, Windows Server 2012, nPVR 3.5.7. 2xWinTV-DVB-T USB, 1xWinTV-DVB-T PCI, 2 x BlackGold DVB-T, 1xPCTV290E and 1xPCTV460E on Astra 28.2 E.
clients: RPI2, Acer R3700, PCH-A110, NUC, 3xSamsung Smart TV
trummel
Offline

Senior Member

Posts: 276
Threads: 34
Joined: Oct 2008
#2
2015-09-24, 11:07 PM
Further to this...

I'm building an app for Samsung 2015 Tizen TV's to handle NEXTPVR. Its mostly based on Fred250s excellent work on the previous Samsung Smart TV's.
If I try to stream a recording directly to the Tizen's AVPlay tool, the player locks up for a minute or two and then barfs with a message from the tizen api saying "PLAYER_ERROR_CONNECTION_FAILED". An example of the stream URL is :-
Code:
http://192.168.0.101:8866/stream?recording=16702&resolution=1920x1080&bitrate=4096k&mode=http&mime=video/MP2T&client=SMARTTV

If I turn on transcoding, I get this URL:-
Code:
http://192.168.0.101:8866/transcode?recording=16702&resolution=1920x1080&bitrate=4096k&mode=http&mime=video/MP2T&client=SMARTTV
and the recording plays flawlessly.

My transcode line in config.xml is:-
Code:
-y -v 0 -i [SOURCE] -f mpegts -acodec ac3 -ab 96k -ar 44100 -ac 2 -vcodec libx264 -flags +loop -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -bufsize 96K -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect [ASPECT] -g 30 -async 2 [TARGET]
and I'm using the latest version of ffmpeg.

Whilst transcoding makes it watchable, I'm keen to get it to work with just the streaming, mainly because seeking within the recording wont work with transcode.

I assumed it must be some corruption or incompatibility in the original recorded .ts files, so I used the same ffmpeg configuration to recode and replace the original ts file. Then I tried direct streaming it again. It still barfed, but transcoding on the fly still plays it perfectly.

Can anyone explain what the on the fly transcode might be doing that changes the way the Tizen API sees the video.

Incidentally, I've tried with HD content, SD content and live and recorded SD/HD. The results are all the same :-(

Server: Ci5 2500k, 3GB, Windows Server 2012, nPVR 3.5.7. 2xWinTV-DVB-T USB, 1xWinTV-DVB-T PCI, 2 x BlackGold DVB-T, 1xPCTV290E and 1xPCTV460E on Astra 28.2 E.
clients: RPI2, Acer R3700, PCH-A110, NUC, 3xSamsung Smart TV
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#3
2015-10-01, 03:28 PM
trummel Wrote:If I try to stream a recording directly to the Tizen's AVPlay tool, the player locks up for a minute or two and then barfs with a message from the tizen api saying "PLAYER_ERROR_CONNECTION_FAILED". An example of the stream URL is :-
Code:
http://192.168.0.101:8866/stream?recording=16702&resolution=1920x1080&bitrate=4096k&mode=http&mime=video/MP2T&client=SMARTTV
I don’t think the URL is valid. Paste it in the address field of a browser to see if it starts downloading or try playing the it in VLC.
I can’t recall /stream is able to take the property recording. Also resolution and bitrate seems odd for a non-transcoding streamer service.

You may try using /live instead of /stream it takes a recordingID but I can’t remember the correct syntax.
There should be an example in the source code I gave you. Lock in the “CheckActvity” section.
/Stream needs a filename as far as I know. You can snatch a valid one while debugging the app in Chrome or Firefox.

/Fred
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#4
2015-10-01, 03:51 PM
trummel Wrote:I'm working on a Tizen port of this App which is needed for 2015 Samsung TV's. I have a reliable way of playing either HD or SD recordings, but the process is different. Is there a simple way in javascript of identifiyng the H.264 encoded video so that I can handle it appropriately.

Don't think so unless your Tizen player API has a method for it.

In what way is the process different?
Are they both .ts files?

/Fred
matb33
Offline

Junior Member

Posts: 1
Threads: 0
Joined: Oct 2015
#5
2015-10-14, 12:55 PM
trummel Wrote:Further to this...

I'm building an app for Samsung 2015 Tizen TV's to handle NEXTPVR. Its mostly based on Fred250s excellent work on the previous Samsung Smart TV's.
If I try to stream a recording directly to the Tizen's AVPlay tool, the player locks up for a minute or two and then barfs with a message from the tizen api saying "PLAYER_ERROR_CONNECTION_FAILED". An example of the stream URL is :-
Code:
http://192.168.0.101:8866/stream?recording=16702&resolution=1920x1080&bitrate=4096k&mode=http&mime=video/MP2T&client=SMARTTV
...

I had the same error, i.e. "PLAYER_ERROR_CONNECTION_FAILED", and it turns out the culprit in my case was using
Code:
#EXT-X-VERSION:4
(we use it for
Code:
#EXT-X-I-FRAME-STREAM-INF
). Lowering it to version 3 made the stream play perfectly.

HTH
Mathieu
trummel
Offline

Senior Member

Posts: 276
Threads: 34
Joined: Oct 2008
#6
2015-10-26, 07:35 PM
I'm afraid my understanding of streaming doesn't stretch to how I would go about changing #EXT-X-VERSION:4 to #EXT-X-VERSION:3. I presume that gets encoded by Sub in the NextPVR engine.

I only use Samsung TV's and NEWA on RaspBMC now. To make the videos play and time skip work consistently on all of them, I've started using a postprocess script to convert the TS files to MP4. I now have a functional version of a NextPVR Tizen player that works on the IDE emulator. Unfortunately it refuses point blank to install on the TV :-(

Server: Ci5 2500k, 3GB, Windows Server 2012, nPVR 3.5.7. 2xWinTV-DVB-T USB, 1xWinTV-DVB-T PCI, 2 x BlackGold DVB-T, 1xPCTV290E and 1xPCTV460E on Astra 28.2 E.
clients: RPI2, Acer R3700, PCH-A110, NUC, 3xSamsung Smart TV
fred250
Offline

Senior Member

Posts: 457
Threads: 10
Joined: Jul 2006
#7
2015-10-27, 05:25 PM
Trummel,

What matb33 is referring to is a playlist file .m3u or .m3u8. Google it for details.
NextPvr doesn't provide these types of files. Newa does but doesn't contain the parameters matb33 is talking about.

As I mentioned earlier I'm quite certain the url you were trying to use doesn't work.
The /stream service has no property “recording”, you need to provide an f=filename or use /live streaming service which takes the property recording.

I know you were having trouble using the html5 <video> tag. Any change on that since postprocessing to mp4?

With later models of Samsung (not Tizen) there were problems installing my app.
I'm not sure why it was considered a security risk by the installer for “developer apps”, but I suspect knockout.js was to blame.
You can always try newer versions of knockout and jquery since the ones in the project are quite old by now.

Some googeling tells me Tizen itself seems to play nicely with both knockout and jquery, installing it onto the TV may be something else.

/Fred
trummel
Offline

Senior Member

Posts: 276
Threads: 34
Joined: Oct 2008
#8
2015-11-02, 12:15 PM
Unfortunately the MP4 transcode doesn’t solve the html5 playback problems. However I have managed to get to the point where I can play everything that I've transcoded in the SDK. Unfortunately, I cant test it on a Tizen TV as the latest update from Samsung seems to have destroyed the ability to load an app with the USB stick. Ironic, as this was supposed to be the 'Developer release' that should allow direct network loading, but that doesn’t work either. Even the most basic hello world app wont load. I'm waiting for someone at Samsung to get back to me.... Yawn....

Server: Ci5 2500k, 3GB, Windows Server 2012, nPVR 3.5.7. 2xWinTV-DVB-T USB, 1xWinTV-DVB-T PCI, 2 x BlackGold DVB-T, 1xPCTV290E and 1xPCTV460E on Astra 28.2 E.
clients: RPI2, Acer R3700, PCH-A110, NUC, 3xSamsung Smart TV
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode