Modify

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#3394 closed enhancement (fixed)

GPL FLV Player for MythWeb

Reported by: anonymous Owned by: xris
Priority: major Milestone: unknown
Component: mythweb Version: head
Severity: low Keywords: flv, flash
Cc: Ticket locked: yes

Description

A new GPL FLV player written in Flex 2. It has the following features:

  • Play/Pause/Stop? controls
  • Seek controls
  • Volume controls
  • Progressive download progress bar
  • Full screen video mode
  • Fully skinnable using CSS

I have gone through and edited to the necessary MythWeb files to add this player and attached them.

  • Jean-Philippe Steinmetz

Attachments (8)

mythweb.rar (191.1 KB) - added by caskater47@… 8 years ago.
mythweb2.rar (188.6 KB) - added by caskater47@… 8 years ago.
New working version (i promise!)
mythweb3.rar (188.6 KB) - added by caskater47@… 8 years ago.
Fixed jscript to remove history.js dependency
MFPlayer.swf (173.1 KB) - added by caskater47@… 8 years ago.
MFPlayer.2.swf (173.6 KB) - added by caskater47@… 8 years ago.
mythwebcss.diff (617 bytes) - added by hads 8 years ago.
Workaround for weird css issue in Konqueror
handler_patch.bz2 (644 bytes) - added by jakeisawake@… 8 years ago.
this patches handler.pl so if you already have your recordings transcoded to .flv it does not need to code them on the fly and instead reads from the already coded files
MythFlash.rar (116.1 KB) - added by caskater47@… 8 years ago.
Source files for MFPlayer (MythWeb Flash player)

Download all attachments as: .zip

Change History (56)

Changed 8 years ago by caskater47@…

comment:1 Changed 8 years ago by xris

a few minor issues:

  • It shouldn't auto-start. Needs to show the pixmap by default, but not request the flv until the user clicks the play button (otherwise, too many transcode processes would start on the server).
  • The artwork is a little weird for me. No text in the buttons, and it doesn't seem to fit in the space allotted.
  • Minor setup issues like missing call for FL_history.js, js typo in detail.php
  • Next time, a diff is much easier for the changes to the php files. That way, other dev work in the same files doesn't interfere.

comment:2 Changed 8 years ago by msn@…

OK i was only able to get the player to display (after fixing a couple javascript bugs), not actually play anything.

If you browse directly to mythweb/tv/MFPlayer.swf there *is* artwork in the buttons, but embedded on the details page the buttons are a single opaque color for me (I assume this is what xris was talking about too).

comment:3 Changed 8 years ago by caskater47@…

I've corrected the following:

  • Added support for pixmap
  • Turned off autoStart.
  • The artwork wasn't being loaded due to an issue with linking. This has been corrected. Should look much better now.
  • I've removed FL_history.js and fixed the other minor issues.
  • I'm not familiar with a diff file, sorry.

Adding the new file as mythweb2.rar

Changed 8 years ago by caskater47@…

New working version (i promise!)

Changed 8 years ago by caskater47@…

Fixed jscript to remove history.js dependency

comment:4 Changed 8 years ago by freedenizen@…

let me know when you are set with the install and I will help you generate the diffs. I tested with the latest email you sent me and it looks pretty good. I see an issue where all the buttons and controls disappear (not just the skin) but that may be an OS X issue. Flash implementation in os x leaves much to be desired. Feel free to poke around my system some more.

Changed 8 years ago by caskater47@…

comment:5 Changed 8 years ago by caskater47@…

I've updated the following:

  • Redesigned pixmap to be separate component
  • Clicking pixmap now required to show/load player
  • Seek bar time now updated with every interval
  • Other minor fixes

Changed 8 years ago by caskater47@…

comment:6 Changed 8 years ago by caskater47@…

More bug fixes and feature enhancements:

  • Pixmap now shows video controls
  • Seeking now goes to the correct time when clicking or dragging anywhere on the bar
  • Can now backwards seek for streamed videos with unknown total length
  • autoPlay FlashVar? has been removed due to pixmap
  • A new FlashVar? totalTime has been added to give the player a total length for video which will be used for seeking. If the length is incorrect, the player will adjust accordingly.

comment:7 Changed 8 years ago by xris

(In [13406]) re #3394, add first complete rev of Jean-Philippe's GPL flv player to replace support for non-gpl-compatible flvplayer.swf and/or FlowPlayer?.

comment:8 Changed 8 years ago by tim at insipid dot org dot uk

after going full screen and then back to windowed flash player controls disappear

