How To Display A Video In A Widget | With Audio - Unreal Engine 4 Tutorial

Поділитися
Вставка
  • Опубліковано 3 лип 2024
  • Hey guys, in today's video, I'm going to be showing you how to play a video in a widget on screen, with audio, within your games in Unreal Engine 4.
    City Video: • City Life | Drone Vide...
    Band Audio: • 20 New Free CITY Sound...
    Water Audio: • Calm Seashore - No Co...
    #Ue4 #UnrealEngine4 #Ue4Tutorial
    ___________________________________________________________________________
    00:00 - Intro
    00:13 - Overview
    01:15 - Tutorial
    11:14 - Final Overview
    11:36 - Outro
    ___________________________________________________________________________
    My Public Video List: trello.com/b/7vJgXzBm
    Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
    The Basics Of Nodes Playlist: • The Basics Of Nodes In...
    Blender Tutorials Playlist: • Blender Tutorials
    ___________________________________________________________________________
    If you enjoy make sure to subscribe: / @mattaspland
    Join My Discord Server: / discord
    Follow Me On Instagram: / matt_aspland_
    ___________________________________________________________________________
    If you want to support me, you can PayPal me at "matt.aspland.1@gmail.com". This is by no means expected or required. It is just a nice support :)
    Link to PayPal: www.paypal.com/
    You can also support me on Ko-Fi following this link: ko-fi.com/mattaspland
    Thank you :)
    ___________________________________________________________________________
    ♫Music By♫
    ●Kronicle - Chill Noons
    ●Soundcloud - / the-chemist-10

