Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals

Post a New Reply
Reply to thread: SVT Play ( plugin?
Post Subject:
Post Icon:

Your Message:
:) ;) :cool: :D
:P :rolleyes: :shy: :(
:lightbulb: :angry: :-/ (A)
:heart: :dodgy: :blush: :huh:
:my: :sleepy: :exclamation: :S
[get more]
Post Options:
Thread Subscription:
Specify the type of email notification and thread subscription you'd like to have to this thread. (Registered users only)

You are currently using N/A of your allocated attachment usage (Unlimited) [View My Attachments]
New Attachment:

Thread Review (Newest First)
Posted by claan719 - 06-11-2012 12:31 PM
+1 from me. Otherwise I'll have to get a boxee instead of a new PCH.
Posted by mikasand - 11-22-2011 02:06 PM
Hello, why bother about Popcorn Hour products when there are no support (interest / poor attitude) to develop some Swedish TV streaming App at all, and no Spotify app ??
We want SVT Play, TV3 Play, TV4 Play, Kanal 5 Play, Support for Aftonbladet TV, Expressen TV. All using Flash disstribution. How hard can it be for someone clever App developer at Popcorn Hour???

Unfortunally I am about to replace my A-200 with a Boxee, since Boxee now supports most swedish streaming TV services and also Spotify, and there are also tons of other apps to download....

I guess there will be no more Swedish customers buying Popcorn Hour, unless there is a big change of Popcorn Hour attitude to all Swedish customers.
Posted by zztop3 - 11-21-2011 08:03 PM
(07-05-2011 08:26 AM) Wrote:  I am an A-100 owner very happy with this product and now i am about to buy a a-210 but it seems like it does not support SVT play which is a dealbreaker for me. Is there any progress in this app ?

Where are we today in this matter?
Posted by - 07-05-2011 08:26 AM
I am an A-100 owner very happy with this product and now i am about to buy a a-210 but it seems like it does not support SVT play which is a dealbreaker for me. Is there any progress in this app ?
Posted by Loptec - 06-15-2011 08:06 PM
Absolutely. I'd love this feature on popcorn.
This doesn't seem to be a feature with very high priority though (none at all).

For us in Sweden this would make popcorn SO much more worth the price.

Now, without this feature, it just makes popcorn hour an incomplete media player.
Sure, it IS a great media player. But still, compared to others, it won't be no1. (here in Sweden) until this feature is there.

I've been a big popcorn hour fan since the start. I started out with a NMT A-100 and it was the best when it came. I just loved it!
Today I've got the C-200 and the competition on the market is MUCH harder.

If SVTplay isn't an interesting enough feature to make available on NMT I don’t think NMT will be an interesting player for us in Sweden to buy in the future.

At the moment I’m thinking of buying a boxee to get this feature, just because of the total lack of interest from the gang behind NMT.

I think that's sad because i really love the popcorn hour. But it just doesn't have everything I need..
Posted by zztop3 - 06-15-2011 07:06 PM
would be a nice feature on the PCH

Posted by Loptec - 05-21-2011 07:37 PM
...We'll never see this on popcorn, right..? Sad
Posted by jabba - 04-03-2011 01:19 PM
It's very easy to install it to Xtreamer, just copy the downloaded files to the Xtreamer when it's connected whith USB to the computer.

There is a full description in the Xtreamer forum.
I've just did it and it works perfect.
Posted by seven47 - 03-10-2011 06:46 PM
+1 here also !
Posted by csoop - 02-13-2011 11:02 AM
+1 for me as well
Posted by Digitus - 01-23-2011 10:32 PM
(01-09-2011 10:58 AM)carlsberg Wrote:  Any news on this ? Just installed svtplay on my xtreamer , finaly some use for that Smile

I'm just wondering how you installed the svtplay-plugin? I downloaded it from the link that Cyberott shared, but now I'm stuck.

Would be very grateful for some help =)
Posted by carlsberg - 01-09-2011 10:58 AM
Any news on this ? Just installed svtplay on my xtreamer , finaly some use for that Smile
Posted by dc11ab - 12-16-2010 02:22 PM
Interesting, looks like a mashup of python, php and uses rtmpgw instead of rtmpdump. Essentially my script does the same, but it is of course only very crude and rudimental in comparison.

The obvious advantage is that Xtreamer appears to support the .FLV container, whereas we'd have to remux and/or transcode on the NMT first. Damn SVT for using Flash and not real MP4! Dodgy
Posted by Cyberott - 12-16-2010 01:40 PM
Hi folks!

I noticed today that there is a SVTplay solution out for Xtreamer (you know that ugly mediaplayer...). It seems to be quite a good one...

Here is the app for Xtreamer:

Another download link:

You can read on their forum: (you have to register)

