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 (svt.se/play) plugin?
Username:
Post Subject:
Post Icon:


Your Message:
Smilies
:) ;) :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)




Attachments
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)rsvoren@gmail.com 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 rsvoren@gmail.com - 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

//zz
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

Hi!
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:

http://forum.xtreamer.net/index.php?app=...ch_id=7444

Another download link:

http://www.mediafire.com/?1n1vcvoym16ge71

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

http://forum.xtreamer.net/topic/18500-sv...ntry156587

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.

Code:
#!/bin/sh
# svtplayrip.sh
version="0.4"

# svtplayrip downloads a video file from SVTplay.se, 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
URL=$1

# Simple input validator
[[ -z "$1" ]] && { echo -e "\n Usage: $0 [SVTPlay.se link]\n\n Example:\n\t$0 http://svtplay.se/v/2244212/varldens_konflikter/del_2_av_6__thailand?sb,p103549,1,f,-1\n"; exit; }

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

# Fetch source file from SVTPlay.se
wget -q -O - $URL > flashpage
wgetresult=$?
[[ $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
    else
        echo "$LINKHTTP" > linkfile                            #DEBUG, saving the link to a file
        LINK="$LINKHTTP"
        echo -e " Found link:\n $LINK\n"
    fi    
else
    echo "$LINK" > linkfile                            #DEBUG, saving the link to a file
    echo -e " Found link:\n $LINK\n"
fi

# Get filename and extension
# Examples, one original SVT Play link:
# rtmpe://fl11.c90909.cdn.qbrick.com/90909/_definst_/kluster/20101124/PG-1135394-002A-VARLDENSKONFLIK-01-mp4-e-v1.mp4
# 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:
# http://www0.c00928.cdn.qbrick.com/00928/kluster/20091216/OA-2009-1209-UNGDOMSKLUBB-TK102742_mob.flv
# 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"
    break
    ;;
[fF][lL][vV]) echo " Warning: the found clip is in Flash format, it will probably not play on the NMT."
    break
    ;;
[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
  ;;
esac

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
    break
    ;;
[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
    else
        echo -e " ERROR: Download failed! Exiting.\n"
        exit 98
    fi
    ;;
*) echo -e " ERROR: No known prefix to download link. Exiting.\n"
    exit 7
    ;;
esac

# 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
fi

# 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
#else
# exit 8
#fi

# 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"
else
    echo " Warning: Could not create content info file $FILENAME.nfo"
fi
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
else
    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
    else
        echo -e " Warning: Could not get poster!"
    fi
fi
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 svtplayrip.sh, chmod +x and do:
./svtplayrip.sh [SVT Play web page http link]

For example
./svtplayrip.sh http://svtplay.se/t/136476/starke_man

Issues:
Can't get ffmpeg available in ipkg feed to transcode:
Code:
# ffmpeg -sameq -i input.flv output.mp4
ffmpeg: /share/Apps/local/lib/libasound.so.2: no version information available (required by /share/Apps/local/lib/libavdevice.so.52)
ffmpeg: /share/Apps/local/lib/libasound.so.2: no version information available (required by /share/Apps/local/lib/libavdevice.so.52)
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.