comment:9 Changed 8 years ago by gkruse

I see the disappearing controls as well. Also, seeking doesn't work in either Firefox or Safari on the Mac. Good work though, this has a lot of potential.

comment:10 Changed 8 years ago by anonymous

Please make sure you are using the latest Flash player, 9.0.45.

Jean-Philippe

comment:11 Changed 8 years ago by gkruse@…

Jean-Philippe,

I'm using the version of flash you mentioned, updated this morning. Still see the problems I mentioned.

Geoff

comment:12 Changed 8 years ago by xris

fyi, only backwards seeking works. Can't seek forward because the file is encoded on the fly.

Changed 8 years ago by hads

Workaround for weird css issue in Konqueror

comment:13 Changed 8 years ago by hads

The 'ASX Stream' button was sitting on top of the flash player controls in Konqueror, possibly a bug in KHTML with the negative margin that was being used.

The tiny patch attached (mythwebcss.diff) works around this making it display correctly in Konqueror. It still appears fine in Firefox.

comment:14 Changed 8 years ago by elkin@…

It seems like the flash player does not honor 16:9 content as it is showed as 4:3

comment:15 follow-up: Changed 8 years ago by xris

That is correct. We currently have no way to detect aspect ratio.. The backend will eventually gather/store this information somewhere that MythWeb can access it, and then we can auto-size in the flv playback.

Changed 8 years ago by jakeisawake@…

this patches handler.pl so if you already have your recordings transcoded to .flv it does not need to code them on the fly and instead reads from the already coded files

comment:16 Changed 8 years ago by xris

caskater, any chance you can post the source for these files so that other people can continue to improve the player?

Changed 8 years ago by caskater47@…

Source files for MFPlayer (MythWeb Flash player)

comment:17 Changed 8 years ago by caskater47@…

Yes, of course. I've added the source files. The source was created with the intention to develop a full flash frontend for Myth, so the packages are structured with this idea in mind. The file also includes the Flex Builder project files. I've been meaning to finish the skin for the player but just haven't hide time so maybe someone can tidy that up.

comment:18 in reply to: ↑ 15 Changed 8 years ago by anonymous

Replying to xris:

That is correct. We currently have no way to detect aspect ratio.. The backend will eventually gather/store this information somewhere that MythWeb can access it, and then we can auto-size in the flv playback.

Paul Harrison did some work on aspect ratios for mytharchive, that's if I remember correctly? There is a "helper" for mytharchive, and I think it may be possible to use it to detect the aspect ratio. Forgive me if I am wrong, but it might be worth dropping him a quick line to enquire? Cheers, Jim Hayes.

comment:19 follow-up: Changed 8 years ago by anonymous

I expect it is too late to ask: Can you use anything other than an Adobe product? They are security risks and a moral risk. Please try Gnash, at least it would be free source working with free source. Something that can't get out of a sandbox - please http://it.slashdot.org/article.pl?sid=07/07/16/156233 and I apologize for the /. ref

comment:20 in reply to: ↑ 19 Changed 8 years ago by caskater47@…

Replying to anonymous:

I expect it is too late to ask: Can you use anything other than an Adobe product? They are security risks and a moral risk. Please try Gnash, at least it would be free source working with free source. Something that can't get out of a sandbox - please http://it.slashdot.org/article.pl?sid=07/07/16/156233 and I apologize for the /. ref

This is completely irrelevant. Gnash is a runtime environment for Flash/Flex? applications, it is not the application itself. If Gnash supports the latest Flex 2 libraries (which are now open source) then it should be able to run this application. If you can get it to run under Gnash, then great, let us know which version it works with.

comment:21 Changed 8 years ago by t0ny

I hope this does not sound stupid but how do I get this to work? I downloaded the mythweb*.rar files and unrared them into my mythweb folder.

Thanks for the help! And keep up the good work.

comment:22 Changed 8 years ago by xris

You need mythweb from svn.. then it just works (already has the player in it)

comment:23 Changed 8 years ago by pat

Anyone else have problems viewing content captured with an HD capture card? I'm using an HD3000 and an HD5500, and when I click play on the flash player, I just get a black screen. It works fine with shows recorded on my PVR-350. I'm running the svn version as of about a week ago.

Thanks - this is an excellent feature.

comment:24 Changed 8 years ago by tephra@…

Hey All,

Just tried this and it works ok, is there a way to change the resolution/bitrate for the stream?

my little 384kbit upload doesn't like streaming too much :) hehe

Cheers Dave

