LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Flash Video :: FlashXX And Streaming (https://www.linuxquestions.org/questions/linux-newbie-8/flash-video-flashxx-and-streaming-905821/)

cin_ 09-30-2011 02:46 PM

Flash Video :: FlashXX And Streaming
 
A few things. First I have a question...
The majority of Flash videos that I watch, YouTube and the like, save a file to my computer FlashXX* which I can save to my hard drive, or load into the video player I wish. This feature is fantastic due the times when the streaming player plays back the video poorly, I can just open up in my video player and everything is perfect. My question is this:

Why is it that some streaming players do not save a FlashXX, or other noticeable file to my computer?
For instance: southparkstudios.com, dailyshow.com, colbertnation.com?
The playback in these players is horrible for my little machine and wireless 3G, and I would like to play them in VLC instead.

Do these video players save the file to some other file name? Through some other process than firefox's plugin container libflashplayer.so?
They definitely use Flash... the only difference I see is these players only buffer to one minute's worth... is this the issue? Is it a client`side versus server`side issue? Is there a way to watch these videos streaming through my VLC?

I've tried the documentation...

---
Now, as for sites that do save their Flash video to /tmp/ I have written a script to find and use these files.

If you want to know which video files are being currently saved to your computer, type `ffxx`.
Want to watch one in VLC? Type `ffxx -vlc FILE_NAME(ish)`.
Want to copy it to your computer so you can watch it offline? `ffxx -cp FILE_NAME(ish) YOUR_COPY_NAME`.
...(ish) meaning you can really just type whatever makes that filename unique disregarding caps.
...if you want to use a different media player, just change the necessary code.

Code:

#!/bin/bash
ffxx () {
file /proc/*/fd/* 2>/dev/null | grep FlashXX | cut -f1 -d:
file /tmp/* 2>/dev/null | grep FlashXX | cut -f1 -d:
}
helper () { echo -e "usage: `basename $0` finds and manipulates Flash files on your computer\nusage: running `basename $0` without any options will display all available Flash video\nusage: `basename $0` [options] FILE\n -cp : copies the file specified by the second parameter to current directory\n -vlc : plays the file specified by the second parameter in VLC\n -h : displays this help dialogue\n    EXAMPLE:  ./ffxx -cp 17 FILE_NAME.flv"
}
if [ $# -eq 0 ]; then
        ffxx
else
        if [ $# -eq 2 ]; then
                case "$1" in
                        "-vlc") vlc `ffxx | grep -i $2`;;
                        "-h") heler;;
                        *) helper;;
                esac
        elif [ $# -eq 3 ]; then
                case "$1" in
                        "-cp") cp `ffxx | grep -i $2` $3;;
                        *) helper;;
                esac
        else
                helper
        fi
fi


Code:

# ls

# ffxx
/proc/1712/fd/17
# ffxx -cp 17
# ls
17

...if you have an older Flash plug-in it will save in /tmp/. As of version 10.3.183.10, September 30 2011, you will find your file as a symbolic link to the (deleted) file because Flash deletes the original file utilising the fact that while the plugin process is using the stream's file the system does not delete the inode storing its information.
...you can rename the file as you so please, or add an extra parameter to do it for you. These files load into VLC without extensions, but to see them in the Open prompt you will have to click All Files(*), or give them the proper extension .flv, or be a bit tricky and give them a false extension of a known video type, like .avi. All works fine.

craigevil 09-30-2011 04:14 PM

Video DownloadHelper :: Add-ons for Firefox - https://addons.mozilla.org/en-US/fir...ownloadhelper/

FlashVideoReplacer :: Add-ons for Firefox - https://addons.mozilla.org/en-US/fir...videoreplacer/

cin_ 09-30-2011 04:58 PM

Thanks craigevil for the reply, but these add-ons also do not seem to work for the sites I mentioned. Have any suggestions on use? I managed to get it to download a video from the site, and it turned out to be the commercial break between segments...

cin_ 09-30-2011 07:06 PM

lsof()
 
Still having lingering questions as to where the video file I am watching en stream is. I ran a test using lsof().

I sanitised my system of any unnecessary processes and then running as root logged the lsof() to a file. Then I opened Firefox. Went to dailyshow.com and the most recent episode. I ran the episode and while watching I again piped the lsof() to a different file. Next I waited for the minute buffer to fill and then ran lsof() once again and saved it to file. Finally, I went to YouTube, a service where I can track the stream on my computer, ran a video and did one last lsof().

I ran diff() on all of the files in pairs.
Here is the YouTube and dailyshow.com diff()`ed... piped through grep() to only show things pertaining to the running libplayer.so process...

Code:

# diff OFInitial.DS.PLAY OFInitial.DS.28553.28 | grep 28553
> plugin-co 28553      root  DEL      REG        0,4            7274501 /SYSV00000000
> plugin-co 28553      root  mem      REG        8,2  133088    755416 /usr/share/fonts/TTF/LiberationSans-Regular.ttf
< plugin-co 28553      root  mem      REG        8,2  133088    755416 /usr/share/fonts/TTF/LiberationSans-Regular.ttf
< plugin-co 28553      root  18u    IPv4    137403      0t0        TCP [IPHidden]->[IPHidden]:https (ESTABLISHED)
< plugin-co 28553      root  19u    IPv4    137396      0t0        TCP [IPHidden]->[IPHidden]:https (ESTABLISHED)
< plugin-co 28553      root  20u    IPv4    137387      0t0        TCP [IPHidden]->[IPHidden] (ESTABLISHED)
> plugin-co 28553      root  18u    sock        0,6      0t0    137403 can't identify protocol
> plugin-co 28553      root  19u    sock        0,6      0t0    137396 can't identify protocol
> plugin-co 28553      root  20u    sock        0,6      0t0    137387 can't identify protocol
< plugin-co 28553      root  22u    IPv4    137399      0t0        TCP [IPHidden]->[IPHidden] (ESTABLISHED)
> plugin-co 28553      root  22u    sock        0,6      0t0    137399 can't identify protocol
> plugin-co 28553      root  28u      REG        8,2  7257143    1087484 /tmp/FlashXXQwSdtY (deleted)
> lsof      29380      root    1w      REG        8,2        0    286434 /root/OFInitial.DS.28553.28

...the second to last one is the YouTube video... FlashXXQwSdtY, but still the dailyshow.com video is nowhere to be found. Anyone see anything I can't?


All times are GMT -5. The time now is 09:20 AM.