Embed VLC video output into a Scene Graph

Hello,
I'm trying to embed a VLC player in a JavaFX 2.2 application.
For that I'm using the libvlc.dll library's API.
VLC provided two ways to render a video:
1. Call API function that takes HWND: +libvlc_media_player_set_hwnd (libvlc_media_player_t p_mi, void drawable)+ Set a Win32/Win64 API window handle (HWND) where the media player should render its video output.
2. Register a callback that gets called every time a frame should be rendered: +libvlc_video_display_cb (void opaque, void picture) Callback prototype to display a picture.+
With the HWND approach, I managed to extract an HWND pointer of the Scene using Glass framework, causing the video to render on the whole scene, no other nodes are visible.
With the Callback approach, and by using JavaFX 2.2 new javafx.scene.canvas.Canvas node, I was able to throw pixels at the canvas, but it turns to be very inefficient in terms of memory and thread usage.
I would love to have a solution as with AWT + JNA: the HWND can be extracted from java.awt.Canvas component (using JNA), and be given to libvlc API function. This canvas can be placed anywhere in the frame, not occupying all the entire window.
Hard Guidelines:
1. Integrating AWT/Swing with FX application is not an option, I want it to be a pure JavaFX application.
2. Using JavaFX Media API for playback is not an option, since I have a requirement to modify the media player's source code.
3. The video must not occupy the entire window, allowing other components to be visible.
Possible solution is to create my own node or control that will wrap Glass component View that has a HWND but I don't know how to bind and make it work with other Glass components.
Any help would be appreciated.
Thank you.
Eli.

I would be interested in a solution for this as well.
I've already done a lot of experiments in this area trying many frameworks/players (Xuggler, GStreamer, VLC (VLCJ), MediaPlayer Home Cinema, DS4J, MPlayer) and it seems to be very hard to do what you ask. Best chances at the moment are to use GStreamer, which I've succesfully been able to overlay with JavaFX components in the same window (with a stiff CPU penalty though).
The other frameworks all have their drawbacks (Gstreamer as well). Most are low level which makes things like switching streams or doing subtitles a lot harder, some have poor control interfaces that donot expose enough functionality, etc). GStreamers main drawback is efficiency when using the Canvas (about 50% slower than native) but solvable by throwing more hardware at it. Also until recently its builds were not very up-to-date. I intend to soon test it again and see if I can get a fully working Canvas style solution with it.
Currently I use VLC (with VLCJ) and I play back videos in a seperate Frame, and have a second window (a Stage) that is transparent on top of it. This way I can mix JavaFX controls and a video. It is hackish and also annoying that you have to juggle two windows but it works fairly ok. This approach might also work for you if you resize the Canvas in the seperate frame to where it needs to be displayed and keep that area transparent in your JFX frame... but it is hardly optimal (but very fast since it can do direct rendering).
I haven't tried recently to mix it directly with JavaFX, but from what I read it seems possible now... but I'm pretty sure it will incur the same kind of CPU penalty as with GStreamer's Canvas :(

