WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: internet DATA usage  (Read 1944 times)

Offline cast-fish

  • Hero Member
  • *****
  • Posts: 1000
  • hi there
internet DATA usage
« on: January 13, 2016, 08:22:35 AM »
Hello,

if anybody is interested in using much much less internet data.....?....... then there are some nice tricks you can do regarding Youtube (and others online services)

You may already know that you can watch youtube movies and videos
inside a media player  (although their TOS may mention only web browsers are allowed)

But i have managed to stream youtube videos to a full screen laptop by using the tiny "cell phone file format" of the video ( .3gp format)


The video quality is more than acceptable at full screen and it seems the sound quality is almost no different.

Using this method of streaming takes 10 times less data than how the youtube web page would normally deliver that same video to your web browser.

So the media player i use is VLC to stream the youtube video.    (mplayer can work for me....but only if you download that link and not stream it)

1) Go to youtube.com and find a video that interests you by whatever method you
usually use
2) Copy the Video link from 1) to your clipboard
3) Paste the link from 2) into here ----   http://waptiny.com/  (click search)
4) Click on the found  video in (3) and scroll down and right click the LAST download link   (.3gp)  copy that link to clipboard.
5) Paste the link from (4) into VLC by selecting (open media steam)

The video will now start playing and you can do tricks like "aspect ratio" and "deinterlace" to get a good picture and hit the max button to get full screen.


Sometimes the video stops....but you just restart it and scroll to the cut off
point again.

There are many of these youtube (cell phone) clone web sites. 

1) wapnor.net
2) http://ysearch.mobi/

best wishes


My next challenge is to find an online transcoding website....which can transcode
in realtime whatever web page you give it (a page containing a regular FLV playing video.)  transcoded down to .3gp and made available.



« Last Edit: January 13, 2016, 08:25:21 AM by cast-fish »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: internet DATA usage
« Reply #1 on: January 13, 2016, 01:43:40 PM »
Or youtube-dl

Here is a script for simplifying things:
Code: [Select]
#!/bin/sh

[ -e /usr/local/tce.installed/perl5 ] || tce-load -i perl5
[ -e /usr/local/tce.installed/python ] || tce-load -i python


echo -en "\033]0;YouTube-DL $@\007"

RED="\033[1;31m"
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
BLUE="\033[0;34m"
MAGENTA="\033[0;35m"
CYAN="\033[0;36m"
GRAY="\033[1;30m"
WHITE="\033[1;37m"
NORMAL="\033[0m"


YOUTUBEDL="youtube-dl"

if [ ! "$(which $YOUTUBEDL)" ]; then
echo -e " ${CYAN}youtube-dl not found${NORMAL}."
echo -e " ${YELLOW}Attempting to download${NORMAL}... \"${BLUE}$HOME/.local/bin/${GREEN}youtube-dl${NORMAL}\""
wget -P "$HOME/.local/bin" https://yt-dl.org/downloads/latest/youtube-dl
fi

DIR="$PWD"
if [ -d "$1" ] ; then
DIR="$1"
shift 1
fi

URL="$@"

if [ "$(which smplayer)" ]; then
# SMPlayer
MEDIAPLAYER="smplayer"
MEDIAPLAYEROPTS="-add-to-playlist"
MEDIAPLAYERREMOTECMD="-send-action play"
elif [ "$(which mplayer)" ]; then
# MPlayer
MEDIAPLAYER="mplayer"
fi

f_download_vid() {
echo -e "\n ${GREEN}Starting download...${NORMAL}\n"
"$YOUTUBEDL" --no-call-home --console-title \
--no-playlist --restrict-filenames --write-description \
--format "$FORMAT" --continue --no-part \
--exec 'echo -e "\n\033[00;32m Done\033[0m.\n Press the [\033[00;33mANY\033[0m] key to play file. [\033[00;33mCTRL\033[0m]+[\033[00;33mC\033[0m] to quit.\033[0m" ; read -n1 junk ; [ -n "'"$MEDIAPLAYER"'" ] && ( [ "$(pidof '$MEDIAPLAYER')" ] && ( ( nohup '"$MEDIAPLAYER"' '"$MEDIAPLAYEROPTS"' {} >/dev/null 2>&1 & ) ; [ -n "'"$MEDIAPLAYERREMOTECMD"'" ] && nohup '"$MEDIAPLAYER"' '"$MEDIAPLAYERREMOTECMD"' >/dev/null 2>&1 & ) || ( nohup '"$MEDIAPLAYER"' {} >/dev/null 2>&1 & ) )' \
--output "$DIR"'/%(title)s--%(uploader)s--%(width)sx%(height)s--%(id)s.%(ext)s' "$URL"

#--write-description --write-annotations \
#--exec 'mplayer' \

if [ "${?}" -eq 0 ] ; then
YTDL_ERROR=""
else
YTDL_ERROR="ERROR"
read -n1 junk
fi
}

