Announcement

Collapse
No announcement yet.

how to import and play audio and video files on UE 4.13

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to import and play audio and video files on UE 4.13

    Hi all,
    I'm just finishing an interior scene and I was trying to import a background music and a video that I would like to loop on some screens into the scene.
    I remember in the older UE versions to import pretty easily sound assets, drag them into the scene and they where just ready to go.
    Now when I import audio or video assets unreal creates file media sources related to those files. I than have to create a media player, a media sound wave and a media texture in order to be able to drag and drop something into the scene. Even after this is done and even after I tried with some blueprint to force playing video texture or sound at game startup, I am not able to play any of them. Only thing it seems to work is the Media Player: if I play it in its properties panel, than I see the video reflecting in the Media texture on the content browser and also into the screens where the textures is applied into the scene. But If I play the game, nothing happens. Not even the background music is playing. Nothing.

    So I would like to know if something is changed in the way I have to manage Media sources in UE and how I can solve this thing.

    Thanks
    Nazzareno

    Update: With a quick export from Audacity I was able to import correctly an audio track to play in the background. I'm still not able to play a video file into a screen as a media texture.
    Last edited by Cyberglobe; 09-12-2016, 06:48 AM. Reason: Update

    Nazzareno Giannelli
    CTO | Senior 3D Artist
    myD3SIGN Ltd

    +39 335 13 12 044
    Skype: nazza87
    nazzareno@myd3sign.com
    www.nazzarenogiannelli.com

    #2
    I too can't play the video in-game. I have a fullscreen cutscene ready to play but the blue print plays the correct node with the media player variable, then nothing happens. Works flawlessly in Bink and terribly with the new 4.13 Media Player. Media player in UE4 never ever worked right.
    Current Project: Shadow Over Isolation

    Comment


      #3
      hi
      I have the same problem .
      In 4.12 i used to drag and drop in the content browser, done .
      In 4.13 i tried the same and also copy it in the project folder from explorer, import, create in 4.12 and open in 4.13 but nothing work .
      Does anyone have an explanation ?

      Thank you

      Comment


        #4
        I also can't get it to work in 4.13 on Windows8.1.

        This is what I am doing. The Open Source returns true, but the Play returns false. (and doesn't play)

        Click image for larger version

Name:	mediaplay.png
Views:	2
Size:	61.1 KB
ID:	1115464


        EDIT: It sort of works now. I forgot to do like in the below image. :P

        BUT it still does not seem to want to use the blueprint 'Play' node. It starts playing just because I have Play On Open = [x], but if I leave that un-checked and try to use the Play BP node it doesn't start playing.

        Click image for larger version

Name:	media2.png
Views:	1
Size:	37.3 KB
ID:	1115466
        Last edited by Fredrum; 09-16-2016, 12:12 AM.

        Comment


          #5
          Do not call Play right after OpenXYZ. It's not going to work, because it may take some time to open the media. Either check the PlayOnOpen checkbox in your MediaPlayer asset, or bind to the OnMediaOpened event.
          Gerke Max Preussner | UE4 Programming Consultant

          Logo
          Follow me on Github | Goodreads | Linkedin | Pinterest | SlideShare | Twitter.
          Chat with me as gmpreussner on Discord.

          Comment


            #6
            I just tested by putting in a Delay node in-between and it then works!

            Thanks!

            Comment


              #7
              Yeah, but that's not a very reliable hack. How long should the delay be? Well, it depends on how long the media takes to open. For media coming from the internet or a shared network drive, this may take much longer than you think.
              Gerke Max Preussner | UE4 Programming Consultant

              Logo
              Follow me on Github | Goodreads | Linkedin | Pinterest | SlideShare | Twitter.
              Chat with me as gmpreussner on Discord.

              Comment


                #8
                My video texture will only play if I manually open the Media Player WHILE the PIE is active and double-click the video file from the list at the bottom. It wasn't like this in 4.12.

                Comment


                  #9
                  Originally posted by christian-idean View Post
                  My video texture will only play if I manually open the Media Player WHILE the PIE is active and double-click the video file from the list at the bottom. It wasn't like this in 4.12.
                  Please read https://docs.unrealengine.com/latest...rce/index.html
                  You have to explicitly open media sources via Blueprint now.
                  Gerke Max Preussner | UE4 Programming Consultant

                  Logo
                  Follow me on Github | Goodreads | Linkedin | Pinterest | SlideShare | Twitter.
                  Chat with me as gmpreussner on Discord.

                  Comment


                    #10
                    Thank you, those steps did work. What a relief!

                    Comment


                      #11
                      I have no problem playing the video in 4.13, using OpenSource, but the audio doesn't ever play. The mediaplayer does have a sound asset.

                      Note, the same source .mp4 does play with sound if it's run in the startup movies.

                      Is something else needed to be called to play the Audio? Maybe I'm missing a checkbox somewhere in the MediaPlayer.

                      Comment


                        #12
                        I didn't have any problems when I created video by following the link (https://docs.unrealengine.com/latest...rce/index.html). However, when I created a widget video, a video doesn't play. The video will play when I click play in Media Player and the screen was messing (not full screen as defined in widget). Below is my blueprint. All in all, what I need to do is just playing the video in full screen with VR mode. Please help!!

                        Widget BluePrint
                        Click image for larger version

Name:	widget.PNG
Views:	1
Size:	314.3 KB
ID:	1117445

                        BluePrint calls widget and open video
                        Click image for larger version

Name:	BPplayVideoOnWidget.PNG
Views:	1
Size:	85.3 KB
ID:	1117446

                        How the video play in VR mode (HTC vive)
                        Click image for larger version

Name:	How the video play in VR mode (HTC vive).PNG
Views:	1
Size:	287.0 KB
ID:	1117447
                        Last edited by Champ2312; 10-25-2016, 01:21 AM.

                        Comment

                        Working...
                        X