Similar Messages

  • Embed VLC media player into java GUI

    Hi
    Does anybody knows how to embed VLC media player into java GUI.
    thanks

    palakk wrote:
    Hi
    Does anybody knows how to embed VLC media player into java GUI.
    thanksWhat did you find when you googled it?

  • Embed an video into an image

    Let start with the simple stuff.
    Operating system is Windows XP
    Photoshop version is CS4 V11
    I have been racking my brains trying to figure out how to embed a video file into an image in Photoshop.
    GOAL: i have a Jpeg of a TV screen frame. I want to take a YouTube video that i downloaded and place it into this TV screen frame.
    After this i want to be able to save it in some way (i suppose save for web devices as a GIF) and then place that picture of a TV screen with a running video into a banner i am creating (like a website signature banner with a running video on the side of it).
    All the tutorial videos i have found are from older versions of PS where bridge and ImageReady were all a part of the main program. CS4 is not like that so i cannot figure out how to even get the movies from bridge, or into Photoshop at all since they are two separate programs and i have not found a way to either open it with PS or move it to PS from Bridge.
    I have it currently saved in both .mov and .avi file formats as i was not sure which would work (but the tutorial used .mov)
    any help would be greatly appreciated.

    It was simply an example.
    1. I can capture the video myself with a capture card of me playing the game if that makes you feel better about it.
    2. And when i said GIF i was refering to an animated GIF.
    3. It is my website so i am pretty sure no one will mind if the file is larger than a normal website signature. We have plenty of bandwidth.

  • I want to use my macBook Pro 2,2 (mid 2007) to display video being fed from a Canon 5D video out into the vectorscope in Final Cut Pro 7.0.3.  Is it possible to input live video from another digital camera into the MacBookPro

    I know that the built in iSight camera records video.  I want to set up a Canon 5D video camera and feed the Canon's video output into the MacBook Pro so that I can use the vectorscope in Final Cut Pro to adjust the exposure of the Canon 5D.  Basically I don't want to buy a vectorscope to have on set to make sure the picture is properly exposed and color balance is correct. (In your response it doesn't have to be the full scenario I've described.  If you can just tell me if there's a way to feed live video into the MacBook and display it on the screen and possibly record it, then I'll figure out the rest.)

    Dear Ben,
    Thanks for your help. Apple and I dealt with this. It was an FCP, NOT Motion problem. As It seems you understand, we simply trashed my FCP prefs. Problem went right away.
    Thanks. Do you live near Hammond? Played in a rugby tournment down there once. I was transformed.
    MS

  • Is it possible to embed Youtube videos in to InDesign?

    Hello everyone,
    im working with a interactive pdf and i need to put in a couple of video's.
    Is it possible to embed Youtube video's into InDesign?
    I know that this question has been asked before, but a answer on it i couldn't find.
    Sorry for my bad english , but after a couple of hours of looking on the internet and experimenting it still doesn't work.
    Thanks,
    Robin

    Here's an interactive PDF with a Flash player I built awhile back embedded
    http://www.zenodesign.com/forum/zenoyoutube.pdf
    This won't work inside of a browser, but if you download the pdf and open it in Reader 9 it should work. You'll have to click the Flash icon and Allow dialogs first then enter a YouTube URL in the field in the lower right corner and click play. Most YouTube URLs from your browser address field should work, i.e. this format:
    http://www.youtube.com/watch?v=c1oMtwmTaNQ

  • Vlc 0.8.6a - no video output

    Hi,
    i've updated to the new vlc version today, but i can't get any video to play. The sound is always playing but there is no video output.
    i've tried with old files that the old version had no problem playing.
    Here is the console-output.
    [mov]
    VLC media player 0.8.6a Janus
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): found Box:
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): read box: "
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): found Box:
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): read box: "
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): found Box:
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): read box: "
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): found Box:
    main warning: can't store message (Ungültiges oder unvollständiges Multi-Byte- oder Wide-Zeichen): read box: "
    [00000288] main decoder error: no suitable decoder module for fourcc `avc1'.
    VLC probably does not support this sound or video format.
    [xvid]
    VLC media player 0.8.6a Janus
    [00000288] main decoder error: no suitable decoder module for fourcc `XVID'.
    VLC probably does not support this sound or video format.
    the first one is a quicktime trailer and the second one an xvid file.
    did i do somthing wrong or is this a bug?
    thx
    nGerrit

    lilsirecho wrote:
    Have VLC problem here as well....no video, audio OK...works well in Larch liveCD.
    No video in noatun, kaboodle or codeine.
    Not sure why those would be broken, but give my above method a try. It fixed it for me.
    lilsirecho wrote:
    Result of query below:
    [root@n6re ~]# vlc --list| grep ffmpeg
    VLC media player 0.8.6a Janus
    starting VLC root wrapper... using UID 0 (root)
    * Running VLC as root is discouraged. *
    It is potentially dangerous, and might not even work properly.
    [root@n6re ~]#
    You don't need to run it as root to get the correct information. For some reason the packages that got into extra didn't use ffmpeg correctly. Yours doesn't either.
    lilsirecho wrote:What is dangerous about running VLC as root?  VLC runs in windows as the equivalent (administrator)....
    Windows has a terribly broken privilege separation model. Well, the one they have now in 2000/XP/Vista is actually ok, but their legacy support makes it all but useless. Don't run ANYTHING as root unless it's absolutely required. It's not required to run VLC as root. Run it as a user.
    lilsirecho wrote:
    Only after recent upgrade did VLC fail in root.  It plays well as root in LiveCD right now.
    Video is OK in mplayer!
    Rebuild ffmpeg and vlc and you'll be fine. I left the PKGREL id the same, that way the arch team's next ffmpeg and vlc packages will replace mine.

  • How can I embed a video with absolute path into a PDF

    I'm having some difficulties in embedding a video into a pdf; I followed the instructions to embed it properly, but the path points to my personal computer , so that the video will be available only on the computer I used to embed the document.
    Any suggestion? Can I modify the path directly? The PDF is supposed to be linked to another interactive PDF and to work both online and offline.
    Thanks!

    Thanks for the reply. I tested the file on other computers, though, and it doesn't open the video on any computer but mine (mine: the one I used to embed the video).
    Am I doing something wrong? I'm using Acrobat X and the procedure I'm following is: Multimedia/Add Video/Choose file
    I searched for manuals online and I saw that some of them were checking the box "embed file", but I don't have that choice..
    Maybe I'm supposed to use another version of acrobat?

  • How to Embed ISR code data into video

    Hello,
    I have finished a music video, and the client would like me to embed the video with an ISR code. Does anyone know how to do this?
    It is a code that tracks the downloads, and it needs to put into the video as well as the audio.
    Any help would be wonderful!
    Thanks Lucinda Spurling

    Yep I mean ISRC sorry.  Evidently I need to embed it into the video file not the burn, as it is going to a
    mastering house. I need to put it into the meta data I think of the mp4 file.
    Not sure how to do that. ? Any Ideas
    thanks for your help
    L

  • Can't embed a Captivate video (swf) into Power Point 2007

    I am trying to embed an Adobe Captivate video (swf) into power Point 2007. I very carefully followed all the steps outlined from a search I did on the web and it is not working.
    These are the steps I followed:
    1. Create a simulation using Adobe Captivate and publish it as a SWF file.
    2. Open the PowerPoint presentation and insert a blank slide for adding simulation.
    3. We need to work with the Developer tab now. If you can't see it in the ribbon, follow these steps to make it visible.
    (steps to get developer)
    4.On the developer tab, in the Controls group, click More Controls
    5. In the list of controls, click Shockwave Flash Object and click OK.
    6. Drag diagonally to create a box in which the simulation would appear. Don't worry about sizing it accurately; you can adjust it later as well.
    7. Right click the Shockwave Flash Object, and then click Properties.
    8. On the Alphbetic tab, click the Movie property. In the value columnm type the full drive path, including the file name.
    9. Set the Playing property to true, Loop to false and Embed Movie to true.
    10. Close the Properties dialog and test the movie.
    The simulation will now play in your PowerPoint presentation.
    Note: If during the slideshow,t he simulation doesn't play automatically, right-click and select Play.
    I followed these steps, and it is just not working. I go to play my power point presentation and set it to play from the beginning, and when it gets to the slide with the swf file, I just get a faded out still picture of the video, and it will not play.  If someone has had luck with embedding swf files from Captivate into Power Point, please let me know how you did it.   Thanks.

    Thanks, I really appreciate the information. The only problem is that I have to keep it as a power point presentation.   I convert from ppt to a video, so I need to keep it as power point.
    I found these steps on the internet and followed them exactly, and went through the steps 3 times, to make sure I wasn't leaving anything out, and it just didn't work. I have a tech guy who's supposed to call me today regarding this issue, and hopefully he'll be able to go through it with me step by step to try and work it out.
    Ultimately, these are going to be training videos that are going to be set up on a website, so they ultimately have to be saved as videos. 
    I'm keep trying to figure it out though.
    Thanks.
    Ariane

  • What's the easiest way to embed a video into a specific part of an image map?

    What's the easiest way to embed a video into a specific part of an image map?
    Anybody help? Is there a way to do this in Dreamweaver?

    One way would be to create your image map first. Then, use the CSS property position to position the div containing the video player relative to the image map or absolute to the page (depending on how your website layout is).
    Then, use an event listener (javascript) to enable the div holding the video player to show only when the specific area on the image map is clicked.

  • Problems with sound when I embed multiple videos on auto play into a composition widget.

    I am having problems with the sound when I embed multiple videos on autoplay into a composition widget in Muse. It sounds as if they are all playing at once. Note that within the compostion widget, options - the auto play is disabeled.
    I've a television set that has buttons below and I want the users to flick through the channels.
    I need the oriantaion to be stacked as they're contained within a frame (the tv). I have tried the lightbox view (which at first seamed to solve the problem), but unfortunately the position, orientation moves when shown on different divises. It Had to be quite precise as I was ovelaying the original frame within the light box.
    Could you please help me with this?
    Also, I wanted to let you know that I think this software is amazing. Great job!
    here is the link:
    http://albanconnell.com/moving-image.html

    Hi Alban,
    I see what you are seeing. Could you send your file so I can investigate more? Send it to [email protected], with a link to this thread in the message body. If the file is >20mb, our email system cannot handle it so use a service like Adobe SendNow.
    Thanks,
    Sam

  • Code to embed my video in other sites?

    Hello folks!
    I will be putting video on my website using iWeb. Simple enough (I hope!)
    However, I need to be able to provide code to my customers so that they can embed the video into their own website... the same way that YouTube allows you to do that. Is it possible to do that kind of thing with iWeb?
    Thanks!
    Vixter

    I've asked this question previously, and got no responses. I'll ask it again, though my choice of software has changed. I'll be putting video online (this time using Flash video and Dreamweaver). I've seen on YouTube that it's possible to provide someone with a piece of code that allows them to put a video on their site without chewing up their own bandwith. Somehow, it runs directly from YouTube's site, but appears to be on that person's site (for example, it might appear to be sitting on a person's blog, but behind the scenes it's actually running off of YouTube's site). I don't understand the mechanics of this, but am wondering if this can be done by anyone (i.e. me!), or does it require considerable resources.
    For example, if I have a site with Flash video on it, can I give someone a piece of code that will enable them to run the video directly from my site (though, it will look like it's actually on their site)? Or, am I only able to provide them with a link to my site (in which case, visitors to their site must leave and come to my site to see the video)? Clear as mud?
    Sorry about the long-winded question. Thanks for any advice you can offer! It's very much appreciated.

  • S-video output not working for Satellite A60

    The s-video output on my laptop is not working. i have tried the Fn-F5 hotkey, but i don't get a damn output on the tv.

    Hi
    First:
    Has it ever worked before?
    Yes? then make sure that you don't have a second desktop activated. Go into the displaysettings and rightclick the second screen. Make sure it is not set to "attached".
    If your machine also have a composite out, try using that instead.
    Does it work?
    If yes, your machine is at least software-wise able to output the picture to the TV.
    If no, then there is probably something in the software that stops the picture from going out to TV.
    It could of course also be a hardware related problem but it is less prabable that both the s-video and the composite-ports are defective.
    Try checking the settings for your videodriver.
    No?
    If an s-video cable was delivered with your computer, make sure to use that one.
    Check the s-video cable with a traditional DVD. This way see if the cable and in-port on your TV is ok.
    If you are using the cable that came with your PC then you should defenitely check for settings in the videodriver.
    If it is not the cable that came with your PC (or no cable was delivered with your PC) try check the manual for hints on a compatible cable.
    Sorry for the quite messy respons - it is not easy to write a think-flowchart here.
    Good luck
    Tom

  • Concerning: VGA monitors using an Aluminum Powerbook G4 PowerPC 2004 15"-screen 1.5Ghz  The DVI (converted to VGA) video output stopped working on this computer after 9 years of service. This raises question 1:  Is there any way of fixing this? I've tried

    Concerning: VGA monitors using an Aluminum Powerbook G4 PowerPC 2004 15"-screen 1.5Ghz
    The DVI (converted to VGA) video output stopped working on this computer after 9 years of service. This raises question 1:
    Is there any way of fixing this? I've tried the usual: triple checked all vga cables & devices through trial & error. Bought a new DVI-VGA adapter. Reset PRAM, PMU, etc. Nothing works. Something is probably damaged, because my KVM switch was not working unless I hot-reseated the vga cable into it, leading to this DVI port, and that is pretty rough stuff.
    Question 2 (related):
    This dovetails into this: Can I drive a VGA monitor with the s-video output port on this computer. It would take an s-video (male)-to-15-pin-VGA adapter. Has anyone does this? So far, I haven't even found the adapter mentioned anywhere.
    Thanks for reading this.
    el7

    Thanks for the useful feedback, Knucklesmac. I agree. I must have blown something on the logic board -- because I had a faulty old KVM switch that would not switch between computers without some nasty hot-plugging/unplugging the VGA video cables. (wince!). It's like when Dizzy Dean ruined his arm because a line drive hit him in the foot and he readjusted his mechanics around the injury. I take the blame because this has been a great computer, and does not deserve any blame.
    If it will help anyone else reading this thread, C2G (née Cables to Go) has some interesting ideas for still getting external video out of this computer:
    -USB-to-VGA
    http://www.cablestogo.com/product/30545
    -Convert s-video or composite video signals to high resolution VGA
    http://www.cablestogo.com/product/40971
    The price range is $75-$85, which doesn't make horse sense to me for such an old computer -- which has a lot of life in it anyway, because its own 15" monitor is not chopped liver.
    el7

  • Video output from iPod Touch (2nd gen) via AV Component Cable (no audio)

    Hi, I'm trying to output a video from my iPod Touch (2nd gen) to my TV via a AV Component Cable.
    Unfortunately the audio doesn't work, I'm sure they are all connected into the right places.
    The video works, but I get no audio. (And no subtitles when closed caption is on)
    Here is a link to an image of the TV connections from ImageShack:
    http://img707.imageshack.us/img707/7280/img0204y.jpg
    At the top left of the image, are what I assume to be the red and white audio ports, highlighted in red.
    I plugged in the red and white audio connectors into those ports.
    And towards the bottom are three ports, green, blue and red, also highlighted in red.
    I plugged in the green, blue and red connectors into those ports.
    I changed the input of the TV to Input 2, I see the video for the movie I'm watching on the TV but no audio. I tried multiple movies.
    I've also tried changing the video output from PAL to NTSC and back again, turning Widescreen on and off and turning Closed Captions on and off. I also tried plugging in the red and white audio connectors into the row of ports just below the green/blue/red row, to see if that made any difference, and it didn't.
    I tapped the bottom left button of the iPod Touch when plugged in to the TV and playing video and it came up with an option that was selected called ~"Audio Source: English (Stereo)"
    Any idea's? Thanks.

    Resolved... ThankYou

Maybe you are looking for

  • Itunes app store is displayed in rubbish text & payment methods

    Hi, I've been having problems exploring the Itunes app store, as the text displayed in the page is all in rubbish text/illegible even though I have selected my own country for the store. My other friends does not seem to have this problem. How do I s

  • What are the differences between ESB 10g and OSB 10g

    Hi, I'm newbie to OSB 10g. I have installed OSB 10g. I came to know after Oracle acquired BEA, the ALSB is renamed as OSB. I'm curious to know what are the differences between ESB and OSB. If there are many differences, please post any links which pr

  • Balnacing Area In MIGO

    dear all ; In MIGO transaction "the Balancing Filed Business Area is missing ". I have maintained OBYC ,Kindly Suggest what to do?

  • SRKIM: GL open period 시 hang이 발생할 경우

    PURPOSE GL 에서 open period 시도 시 hang 이 발생하여 더 이상 진행이 되지 않을 경우의 해결책을 제시한다. Problem Description GL 에서 open period 시도 시 hang 이 발생하여 더 이상 진행이 되지 않는 경우가 있다. Workaround N/A Solution Description 1. 다음 sql 문을 수행 한다. Select * from GL_CONCURRENCY_CONTROL where

  • Two computer confusion

    hello. i had to send an MG3222 back because it was faulty. so they sent me  an MG3520. should i uninstal the 3222 or what?? i tried installing the CD for the 3520 but i don't see its avatar anywhere on screen or any info at all. what should i do?