[jitsi-dev] Recording and Playing video and sound in the bridge


#1

After a bit of a struggle I now can record webm using some java code as part of a conference. The resultant file seems sensible in mkvalidator and gives the right sort of info in mkvinfo, it plays badly in windows media player and vlc, windows gives a static image at the start and vlc gives a black frame for a while, then displays the correct image moving a bit slowly, and then it comes into a bit of a mess with the encryption of the frames and goes really colourful a bit like a surrealist painting.

It strikes me that I have a problem with the timecode and also that I am probably dropping some frames.

As part of debugging this what I would like to do is to run code to play the resultant webm file. Which I might be able to use also to run other webm files. (or at least the video track).

I note that in the neomedia classes there is a datasource based upon an Ivf file which is supposed to be created from a webm file. I am, however, not that clear on how I might find webm-ivf convertor.

It strikes me that it might be sensible to modify that to simply run from a webm file from which I might be able to spot where I am going wrong on writing the file.

Is this a sensible strategy or is there an easier route?


#2

After a bit of a struggle I now can record webm using some java code as
part of a conference. The resultant file seems sensible in mkvalidator
and gives the right sort of info in mkvinfo, it plays badly in windows
media player and vlc, windows gives a static image at the start and vlc
gives a black frame for a while, then displays the correct image moving
a bit slowly, and then it comes into a bit of a mess with the encryption
of the frames and goes really colourful a bit like a surrealist painting.

Yeah, I think it would be fair to say that the current recording code is more art than science :wink:

It strikes me that I have a problem with the timecode and also that I am
probably dropping some frames.

IIRC we do not set the correct duration in the webm headers. The reason is that we never needed it, since the tools we used for post-processing (ffmpeg) worked fine without it.

As part of debugging this what I would like to do is to run code to play
the resultant webm file. Which I might be able to use also to run other
webm files. (or at least the video track).

I note that in the neomedia classes there is a datasource based upon an
Ivf file which is supposed to be created from a webm file. I am,
however, not that clear on how I might find webm-ivf convertor.

I think ffmpeg supports ivf. But I don't think the whole approach would be useful.

Regards,
Boris

···

On 15/04/2017 05:12, John Hemming wrote:


#3

I didn't set the correct duration I just put in a minute. I have also not transcoded the cues. I couldn't quite follow what was happening in the C++ for this so I have left them out for now.

Thanks for the pointer to ffmpeg. I will have a lot at that when I have got somewhere with what I am doing. I think it should do a webm to ivf conversion.

If you don't think it is useful then I won't bother to tidy up the code and publish it. I started with the red5 class that claimed to be a webm writer. Although it has a lot of the grunt work done it needed quite a bit of fixing - for example it uses hashmaps to keep lists of tags in a compound tag which isn't much good when you lose all but one of the simpleblocks in a cluster.

I also rejigged it so that the segment is updated once the rest of the file is written to disk because otherwise all of the file would be held in memory.

···

On 16/04/2017 02:14, Boris Grozev wrote:

On 15/04/2017 05:12, John Hemming wrote:

After a bit of a struggle I now can record webm using some java code as
part of a conference. The resultant file seems sensible in mkvalidator
and gives the right sort of info in mkvinfo, it plays badly in windows
media player and vlc, windows gives a static image at the start and vlc
gives a black frame for a while, then displays the correct image moving
a bit slowly, and then it comes into a bit of a mess with the encryption
of the frames and goes really colourful a bit like a surrealist painting.

Yeah, I think it would be fair to say that the current recording code is more art than science :wink:

It strikes me that I have a problem with the timecode and also that I am
probably dropping some frames.

IIRC we do not set the correct duration in the webm headers. The reason is that we never needed it, since the tools we used for post-processing (ffmpeg) worked fine without it.

As part of debugging this what I would like to do is to run code to play
the resultant webm file. Which I might be able to use also to run other
webm files. (or at least the video track).

I note that in the neomedia classes there is a datasource based upon an
Ivf file which is supposed to be created from a webm file. I am,
however, not that clear on how I might find webm-ivf convertor.

I think ffmpeg supports ivf. But I don't think the whole approach would be useful.

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev