Stuttering streaming video

Booting, installing, newbie
Message
Author
Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#21 Post by Shep »

Béèm wrote:Nice solution Stu90.
Is it normal that mplayer only has the playing window without command control?
Substitute gmplayer for mplayer and you'll get a second window with the controls
Last edited by Shep on Sun 14 Aug 2011, 16:18, edited 1 time in total.

aarf

#22 Post by aarf »

this says that the video is being cached somwhere?
where is it if you want to make a copy. i used to be able to pull videos out of /tmp but opera-flashplayer are not putting them there now.

edit ok found it /mnt/sdb3/opera-next-11.50-1040.i386.linux/profile/cache/sesn/
looks like this attached

plays with gnome mplayer (in luci529)
Attachments
image-4.png
(2.03 KiB) Downloaded 980 times
Last edited by aarf on Sun 14 Aug 2011, 09:50, edited 1 time in total.

Bruce B

#23 Post by Bruce B »

If a person is really strapped for resources, he can download the media and play it with ffplay. (lupu 5.20 came with ffplay, not all puppies do)

When viewing media with ffplay, you can open htop and watch the cpu and some other resources.

If the problem is a very, very poor video card, maybe not so easy. But cards that poor have been, I think, obsolete for sometime now.

~

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#24 Post by Shep »

aarf wrote:i used to be able to pull videos out of /tmp but opera-flashplayer are not putting them there now.
Likewise with firefox. I believe I updated the flash plugin, and now it no longer caches in /tmp. Like you, I have to go digging around among dozens of video corpses buried in the Cache directory. Anyone know whether there's a setting to force the browser to again use /tmp for caching streaming media?

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#25 Post by Béèm »

For FireFox and SeaMonkey there is the extension flashgot to download to any directory you want.
You don't even have to wait until a video is played completely.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

Bruce B

#26 Post by Bruce B »

Something in the header instruction tells our browser to delete certain media, such as youtube media.

There is a way I know of in windows to control the header instructions. I don't know of a Linux way.

The media is played, then deleted.

I think if you watch careful you will find that it is still cached even after deletion. Play the media and watch it get deleted. Then immediately replay the media and watch it pop right back. It doesn't need to get downloaded again. Not by my observations.

Maybe the browser cached it in memory. However, my guess and at this point only a guess is Linux cached it.

~

aarf

#27 Post by aarf »

Shep wrote:
aarf wrote:i used to be able to pull videos out of /tmp but opera-flashplayer are not putting them there now.
Likewise with firefox. I believe I updated the flash plugin, and now it no longer caches in /tmp. Like you, I have to go digging around among dozens of video corpses buried in the Cache directory. Anyone know whether there's a setting to force the browser to again use /tmp for caching streaming media?
i dont have to dig it is the last one there when it has just opened in the browser.. if i close the browser it clears the cache. then open again and hardly anything to look through. browser opens at the page where it closes.

Bruce B

#28 Post by Bruce B »

stu90 wrote:try add this to the end of your /root/.bashrc file

Code: Select all

