Can`t play video from licode recording (VP8 codec)

Hi guys i have problem with playing video recorded by licode.

Licode generates me .mkv files with VP8 codec

There is something wrong with files generates by licode or i doesnt understand something.

for play videos im using:

<video width="400" controls>
   <source src="/rest/url/for/licode/recording" type="video/webm">

i tried a lot of other things, without any positive result…
When im opening link /rest/url/for/licode/recording in new tab browser open it as video files, but there is no video or sound. I can open this .mkv file e.g. via VLC.
I downloaded different video file with VP8 codec form web and with this file everything works fine.

Maybe you have any ideas, why it doesnt work as should… Maybe some different ideas?

I dont want to use ffmpeg and convert .mkv files, it takes to much time

i saw that in cpp code is more than pv8 codec, there is any option to use e.g. H264 or MPEG4 codec?

1 Like

Check out this thread.
In short, you can’t play Licode recorded videos directly on a video tag. You have two options:

  1. Play them via Licode creating a Stream from the recording. Note you will have to reencode the video stream using ffmpeg or libav or similar to get the best results.
  2. Transcode the stream to webm/h.264 or similar (again, using ffmpeg or libav) and serve it with your favourite web server/cdn/any solution for recorded videos.

ad. 1.
I tried that what is in doc

var stream2 = Erizo.Stream({audio:true, video:true, recording: 'asda2131231'});

but it doesnt work as i expect, i cant put stream of stream2 object to video tag (i can do it with stream that im recording).
I see in erizo logs my recording file path, but in client side i cant handle this stream, becouse its null…

ad. 2.
i dont want to convert .mkv becouse as I said, it takes to much time and thats why i have to find better solution. The best one whould be to save stream in different container not in matroska, another thing is that that file is broken, when i validate .mkv file i have a lot of errors

You cannot put that stream in a video tag. You will get a new “stream-added” event and you can subscribe to that stream… That’s the one that will display the video.
Sorry I missed your comment about not wanting to transcode, in any case, keep in mind in most cases you will need to post-process the video recorded in Licode for good results.

ok, im one step closer to my goal, but it still doesnt work. Now im handle stream i subscribed after that event, video tag is filled but video doesnt work. That stream has short ID, different that streams that im sending to licode.

Pity that in documentation of using recorded movie has so little informations. Could you complement that section of some more complicated code? I didnt saw it anywhere…