Maybe something to build from for PCH??
Posted by dc11ab - 12-11-2010 09:08 PM
I'm not that skilled and have too little time, so here's the ugly source for anyone who wants to help out, fork their own or just get inspired. It's WTFPL Wink

Note that this is nothing fancy. It simpler to perform this operation on a PC and then transfer the file to the NMT. But at least the script semi-automates the process a bit.


# svtplayrip downloads a video file from, remuxes it for use on a Popcorn Hour
# media player, adds a media info file (.nfo) and grabs a small poster file (.jpg)
# Copyright 2010 by dc11ab, licensed under the WTFPL
# This script is intended to be run on a Popcorn Hour C200, but can probably run on
# most *nix systems.
# Notable requirements: rmtpdump, mediainfo, ffmpeg (available in ipkg feed)

# Get input to script

# Simple input validator
[[ -z "$1" ]] && { echo -e "\n Usage: $0 [ link]\n\n Example:\n\t$0,p103549,1,f,-1\n"; exit; }

# Simple url validator
response=`wget -S --spider $URL 2>&1 |grep "HTTP/1.1 200 OK"`
echo " Server response on URL is: $response"
if [[ $result == 0 ]]; then
echo -e " URL exists, attempting to download source page.\n"
    echo -e " ERROR: Failed to connect to URL:\n\t $1\n"
    exit 1

# Fetch source file from
wget -q -O - $URL > flashpage
[[ $wgetresult > 0 ]] && { echo "ERROR: Could not fetch SVTPlaypage."; exit; }

# Do sed magic and cut out the link
LINK=`sed -n '/dynamicStreams/{p;q;}' flashpage |cut -d ',' -f1 |cut -d ':' -f2-3`
if [[ $LINK == '' ]]; then
    echo " ERROR: No rtmp(e) link found!"
    LINKHTTP=`sed -n '/external-player/{p;q}' flashpage |cut -d '"' -f6 |cut -d '"' -f 1`
    if [[ $LINKHTTP == '' ]]; then
        echo " ERROR: No http link found! Exiting."
        exit 3
        echo "$LINKHTTP" > linkfile                            #DEBUG, saving the link to a file
        echo -e " Found link:\n $LINK\n"
    echo "$LINK" > linkfile                            #DEBUG, saving the link to a file
    echo -e " Found link:\n $LINK\n"

# Get filename and extension
# Examples, one original SVT Play link:
# rtmpe://
# Gives filename: PG-1135394-002A-VARLDENSKONFLIK-01-mp4-e-v1.mp4
# (Program?)-(unknown serial, unique ID?)-(unknown, episode 2?)-(Short title)-(unknown serial)-(container)-(bitrate variable)-(unknown variable).(file extension)
# If no rtmp(e) link is found, there is typically a .flv over http:
# Gives filename: OA-2009-1209-UNGDOMSKLUBB-TK102742_mob.flv
# (OA=Öppna Arkivet)-(Year?)-(Month-date?)-(Short title)-(unknown serial_mob?).(file extension)
# Note: figure out naming convention..
FILE=${LINK##*/}                        # File, e.g.            "SomeClip.mp4"
FILENAME="${FILE%.*}-svtplayrip"         # File name, e.g        "SomeClip"
EXT=${LINK##*.}                            # File extension, e.g.    "mp4"

# Depending upon what file extension we get we can make some conditions.
# Err.. can't think of anything smart right now so this will do:
# Simple file extension validator
case $EXT in
[mM][pP][4]) echo " Found .mp4"
[fF][lL][vV]) echo " Warning: the found clip is in Flash format, it will probably not play on the NMT."
[mM][pP][3]) echo -e " Warning: the found clip is not a video format. Exiting script.\n"
    exit 5
  echo -e " ERROR: Unknown file extension. Exiting script.\n"
  exit 4

echo -e " Attempting to save file as: $FILENAME.$EXT\n - this can take a while.\n"

# Grab the video
# If it's rtmp*:// use rtmpdump, if http*:// use wget, else exit
DLMETHOD=`echo $LINK |cut -d ':' -f 1`
case $DLMETHOD in
[rR][tT][mM][pP]*) echo " We have rtmp-link, using rtmpdump."
    rtmpdump -r $LINK -o $FILENAME.$EXT
[hH][tT][tT][pP]*) echo " We have http-link, using wget."
    wget $LINK -o $FILENAME.$EXT
    echo $?
    if (( $? == 0 )); then
        echo -e " Downloaded $FILENAME.$EXT to `pwd`\n"
        exit 99
        echo -e " ERROR: Download failed! Exiting.\n"
        exit 98
*) echo -e " ERROR: No known prefix to download link. Exiting.\n"
    exit 7