comment:25 follow-up: Changed 8 years ago by candrews@…

Any chance of getting this player to work on Gnash? It would be cool to support a fully Free Software stack.

comment:26 in reply to: ↑ 25 Changed 8 years ago by caskater47@…

Replying to candrews@integralblue.com:

Any chance of getting this player to work on Gnash? It would be cool to support a fully Free Software stack.

As discussed previously, this player was written using the Flex 2 SDK. Gnash does not currently support anything higher than Flash 7 with some FLV support. It is up to Gnash to support the Flex2 libraries, which is freely available from Adobe. Trying to support Gnash from this player's perspective would be a step backwards.

comment:27 Changed 8 years ago by candrews@…

I didn't see anything in this ticket discussing Gnash, so I'm not aware of this previous conversation. In any case, Gnash supports YouTube?, as does swfdec, and they are remarkably similar to this functionality, so why couldn't this player be supported by either of those Free Software projects as well? Flash 9 support is in progress on Gnash, so at least some of it is supported, but I cannot say how much, or how well. I just want to raise this issue as "food for thought" - MythTV is this awesome Free Software platform, where everything works on Free Software except this one feature, making it seems a little like the black sheep of the endeavor. Otherwise, what a cool idea, and great work so far :-)

comment:28 Changed 8 years ago by xris

youtube, etc isn't written in Flex. There are (primarily) two different languages for creating swf files: Flex and Actionscript. The Flash IDE uses Actionscript, which is what most commercial programs are designed in. caskater opted to use Flex for this project because it does not rely on a proprietary for-pay IDE to design. However, I've since been informed that there are actionscript editors out there, includingt eclipse, ant, mtasc and swfmill. I have no problem switching to an actionscript-based solution (especially if it means the filesize will be smaller), but it would be bad to reinvent the wheel here when the current player works well enough.

comment:29 Changed 8 years ago by anonymous

Have you seen this player: http://www.jeroenwijering.com/?item=JW_FLV_Player