f_show_menu() {
echo -e "\n ${RED}You${WHITE}Tube${NORMAL}-DL"
echo -e "\n ${CYAN}DIR${NORMAL} = ${BLUE}$DIR"
echo -e " ${CYAN}URL${NORMAL} = ${GREEN}$URL"
echo -e "\n ${YELLOW}Choose${NORMAL} format to download:\n"
echo -e " [${YELLOW}1${NORMAL}]\t3gp\t320x180"
echo -e " [${YELLOW}2${NORMAL}]\tflv\t400x240"
echo -e " [${YELLOW}3${NORMAL}] ${GRAY}*${NORMAL}\tmp4\t640x360"
echo -e " [${YELLOW}4${NORMAL}]\tmp4\t1280x720"
echo -e " [${YELLOW}5${NORMAL}]\t\t(best)"
echo -e "\n [${YELLOW}A${NORMAL}]\tm4a\tAudio only"
echo -e "\n [${YELLOW}L${NORMAL}]\tList available formats..."
echo -e " [${YELLOW}F${NORMAL}]\tEnter format code..."
echo -e "\n [${YELLOW}Q${NORMAL}]\tQuit"
}

f_read_junk() {
echo -en "\n${GRAY}> ${GREEN}"
read -n1 junk
echo -en "${NORMAL}"

FORMAT=""

case ${junk} in
1)
echo ""
FORMAT="36" # 3gp        320x180
;;
2)
echo ""
FORMAT="5" # flv        400x240
;;
3)
echo ""
FORMAT="18" # mp4        640x360
;;
4)
echo ""
FORMAT="22" # mp4        1280x720
;;
5)
echo ""
#echo -e " ${CYAN}Checking for \"best\" available format...${NORMAL}"
#BEST=`"$YOUTUBEDL" --no-call-home --list-formats "$URL" | grep -m1 "(best)"`
#echo -e " ${YELLOW}$BEST${NORMAL}"
#FORMAT=`echo "$BEST" | cut -d " " -f1`
FORMAT="best"
;;
a|A)
echo ""
FORMAT="140" # m4a        audio only        128k
;;
l|L)
echo -e "\n\n ${CYAN}Checking available formats...${NORMAL}\n"
"$YOUTUBEDL" --no-call-home --list-formats "$URL"
f_show_menu
;;
f|F)
echo -e "\n\n\n (See [${YELLOW}L${NORMAL}] option for available format codes; Press just [${YELLOW}ENTER${NORMAL}] to get back.)"
echo -e " ${BLUE}Enter format code${GRAY}..."
echo -en "\n> ${GREEN}"
read FORMAT
echo -en "${NORMAL}"
[ -z $FORMAT ] && f_show_menu
;;
q|Q)
echo ""
exit 0
;;
[a-z]|[A-Z])
echo -e "\n${CYAN}Bad input${NORMAL}."
;;
*) FORMAT="18"
;;
esac
}

f_show_menu

while true
do
if [ -z $FORMAT ] ; then
f_read_junk
else
f_download_vid
if [ "$YTDL_ERROR" = "ERROR" ] ; then
f_show_menu
f_read_junk
else
break
fi
fi
done

echo -e "\033[00;33m Done.\033[0m "

Download a copy and keep it handy: Core book ;)

Offline cast-fish

  • Hero Member
  • *****
  • Posts: 1000
  • hi there
Re: internet DATA usage
« Reply #2 on: January 13, 2016, 02:22:54 PM »
yes there are lots of tools like  the one you mention Mislaf

youtube-dl

infact there are some which work better.

However those tools are actually downloading the video....and i don't think they are "Streaming" the movie to a media player...

or maybe your script does?


another advantage of the 3gp idea which i forgot to mention is.............

........any streaming of the 3gp version of a youtube video uses about 10 kilobytes per second......nearly ALL cell phones  are capable of supporting that speed...... even 2G cell phones. (5 dollar phones)...tethered over USB to your laptop screen....

even bluetoothe is CLOSE to streaming at that speed (from a cell phone)

so if you buy  2 gigs of data (on your cell network) for about 3 bucks......... you would be good to go with 70 youtube documentaries each of an HOUR duration....(and regular web surfing on the side).

Thats a lot of full screen movies............ if you ask me.......

i also find that this 3gp idea is very nice for listening to ALBUMS.....it uses very small amounts of data....about 10 times less than what a CD album normally needs

V




« Last Edit: January 13, 2016, 02:24:59 PM by cast-fish »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: internet DATA usage
« Reply #3 on: January 13, 2016, 02:58:55 PM »
I often use youtube-dl to download specific file types like 3GP with my slow connection, that's why I mentioned it.
I think there are ways to stream to MPlayer but I didn't got it to work, however, I prefer being able to skip back/forward in the video without re-downloading. Not sure if VLC behaves that "friendly" compared to real files.
Download a copy and keep it handy: Core book ;)

Offline cast-fish

  • Hero Member
  • *****
  • Posts: 1000
  • hi there
Re: internet DATA usage
« Reply #4 on: January 13, 2016, 04:26:30 PM »
Hello

yes VLC does play friendly with 3gp streaming files. You can skip to
anyplace instantly.....and at any time

V
« Last Edit: January 13, 2016, 04:28:03 PM by cast-fish »