function flash-video() { 
 mplayer -cache 1000 $(stat -c %N /proc/*/fd/* 2>&1|awk -F[\`\'] '/lash/{print$2}') 
 }
now when you watch a video start it playing them immediately pause it so it keeps on loading then open a terminal and enter the command: flash-video

This will play the video in mplayer and not the web browser so should be a bit lighter on resources.
That is a great piece of work. I guess let the video buffer in with the browser then run the function.

At first glance, I wondered if the video is better than the flash player rendering. Maybe my imagination, think?

~

Bruce B

#29 Post by Bruce B »

It hasn't been mentioned to play with about:cache and see what one can discover. So, now it is mentioned.

~

User avatar
capoverde
Posts: 232
Joined: Wed 28 Jun 2006, 21:36
Location: Sanremo (Italy) with fine seaview

#30 Post by capoverde »

Hi all,

it seems that the latest versions of Flashplayer store streams in a subtler way than before, in order to make them invisible and unretrievable.

Thanks to Stu90's beautiful trick, the actual name and location of these files can be obtained simply by looking at the first lines in the terminal's output.

In my present box, an MSI U135 Wind netbook running LuPu525, the last stream is said to be:

/proc/27741/fd/15

which turns out to be a symlink to /tmp/FlashXXKFp7DS, reportedly a deleted file in /tmp which obviously doesn't show up.

But the file is actually still there, as it can be played back at will: it is probably written with a "?" or similar hiding prefix.

Even after playing two other streams I could replay a previous clip which had a wrong aspect ratio by calling

# mplayer -x 1280 -y 1024 <filename>

in the terminal, and it showed up with the right proportions (obtained by trial and error). It should also be possible to copy and save the full clip, haven't tried yet.

Lots of thanks Stu90! :D
Last edited by capoverde on Sat 20 Aug 2011, 20:09, edited 3 times in total.

User avatar
capoverde
Posts: 232
Joined: Wed 28 Jun 2006, 21:36
Location: Sanremo (Italy) with fine seaview

#31 Post by capoverde »

Sorry double post.

User avatar
capoverde
Posts: 232
Joined: Wed 28 Jun 2006, 21:36
Location: Sanremo (Italy) with fine seaview

#32 Post by capoverde »

Testing Lupu-528, it appears that (after adding Stu90's lines, see first page of this thread) the command "flash-video" is not recognized by ROXTerm, which is the default virtual terminal, but it is by Urxvt and works normally.

User avatar
Tman
Posts: 808
Joined: Sat 22 Jan 2011, 21:39
Location: Toronto

#33 Post by Tman »

Code: Select all

function flash-video() { 
 mplayer -cache 1000 $(stat -c %N /proc/*/fd/* 2>&1|awk -F[\`\'] '/lash/{print$2}') 
 }
What a great script, stu90. Thanks so much.

I took it a step further and packaged your script into a pet, with a menuitem for it in the Multimedia menu. I renamed the command to playflash.
Now, one can add the icon to the desktop or a quicklaunch bar, and can just click on the icon, instead of typing in the terminal. :wink:

- Click here to download playflash.pet -

enjoy!

stu90

#34 Post by stu90 »

Tman wrote:

Code: Select all

function flash-video() { 
 mplayer -cache 1000 $(stat -c %N /proc/*/fd/* 2>&1|awk -F[\`\'] '/lash/{print$2}') 
 }
What a great script, stu90. Thanks so much.

I took it a step further and packaged your script into a pet, with a menuitem for it in the Multimedia menu. I renamed the command to playflash.
Now, one can add the icon to the desktop or a quicklaunch bar, and can just click on the icon, instead of typing in the terminal. :wink:

- Click here to download playflash.pet -

enjoy!
Nice one Tman 8)

cheers.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#35 Post by Geoffrey »

stu90,

How nice is that, runs perfectly, your a legend.

Geoffrey

rhubarbcheese
Posts: 2
Joined: Sun 23 Oct 2011, 01:37

#36 Post by rhubarbcheese »

streaming video from icefilms.

I get it to work, but it seems to fill the memory after a while and it starts to lag quite enormously.

I've tried some settings in mplayer, changing the video output.

But this seems to be related to the OS(that it loads everything to the ram.)

How can I get the stream to cache the file onto the harddrive instead of directly into the memory?

now I was able to play 720p without stuttering on easypeasy linux, but eventually that crashed and was overall pretty slow on my hardware.

So I have downloaded puppy, I like it, but the streaming wont work(without stuttering) until it has cached the file completely. Anyway dont know what to do.

Shep
Posts: 878
Joined: Sat 08 Nov 2008, 07:55
Location: Australia

#37 Post by Shep »

rhubarbcheese wrote:streaming video from icefilms.

I get it to work, but it seems to fill the memory after a while and it starts to lag quite enormously.

I've tried some settings in mplayer, changing the video output.

But this seems to be related to the OS(that it loads everything to the ram.)

How can I get the stream to cache the file onto the harddrive instead of directly into the memory?
Icefilms doesn't seem to be a friendly site to stream from unless you are using their streaming player. But underneath the boxes "Choose a streaming method" there is a megaupload link and from there you can download the 700MB file. As you found, once it begins downloading you can start mplayer and begin watching the movie. But by default it downloads to /tmp and that's in RAM so as soon as your RAM is filled, Linux will crash. If you arrange for downloads to go to a directory where there is plenty of room on the hard drive, then it can continue downloading while you begin watching using mplayer. And when you are finished watching, you can watch it all over again because it has been saved to a HD file. To set where downloads are saved, in Firefox: Edit > Preferences and click the radio button "Always ask me where to save files" and at the time of downloading set it to the hard drive, e.g., /mnt/hda6

You don't have to wait for the complete file to download before starting to watch it. In the file manager, click on the file and open with mplayer. Though lag might be worse because the machine is busy downloading the file. Might be better to allow download to complete before viewing the movie.

On a low-power machine, if you can keep the viewing size to less than full screen, audio lag may not be as bad. Try it and see. There are plenty of options to play with when running mplayer on the command line, too.

.

Post Reply