КОМЕНТАРІ • 148

  • @RolyPolyGames
    @RolyPolyGames 2 роки тому +5

    Matt, thanks for the great help on figuring this out. I put it to use about a month ago and have a fun little system working with it.
    One thing I noticed - at least for my project in 4.27 is that as long as you attach the media sound to the pawn and set the media player up within the component you don't have to start it with the blueprint function. It seems to work fine.
    Works great for what I am doing at least. Making some fun CYOA FMV games :) Thanks again for the primer on this.

  • @harishvijendiran5234
    @harishvijendiran5234 3 роки тому +7

    This is the one I been searching for long time, Now I can insert pre rendered cutscene videos to deliver my game stories with less effort. Thank you mate!!

    • @MattAspland
      @MattAspland  3 роки тому +1

      That's great to hear man, nice work! All the best :)

  • @jeldrikgaal5342
    @jeldrikgaal5342 3 роки тому +4

    Thanks for the comprehensive and easy-to-follow tutorial!

  • @ECHSBACHS
    @ECHSBACHS 2 роки тому +1

    It Works. Great Job as Always Matt !

  • @jelenastarcevic1825
    @jelenastarcevic1825 2 роки тому

    OH GOD THANK YOU. Been looking everywhere for this...

  • @evelynperez4521
    @evelynperez4521 3 роки тому +1

    thank you for the tutorial. You really helped me figure out how to play my game intro in a widget!

  • @fleurbird
    @fleurbird 3 роки тому +1

    I honestly didn't know this was possible.
    But this is so cool and can be applied to so many game features.

    • @MattAspland
      @MattAspland  3 роки тому +1

      Absolutely Fleur, many things can be utilised great in many different ways! :)

  • @ja.consultoria4.0
    @ja.consultoria4.0 Рік тому

    Works perfectly. Thank you.

  • @OnyeNacho
    @OnyeNacho 9 місяців тому

    Thank you! I was able to setup FMV cutscenes thanks to this video!

  • @g-dojjo
    @g-dojjo 3 роки тому +1

    Thanks bro great tutorial again!

    • @MattAspland
      @MattAspland  3 роки тому

      No problem mate, thanks a lot :)

  • @KadirKuucuk
    @KadirKuucuk 3 роки тому +1

    Again again again thanks bro great work

    • @MattAspland
      @MattAspland  3 роки тому

      No problem mate, thanks for the support! :)

  • @megtwin
    @megtwin Рік тому

    As usual, when I need something, there's Matt! Thanks!😄

  • @philippec7213
    @philippec7213 Рік тому

    Thank you, very clear and usefull

  • @FlawlessTroy
    @FlawlessTroy 3 роки тому +8

    This will be useful!

    • @MattAspland
      @MattAspland  3 роки тому +1

      That's great to hear man, happy to help :)

  • @guinea_piggg3930
    @guinea_piggg3930 Рік тому +1

    Thank you for the tutorial! MediaPlayer has a GetDuration function that returns Timespan, from which GetTotalSeconds may be dragged. That may be used as delay duration (13 sec in the video)

  • @connortheandroidsentbycybe3755
    @connortheandroidsentbycybe3755 5 місяців тому

    great tutorial

  • @imarpuzci7578
    @imarpuzci7578 Рік тому

    Love you, thanks

  • @ung_mk
    @ung_mk 3 роки тому

    Thank you. Very nice.

  • @tonyshoulders_
    @tonyshoulders_ 6 місяців тому

    very helpful!

  • @r_e_d_squirrel367
    @r_e_d_squirrel367 2 роки тому

    you always have just what i need
    wesome video

  • @NeoxEntertainment
    @NeoxEntertainment 2 роки тому

    Nice Outro Background picture :)

  • @stevenwynn819
    @stevenwynn819 3 роки тому +2

    This can really add polish to a game. Thanks!

    • @MattAspland
      @MattAspland  3 роки тому

      Absolutely Steve, all the best to you!

    • @ashy49592
      @ashy49592 4 місяці тому

      How to play the video on a loop​@@MattAspland

  • @AnthonyBiafore
    @AnthonyBiafore 4 місяці тому

    Thanks for the sweet tutorial. For my widget I put a black image over the canvas and created an animation seq-image render opacity. To create a Fade from black!

  • @alekseikuznetsov6016
    @alekseikuznetsov6016 3 місяці тому

    Finally Great solution that works in UE5.3!
    Especially after countless efforts of setting up Common Video Player from CommonUI 🤯

  • @federicobarreralemarchand7629
    @federicobarreralemarchand7629 2 роки тому

    Thank you so much! You have no idea how many things I've tried to try to get a video playing like this. Finally figured I should use a widget, and this tutorial 100% worked! Thanks!!

  • @Faizy_Writes
    @Faizy_Writes 3 роки тому +2

    So Good!

  • @MilliumG
    @MilliumG 3 роки тому +5

    I was literally just looking for this 👀

  • @abdullahsohail5395
    @abdullahsohail5395 3 роки тому +1

    Nice video dude

  • @lunarpooch4398
    @lunarpooch4398 2 роки тому

    great video thanks! every other video on this is very confusing

  • @TheF4c3m4n
    @TheF4c3m4n 3 роки тому +2

    I really like this, and it will be helpful in a few ways! I recently seen a UE4 Video talking about a different way of removing the widgets for better performance. I have been messing around with a few widgets lately, and definitely noticed a difference after installing a few of them. I am wanting to use a widget to display a video in a level, and was wondering what is the best way for displaying the widgets, then removing them. Thanks Matt!

    • @MattAspland
      @MattAspland  3 роки тому +1

      That's great to hear, happy to help Pat! Yep, removing the widget after you are doing with it can definitely help with performance, especially in the long run! All the best man :)

  • @SlushyRhombus
    @SlushyRhombus 2 роки тому +3

    Hey Matt! Thank you for the videos. What is the best way to get all background or world noise to not play while the video is being viewed? I can still hear my background noise over the video

  • @abhiyans5510
    @abhiyans5510 2 роки тому +1

    Thanks, I was able to rickroll my friend using this.

  • @THEAETIK
    @THEAETIK Рік тому +8

    PSA: If you set the delay node to "0.0", it will actually be one frame. 0.1 is several frames on 60 fps alone.

    • @NicolasGagne
      @NicolasGagne 9 місяців тому

      Better than that, you have a node "Delay Until Next Tick"

  • @christuusgnosis
    @christuusgnosis 2 роки тому

    excellent

  • @daniellekuchlerflores410
    @daniellekuchlerflores410 2 роки тому +1

    Thanks Matt! Does anyone know how to end/stop the video & audio? For example when pressing the space bar.

  • @JamesGascoyne
    @JamesGascoyne 3 роки тому +3

    thanks :D

  • @Bentley0312.
    @Bentley0312. 3 роки тому

    this was released on my birthday

  • @333studios.
    @333studios. 3 роки тому

    Question: Can I use this as a loading screen? I use your loading screen as mine and curious if I can Use both of these together?
    Answer: YES, you can use this function with the loading screen!!! :D
    ALSO, you can make it a Main Menu. when you do it with the main menu you can just throw in a sound in the world (if you use Matt's way of a MM with a empty level. WORKS AMAZING!

  • @MNGubbaldoGooche
    @MNGubbaldoGooche 6 місяців тому +1

    Rather than setting the Delay node to 13 seconds you could use the Media Player reference to get the duration using "Get Duration" and then pass the seconds into the delay node :)

  • @TorQueMoD
    @TorQueMoD 8 місяців тому +1

    Oh, so adding the delay of 0.1 doesn't help, because the reason it's white is because the video is loading. I've tested this in shipping and the first time it loaded my 4 minute video, it took like 7 seconds to start playing. Also, this messes up the delay before closing the widget, so there's a better way. Drag off the MediaPlayer variable and type On End and you'll see an option for Assign On End Reached. This will create a binding that will detect when the video has ended and then you can execute your closing the widget code from there without having to guess at the correct timing.

  • @iiTzMythic
    @iiTzMythic 2 роки тому +2

    any idea why the sound is not playing or add sound to it?

  • @pidgey2040
    @pidgey2040 3 роки тому +2

    Hey Matt, how about making something like the Speed Boost from Dark Deception? (With the effects as well) would be useful.

    • @MattAspland
      @MattAspland  3 роки тому +2

      Hey mate, I can look into that and add it to my list :)

  • @izzyharvin
    @izzyharvin 2 роки тому

    So I made this pop up widget to become a button but it only plays once. Is there a reset node or something so that I will be able to play the video again? Thank you for the help

  • @ryutenchi
    @ryutenchi 2 роки тому

    How would you make it so that it starts paused and has a thumbnail (not just black/white) then you can start it after that? Think a menu of replay or hint videos with thumbnails you click to start the video.

  • @manvendrasingh299
    @manvendrasingh299 3 роки тому +1

    hey mate your ai series was very helpful and now i am looking for a gun system same like gta v it would be really helpful if you make a tutorial on it's request

  • @ARMORHOUS3weplay
    @ARMORHOUS3weplay Рік тому

    I was curious if I have my videos hidden are they still running in the background? I have rollover states that unhide them...

  • @user-od4wm5cj6g
    @user-od4wm5cj6g Рік тому

    thank you! But I curious about how to build a mini-player? Like the UA-cam Video Player. Usually, in the lower corner , it has a little player and then we can expand it to the full screen video view.

    • @user-hz8ju7wl1r
      @user-hz8ju7wl1r 8 місяців тому

      Remove the "Disable input" and "enable input" nodes and anchor the image widget to whatever corner you would like it to be in, then change 1080x1920 to whatever size you want.

  • @JavadRezaii
    @JavadRezaii 9 місяців тому

    Thanks for you tut, I have another problem in 5.3. It can not play my mp4 file in reverse! My file has supported rate from 0.5 to 4 ( no negative rates are supported ! ). Do you know anyway for doing so?

  • @connorboyle
    @connorboyle 2 роки тому

    Is there any way to remove the black background that is in the video? I exported a transparent one out of After Effects

  • @FlyPimpDude
    @FlyPimpDude 2 роки тому

    Wondered about using this technique to play a pre-rendered cutscene on level change in place of a loading screen or to mask any scene loading lag. hmm...

  • @koski7579
    @koski7579 Рік тому

    Hey Matt! i see my video in editor but when i build the game the video is just blank white screen

  • @yunaseo7805
    @yunaseo7805 10 місяців тому

    I will play on LED hall so need 6911 resolution in width, then should i make it by custom size in widget blueprint?

  • @punishedproduct
    @punishedproduct 3 роки тому +2

    What if the video already has sound?

  • @deridionentertainment
    @deridionentertainment 3 роки тому

    Please Matt can u make a video on how to turn the camera with the left joystick Like in the game OUTRIDERS DEMO using the locomotion set up. So what i mean is that when the player is in motion the camera will snap back to the locomotion all direction movement and the left thumbstick just rotates while still facing forward but when the player stand still. you can rotate around to see the front of the player. .Thank you

  • @bilegtni5202
    @bilegtni5202 3 роки тому

    youre very very awesome

    • @MattAspland
      @MattAspland  3 роки тому +1

      Thanks so much man, all the best to you!! :)

  • @NANOTVLOGSjmf
    @NANOTVLOGSjmf 2 роки тому

    hi please help me real quick after building the game it just shows white background

  • @popeswags2039
    @popeswags2039 10 місяців тому

    2:07 when I double click my video in the media player it just constantly buffers, and i cant find anything on fixing this. the vid is an mp4 file and i have the electra plugin installed

  • @yunaseo7805
    @yunaseo7805 9 місяців тому

    Does it has a limit for the resolution of video? It's not working well

  • @mysticx6226
    @mysticx6226 2 роки тому

    i did one for the start and worked, then i did one for a screamer with a box collision but every time i test it my screen turns black

  • @theunicorn4224
    @theunicorn4224 3 роки тому

    So when I press the button it flashes black for a split second...nothing else happens, the video doesn't play. I'm really desperate to make this work. Hope you can help! Btw how do I the video play after I pressed play in the main menu? When you press play you go straight to the game level but I want to play a cutscene before.

  • @bigfishgames5578
    @bigfishgames5578 Рік тому +1

    any one else getting a white background when i test it unless i have the media player open?

  • @LDT7Y
    @LDT7Y 2 роки тому +1

    I'm opening the movie widget when I click a button on my start menu widget. It closes the start menu, plays the intro animation, then the player begins the game in the first level map once the animation closes (manually or automatically on finishing). So I'm not sure what to do about the sound bit (there doesn't seem to be an option for adding a media sound component). Is there another way around this?

    • @LDT7Y
      @LDT7Y 2 роки тому

      I've added a play sound 2D to activate along with the movie. Hopefully this will be ok. Is there a better way around it?

  • @letterborneVods
    @letterborneVods 2 роки тому +1

    Sometimes I suspect that you’re not really a human being but personified Unreal Engine itself trying to give us a hand

  • @280i
    @280i 2 роки тому

    Hi for some reason the audio in the video cuts out before the video can finish. Could someone tell me why that is happening? Thanks

  • @tonybush565
    @tonybush565 2 роки тому +1

    Video is presenting itself as a "Still Image" ?? no movement

  • @chopzymalone
    @chopzymalone 3 роки тому

    Does anyone know how to add a video player into a widget, like give the users the ablity to play and pause a video export (with audio)?

  • @NephariusAMG
    @NephariusAMG 2 роки тому

    My input didn't disable at all. I'm using the trigger box. what am i doing wrong?

  • @NANOTVLOGSjmf
    @NANOTVLOGSjmf 2 роки тому

    how about you only press p when you arre on certain checkpoint

  • @sonymusic11
    @sonymusic11 2 місяці тому

    For anyone having full screen white problem.
    I solved it by asigns the Media texture we create into the texture node of the Material.

  • @vito3824
    @vito3824 2 роки тому

    hello, in unreal 5, I can't import the video

  • @joker-jd3jd
    @joker-jd3jd 3 роки тому +1

    4:08 My media is not showing pls help

  • @GBTC2011
    @GBTC2011 2 роки тому

    Tried it in version 5.0.1 and it doesn't work. will not make the material and unable to play sound.

  • @wilismatrix9847
    @wilismatrix9847 9 місяців тому

    for some reason, the video was playing fine but now when I add the sound component and add the media player to it the video screen turns white, it plays only without the mediaplayer plugged into the sound component, please any one know how to fix this stupid issue or is there any plugin that manges video better than the buildt -in BP in UE5 ? :/

  • @archcast5550
    @archcast5550 11 місяців тому

    does not work on electric dreams ue5 has a bug on pcg project

  • @ezekielhabegger
    @ezekielhabegger 3 роки тому +3

    Videos don't play in packaged projects, I've packaged my game with videos using this method and it works just fine on my computer, but when the packaged game is played on another computer the video is a blank texture, how do I fix this?

    • @MattAspland
      @MattAspland  3 роки тому

      Hi mate, in the project settings, under packaging. I believe there is a section to add specific videos to include in the packaged build. I believe this solves that issue.

    • @ezekielhabegger
      @ezekielhabegger 3 роки тому +1

      @@MattAspland I've tried this and it works on my PC but not when a packaged game is executed on a different PC :/

    • @ezekielhabegger
      @ezekielhabegger 3 роки тому +1

      @@MattAspland Unless I'm putting the names in incorrectly? Is it just the name of the videos or the entire file path?

    • @MattAspland
      @MattAspland  3 роки тому

      @@ezekielhabegger Ah strange okay, I believe it is just the file name, the the entire path. However, we may need a new folder in Unreal to place these videos in. I know we need it for splash screens, and the same logic may also apply to in-game videos.
      We'd need a folder in the content browser named "Movies", and place all of your videos in there. This may resolve it.

    • @thenrgamingchannel
      @thenrgamingchannel 2 роки тому

      Creating folder movies in content folder solved your problem ?

  • @onubyink
    @onubyink 2 роки тому

    This worked for me, but after the video plays, my UE4 hangs. Anyone else experiencing this or knows how to fix? Thanks

  • @akungamegamer84
    @akungamegamer84 2 роки тому

    srry sir i want to ask something about play video in media player, I was import video file what i want to use for main menu, but in file path there is text like this "the selected media file will not get package , because its path points to a file outside the project". I can't play the video from media player, what should i do to fix it? I'll glad if u want to answer my problem. btw i always watching your videos every single day, because I learn much more unreal from your channel. Subsribe Done.

  • @clicks1794
    @clicks1794 3 роки тому

    I have texture but I don’t have the normal texture how do I get it

    • @MattAspland
      @MattAspland  3 роки тому

      Hey mate, if there isn't a download link to one, you can either create one easily in Photoshop, or use this website here :)
      cpetry.github.io/NormalMap-Online/

  • @USAIsrUKEUVngrdBLRckOccupiedUA
    @USAIsrUKEUVngrdBLRckOccupiedUA 2 роки тому

    How about play loop seamlessly?

    • @nikgiak2994
      @nikgiak2994 2 роки тому

      Hey, incase you still need help. Open your media player file, select the video you want to play from the bottom left list and under 'details' (bottom right window), tick 'loop'. Then save.

  • @dav
    @dav Рік тому

    Doesn’t work on UE5… when playing the video on the media player, I can see the Texture animating. But inside of the widget, the image material doesn’t work. Just show a blank image. Any idea if it’s due to UE5?

    • @pqwerty4720
      @pqwerty4720 Рік тому

      I am using UE5 and it works perfectly, check the material created for the MediaPlayer, check also that you have added that material to the widget image.

  • @ruffleraveninc3602
    @ruffleraveninc3602 10 місяців тому

    8:50 Heads up for anyone doing this in UE5, media sound is NOT accessible in the level blueprint.

  • @ThePrapanch123
    @ThePrapanch123 7 місяців тому

    Any Idea why playing the video is stutterring?

  • @rajdiproychowdhury2922
    @rajdiproychowdhury2922 2 роки тому

    the sound is not playing

  • @vladaslav
    @vladaslav 3 роки тому +1

    Can this also be used to add cinematics also?

    • @MattAspland
      @MattAspland  3 роки тому

      Hey man, you can do yeah, or you can use the method in my video below :)
      ua-cam.com/video/FOS9FMbUtq0/v-deo.html

    • @vladaslav
      @vladaslav 3 роки тому +1

      @@MattAspland Thanks 🤘

  • @Muhammad_Abdullah_Sultan
    @Muhammad_Abdullah_Sultan 3 роки тому

    Grape video

  • @azzeddindouakha3403
    @azzeddindouakha3403 Місяць тому

    video stuck on first frameany ideas ?

  • @ketchuptresh6380
    @ketchuptresh6380 6 місяців тому

    Wonderful tutorial! I only have one problem with my project. The widget works perfectly, but if I package my game and open the packaged version on a different computer, the widget is completely white. Does anyone have the same issue? or know how to resolve it?

    • @mrmateuszpl8207
      @mrmateuszpl8207 4 місяці тому

      same problem

    • @ketchuptresh6380
      @ketchuptresh6380 4 місяці тому

      Hey, i managed to fix this issue through A LOT of searching. Basically, you have to make sure that the videos are imported and kept in a specifically named folder in your unreal engine folder. If i remember correctly, the name should be ´movies´ or something along those lines. If its not, i suggest searching up your problem and you will most likely find the websites i found. Hope this helps:))@@mrmateuszpl8207

    • @sonymusic11
      @sonymusic11 2 місяці тому

      I solved this full screen white problem, just asigns the Media texture we create into the texture node of the Material.

  • @jankopapa
    @jankopapa 2 роки тому +1

    Hi! When I start the game, it only shows a white screen, it plays the sound but not the video. What is the problem?

    • @ECHSBACHS
      @ECHSBACHS 2 роки тому +2

      Did You ever solve this ?
      It works fine on one pc, but, on another just a white screen ??? I tried DX redist and C++ redist downloads ???

    • @jankopapa
      @jankopapa 2 роки тому

      @@ECHSBACHS Unfortunately I haven't managed to solve it yet, if anyone has any ideas or solutions please let me know! I wonder if some kind of plugin might help, no? "Window Movie Player" maybe? I don't know...

    • @jankopapa
      @jankopapa 2 роки тому +1

      @@ECHSBACHS Now the problem is solved! The path must be correct! .../Content/Movies - you have to put the video in the Movies folder. If you double-click on the video file, you can enter the path there

    • @ECHSBACHS
      @ECHSBACHS 2 роки тому +2

      @@jankopapa That worked. Thanks !

  • @que_scopes1224
    @que_scopes1224 3 роки тому +1

    if i'm able to use this as a video loping on my main menu then matt you can read our minds lol

    • @MattAspland
      @MattAspland  3 роки тому

      Absolutely man, you can tick "loop" on the video in the media player and not remove from parent, just open source and that's it. All the best man :)

  • @dangancopa111
    @dangancopa111 2 роки тому +1

    i followed every step and it just appears black.

  • @3DChaddd
    @3DChaddd 10 місяців тому

    I don't think audio works in Unreal 5.2 anymore. *Edited - Adding a "Media Sound Component" NODE to the Level Blueprint at the collision box nodes that spawns the widget, allowed me to select the correct video for the "Media Sound Component" node and then add a "Start Node" after it. Then when the Widget is "created" the audio played. Just typing this out I realized it really makes no sense how they set this up lol.

  • @LinucNerd
    @LinucNerd 2 роки тому

    There is one problem with this approach, it doesn't export the video along with the game when you build/package it.

    • @ECHSBACHS
      @ECHSBACHS 2 роки тому

      How do You get it to do that ?

    • @LinucNerd
      @LinucNerd 2 роки тому

      @@ECHSBACHS I'm still trying to figure that out. I'll report back if I find a solution

    • @thenrgamingchannel
      @thenrgamingchannel 2 роки тому

      Did you found a solution ?

    • @LinucNerd
      @LinucNerd 2 роки тому

      @@thenrgamingchannel sadly no :(
      I've given up on it.

    • @thenrgamingchannel
      @thenrgamingchannel 2 роки тому

      Did tou try creating movie folder in the content folder and add all videos there ?

  • @ReubenAStern
    @ReubenAStern 2 роки тому

    ...please avoid using the level BP. The moment your game gets even slightly complicated BOOM! A trillion glitches appear. I make invisible actors for that kinda thing. I've gotten horrifically complicated mechanics working like that.

  • @aliahmedgaming6083
    @aliahmedgaming6083 3 роки тому +2

    How to make a Player pick up objects and drop it with sound

    • @MattAspland
      @MattAspland  3 роки тому +1

      Hey mate, I can add it to my list :)

  • @Gierownik_Studios
    @Gierownik_Studios 2 роки тому

    this is not working

  • @Dominator-Cro
    @Dominator-Cro 27 днів тому

  • @TorQueMoD
    @TorQueMoD 8 місяців тому +1

    How stupid is it that you can add a MediaSoundComponent to a widget, but it can't actually reference your media player. It works in game mode, or player or pretty much every other BP. Just not the actual UMG. Yay Epic!

  • @alexjr977
    @alexjr977 3 роки тому +1

    How do you know, what i need ? lol

  • @Muhammad_Abdullah_Sultan
    @Muhammad_Abdullah_Sultan 3 роки тому

    Nikhe

  • @magnus00125
    @magnus00125 3 роки тому

    haha cutscene