# SVT uses .mp4 extension while it really is a Flash .flv container.
# As such, it does not play on the NMT's, at least with firmware in Dec 2010.
# Video and audio is typically OK: h.264 (MPEG4-AVC) for video and AAC sound.
# So we should be able to do a simple remux to a true MP4 container:
#ffmpeg -i $FILENAME.$EXT -vcodec copy -acodec copy $FILENAME-fixat.$EXT # real MP4
ffmpeg -i $FILENAME.$EXT -vcodec copy -acodec copy $FILENAME.$EXT
# Alternative: remux to .mkv container
#ffmpeg -i -y $FILENAME.$EXT -vcodec copy -acodec copy $FILENAME.mkv
if (( $? != 0 )); then
    echo -e " Warning: Could not remux file! Exiting.\n"
    exit 11

# Psuedo code if ffmpeg transcoding would have worked.
#echo "Extension is:"$EXT":" #DEBUG
#if [ "$EXT" == "flv" ]; then
#    echo " Need to transcode Flash to x264, this could take a while..."
#    ffmpeg -sameq -i "$FILENAME.$EXT" "$FILENAME-svtplayrip.mp4"
#elif [[ "$EXT" == "mp4" ]]; then
#    ffmpeg -i -y $FILENAME.$EXT -vcodec copy -acodec copy $FILENAME.$EXT
# exit 8

# Fixing permissions so we can see it in NMT interface
chown nmt:nmt $FILENAME.$EXT

# Get mediainfo: codecs, container formats etc.
# Getting content info from SVT Play page
echo -e "\n\n ---- SVTPlayrip ----------------------------------\n\n" > $FILENAME.nfo
Source_provider=`grep og:site_name flashpage |cut -d '"' -f 4`
[[ !$Source_provider=="" ]] && echo -e "Source:\t\t$Source_provider" >> $FILENAME.nfo
Title=`grep og:title flashpage |cut -d '"' -f 4`
[[ !$Title=="" ]] && echo -e "Title:\t\t$Title\n" >> $FILENAME.nfo
Description=`grep og:description flashpage |cut -d '"' -f 4`
[[ !$Description=="" ]] && echo -e "Description:\n$Description\n" >> $FILENAME.nfo
Episodeinfo=`grep additional-info flashpage |sed -e 's/^[ \t]*//'|cut -d '<' -f 1`
[[ !$Episodeinfo=="" ]] && echo -e "Episode info:\n$Episodeinfo\n" >> $FILENAME.nfo
echo -e "Ripped on:\t`date +%Y%m%d`" >> $FILENAME.nfo
echo -e "Saved as:\t$FILENAME.$EXT" >> $FILENAME.nfo
if [[ -f $FILENAME.nfo ]]; then
    echo " Created $FILENAME.nfo with content information"
    echo " Warning: Could not create content info file $FILENAME.nfo"
echo -e "\n\n ---- MEDIA INFO ----------------------------------\n\n" >> $FILENAME.nfo
mediainfo $FILENAME.$EXT >> $FILENAME.nfo
chown nmt:nmt $FILENAME.nfo

# Getting poster
if [[ -f "$FILENAME.jpg" ]]; then
    echo " Warning: Poster already exist!" # But here we download anyway
    Poster_url=`grep og:image flashpage |cut -d '"' -f 4`
    if [[ !$Poster_url=="" ]]; then
        wget -q $Poster_url -o $FILENAME.jpg
        chown nmt:nmt $FILENAME.jpg    # Fix permissions to make it visible via NMT interface
        echo -e " Warning: Could not get poster!"
echo -e "\n Finished.\n"
exit 0

Apart from shell/telnet it needs rtmpdump, ffmpeg and mediainfo. I think all of those three are in the ipkg feed (see separate thread). Remember to check that they are in $PATH and that LD_LIBRARIES are loaded.

To run, put it somewhere on your local hdd in a file called, chmod +x and do:
./ [SVT Play web page http link]

For example

Can't get ffmpeg available in ipkg feed to transcode:
# ffmpeg -sameq -i input.flv output.mp4
ffmpeg: /share/Apps/local/lib/ no version information available (required by /share/Apps/local/lib/
ffmpeg: /share/Apps/local/lib/ no version information available (required by /share/Apps/local/lib/
So if you download a SVT Play-link containing .flv with VP6 codec (aka old Adobe Flash format) it will just download it and you'll have to fix it yourself from there. Alternative solutions are much welcome! I'll have a stab at recompiling ffmpeg but it's not something I think I'm capable of.

This script is not safe. If something breaks you get to keep all pieces. Use at your own risk. And it's intended for educational purposes, of course.

EDIT: I get somewhat jerky video and it does not appear to be "720p" version. Regard this script as a proof of concept only.
This thread has more than 15 replies. Read the whole thread.