WebMediaCapture and Video

Does WebMediaCapture record video as Base64 as it does for audio? I have added a WebCamera1 with WebMediaCapture1 to a form, set WebMediaCapture1.Camera to WebCamera1, set WebMediaCapture1.Capture=mctBoth. I record (what I think) is a small video with audio. I then set the WebMultimediaPlayer1.URL, instead of AUDIO ('data:audio/wav;base64,'+String) to ('data:video/mp4:base64, '+String. I do hear the audio, but don't see the video. Any thoughts??
Thanks
Doug

Do you set:
WebMultiMediaPlayer.MultimediaType = mtVideo?

Yes, I set MultiMediaType=mtVideo, yet I only hear audio. Any thoughts?

Did you verify the URL effectively has video?

I use WebMediaCapture setting capture to both video and audio. Is there a suggestion as to how to access the video that this generates? I can only go by the Dictaphone example, I don't see documentationon how to access the video. I was assuming it was base64 encoded audio and video... Please help
Doug

Hello,

The following works here, both TWebMediaCapture and TWebMultimediaPlayer are used with default settings:

procedure TForm1.WebButton1Click(Sender: TObject);
begin
  WebMediaCapture1.Start;
end;

procedure TForm1.WebButton2Click(Sender: TObject);
begin
  WebMediaCapture1.Stop;
end;

procedure TForm1.WebMediaCapture1StopCapture(Sender: TObject;
  ABinary: TJSUint8Array; ABase: string);
begin
  WebMultimediaPlayer1.URL := 'data:video/mp4;base64,' + ABase;
end;

Maybe it's a typo in this post but please make sure that you assign the correct base64 prefix. Instead of data:video/mp4:base64, it should be data:video/mp4;base64,. Also make sure that your cache is emptied and the required permissions are granted for the website (for video and audio access).

Thank you, Tunde, for replying. I have used exactly your suggestions, as well as the semicolon in the string. I get audio and no video on playback. I see myself in the video as it's recording, but on playback i see no video. Do you have any suggestions? It should be pretty simple... very frustrating
doug

Hi Doug,

Unfortunately I cannot reproduce what you are experiencing. Which WEB Core version, operating system and browser are you using?

Do you see a size difference of the base64 string when you record audio vs audio+video? This in order to understand this is a recording issue or a playback issue.

Hi, Tunde -- I start with Dictaphone sample from TMSSoftware. I copy that into another directory. That works fine. Then I add a webcamera, and set webmediacapture1.Camera to WebCamera1. Then I set WebMediaCapture1.Capture to mctBoth for audio and video. Then I set WebMultimediaPlayer1.MultimediaType to mtVideo. Then I change PlayRecording(ABase: String) to include: WebMultimediaPlayer1.URL := 'data:video/mp4;base64,' + ABase;

I run the program, I see video on the screen. I click start/stop. When I play the clip, I hear the audio, but the screen is black where the video should be.

I am using latest Web Core, Windows 10 Pro, Chrome Browser...

Any thoughts? Do you have a simple program that works that I could try?
Thank you
Doug

Hi Doug,

Did you also set theTWebMultimediaPlayer.Visible property to True? It's set to False in the demo, so it would make sense you don't see any video.

A simple program would be dropping TWebMediaCapture, TWebMultimediaPlayer, TWebCamera and two TWebButtons onto a form. Then you assign TWebCamera to TWebMediaCapture.Camera and you implement the TWebMediaCapture.OnStopCapture and TWebButton.OnClick events like in my example above.

Thank you so much Tunde! It was the visible property that was set to false. I can't believe it was that simple. Thank you so much for your help!
Doug