It is in active development and works well. It is pretty flexible too (can play mp3s and display image files.

-ben

comment:30 Changed 8 years ago by candrews@…

Flex compiles to the same swf bytecode as Flash - they both run in the Flash player. Flex 2 supports Actionscript 3 and the swf bytecode produced targets the Flash 9 VM. The latest version of the Flash IDE (CS3) supports Actionscript 2 and 3, and can target versions before the Flash 9 VM. So, the reason Gnash won't run swf's created in Flex is not because Flex is an entirely different beast, it's just that Gnash can't handle the necessary parts of Flash 9 yet. Gnash, btw, can run Flash 7 and some of 8 right now (http://www.gnu.org/software/gnash/manual/gnash.html).

comment:31 Changed 8 years ago by xris

For the last (hopefully) time... CC licenses that require attribution and Apache licenses are not compatible with the GPLv2.

And using a third party player doesn't fit with my long term goals of getting Live TV control into the player, either.

comment:32 Changed 8 years ago by mvnoord

pat, I had some problems viewing HD captures as well. It seems the version of ffmpeg I had installed didn't have ac3 support which made the transcode process puke (and led to a blank screen in the flash player). So I installed ffmpeg from source, enabling liba52 and libmp3lame support, and all is well.

comment:33 Changed 8 years ago by pat

mvnoord, Thanks a lot - that worked for me. I recompiled ffmpeg with the --enable-a52 option and it's good to go.

comment:34 Changed 8 years ago by mikal@…

I get a brief error message in the player, and then a broken image icon when trying to play videos. Is there any debug information available which will help me work out what the problem is?

Thanks, Mikal

comment:35 follow-up: Changed 8 years ago by anonymous

my tv recordings are 16:9 aspect ratio, however the Myth Flash Player's aspect ratio is 4:3. This makes the recordings look squashed up. Is there any way to detect the ratio and display a player with the correct ratio.

comment:36 Changed 8 years ago by anonymous

I just discovered this project -- I don't guess there's any chance of "wheeling it back" to support Flash 7, is there? I think that's all you get on PSP and Wii (as that was all Adobe had released to OEMs at the time...), and it would be awesome if this project could support those two platforms...

comment:37 in reply to: ↑ 35 Changed 8 years ago by anonymous

Replying to anonymous:

my tv recordings are 16:9 aspect ratio, however the Myth Flash Player's aspect ratio is 4:3. This makes the recordings look squashed up. Is there any way to detect the ratio and display a player with the correct ratio.

In order to properly scale the video metadata of the file being streamed or downloaded to the player is required. Unfortunately, ffmpeg, which is used to transcode into flash video format does not add the proper metadata and so theres no way to detect the size of the video content. The player was built with this in mind however, so when/if ffmpeg does support adding proper metadata or if the transcoding is done by another solution altogether which supports it the player will be able to compensate automatically without change.

As for Flash 7 support, this is not entirely feasible as this player was developed using Flex 2. Flex 2 was chosen because it is a freely available tool and soon to be open source. This matches the goals of the project. In order to provide Flash 7 support it need to be developed in Adobe Flash which is proprietary and does not meet our goals.

Jean-Philippe

comment:38 follow-up: Changed 8 years ago by jshatch@…

Can something be put into the flash player to terminate ffmpeg if you stop watching the video? Currently it seems ffmpeg will continue to completion if you hit stop or if the browser crashes.

comment:39 in reply to: ↑ 38 Changed 8 years ago by xris

Replying to jshatch@azza.com:

Can something be put into the flash player to terminate ffmpeg if you stop watching the video? Currently it seems ffmpeg will continue to completion if you hit stop or if the browser crashes.

You wouldn't want to have to restart the encode from the beginning if you paused/stopped playback in the middle of a show, and there is already code in place to catch things if the browser connection goes away -- on slower machine, and depending on config, this can be up to 30-60 seconds, though.

Please keep in mind that this is a proof of concept demo, not a finished product. ffmpeg will not be used for the final version.

comment:40 Changed 8 years ago by taupan@…

Hi!

I've just noticed the flash player is in mythtv svn from friday. There's no sound and the fullscreen button does nothing at all (iceweasel 2.0.0.8, flash player from adobe 9.0.48). Also I can't skip to later sections of the recording.

(I didn't read through all posts here, I just wanted to give you a report on how this works on my box.)

The absense of sound might be related to my (very old) framegrabber card only recording mono on the right channel. Maybe the player only plays the left channel or something?

I like the idea of this feature, should make it easier to manage your recordings from the web frontend (uhm, did I see this episode already, let's skip in a bit...) and lots of other useful applications.

comment:41 Changed 8 years ago by goofygrin@…

Chris,

What's the design you've got? You say that invoking ffmpeg will not be the final solution, and in the email on the mailing list, you mention that most of the ffmpeg type code is built into myth already.

Thanks,

Sean

comment:42 Changed 8 years ago by djackson@…

I run a CATV company in a small town. We only have 750 customers I was thinking about encoding all our channel and streaming them over the web. Anyone serious about helping me with this drop me a line.

comment:43 Changed 7 years ago by xris

(In [15482]) re #3394, turn OFF the flv player by default, in preparation for eventual .21 release. This adds settings values to turn the FLV player on and off (default off), and adds support for bitrate adjustments. Support for resolution adjustments has been added but left commented out because the player itself is currently hard-coded for 320x240 video.

comment:44 follow-up: Changed 7 years ago by bspencer

I am new to the mythtv world (meaning I have not gone further that getting a backend and an xbox frontend up and running with mythweb functioning). I have searched for a tutorial on updating mythweb because I would like to add the flash streaming functionality but I have found nothing and I do not know where to begin. Does anyone know of a good resource for this information or can someone tell me how? I appreciate any help and the group’s patients with me.

comment:45 in reply to: ↑ 44 Changed 7 years ago by anonymous

Replying to bspencer:

I am new to the mythtv world (meaning I have not gone further that getting a backend and an xbox frontend up and running with mythweb functioning). I have searched for a tutorial on updating mythweb because I would like to add the flash streaming functionality but I have found nothing and I do not know where to begin. Does anyone know of a good resource for this information or can someone tell me how? I appreciate any help and the group’s patients with me.

This is not the right medium to ask this question. You want to join the mythtv-users mailing list and ask there.

comment:46 Changed 7 years ago by xris

  • Resolution set to fixed
  • Status changed from new to closed

I'm closing this issue now. The flash player has been added to mythweb, and the code exists in svn under mythextras. Future discussion on this topic should happen on the mythtv-dev mailing list or in IRC.

comment:47 Changed 6 years ago by anonymous

setting standard/widescreen aspect manually should be an option, even if there is no aspect metadata.

Aspect for DTV is usually similar for sets of stddef channels at least, so user set default, and manual select of aspect would be fine.

comment:48 Changed 6 years ago by stuartm

  • Ticket locked set

Add Comment

Modify Ticket

Action
as closed The owner will remain xris.
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.