<div>Dear all,</div><div><br></div><div>I know the following question does not concern EEGLAB, but I guess many user might have had my same problem.</div><div><br></div><div><br></div><div>I need to load a .mp4 video into Matlab to process it frame by frame. The video contain audio as well.</div>
<div><br></div><div>To import the video into Matlab I am using:</div><div><br></div><div>xyloObj = VideoReader( MyVideo );</div><div>info = get(xyloObj);</div><div><br></div><div>info = </div><div><br></div><div>          Duration: 50.4746</div>
<div>              Name: 'SuperMarioTest.mp4'</div><div>              Path: 'C:\Users\programmer\Documents\MATLAB\'</div><div>               Tag: ''</div><div>              Type: 'VideoReader'</div>
<div>          UserData: []</div><div>      BitsPerPixel: 24</div><div>         FrameRate: 29.9700</div><div>            Height: 1080</div><div>    NumberOfFrames: 1514</div><div>       VideoFormat: 'RGB24'</div><div>
             Width: 1920</div><div><br></div><div><br></div><div>Everything works fine and I am able to process the video frame by frame and save the output in another .mp4 file, but the output video has no audio!:</div><div>
<br></div><div>    mov.cdata = vidFrames(:,:,:,1);</div><div>    mov.colormap = [];</div><div>    OBJ.writeVideo(mov.cdata);</div><div><br></div><div><br></div><div>I have the following problem: I need the audio to be present in the output video (the same audio that is present in the input video).</div>
<div><br></div><div>How can I do that???</div><div><br></div><div>Thanks a lot for you help!</div><div><br></div><div><br></div><div>Davide.</div>