Hey Davide,<div><br></div><div>Another way of playing a video in matlab is via psychtoolbox (
<a href="http://psychtoolbox.org/HomePage" target="_blank">http://psychtoolbox.org/HomePage</a> ) and using SimpleMovieDemo.m to play a movie...see if that is any useful.</div><div><br></div><div>Cheers!<br clear="all">Vikram Rao<br>
UC Berkeley, Psychology Dept.<br>
Berkeley, California, USA<br>"Brain cells come and brain cells go, but fat cells live forever!!"<br>
<br><br><div class="gmail_quote">On Thu, Sep 6, 2012 at 10:38 AM, Davide Baldo <span dir="ltr"><<a href="mailto:davidebaldo84@gmail.com" target="_blank">davidebaldo84@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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><span><font color="#888888"><div><br></div><div><br></div><div>Davide.</div>
</font></span><br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br></blockquote></div><br></div>