Web flash push stream recording test research

I wrote a demo of push streaming test with flash as3, refer to srs_publisher and simplest_as3_rtmp_streamer.
Push the stream to the srs2 server and record it as a flv file.
The results of the test round are as follows:

The stream pushed by Web Flash is recorded as flv through srs.
srs set jitter_time full; dvr_plan segment; dvr_duration 180; actual recording 180s.
flowplayer can play server flv files with sound, no video, no time stamp, and no seek support. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
jwplayer can play server flv files with sound, no video, no time stamp, and no seek support. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
sewiseplayer can play server flv files with sound, no video, no time stamp, and no seek support. (ffmpeg,yamdi,flvmeta) After the meta is repaired, the normal playback has a time tag seek function that can be added later.
strobe can play server flv files with sound and video without time tags and does not support seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
srs set jitter_time zero; it seems to be OK, the notebook has been tested.

srs set jitter_time off; dvr_plan session;
flowplayer can play server flv files with sound, no video, no time stamp, and no seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
jwplayer can play server flv files with sound, no video, no time stamp, and no seek support. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
sewiseplayer can play server flv files with sound, no video, no time stamp, and no seek support. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
strobe can play server flv files with sound and video without time tags and does not support seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.

srs set jitter_time zero; dvr_plan session;
flowplayer can play server flv files with sound, no video, no time stamp, and no seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
jwplayer can play server flv files with sound and video with wrong aspect ratio, no time tag and no seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
sewiseplayer can play server flv files with sound, video, and time tags, but does not support seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.
strobe can play server flv files with sound and video without time tags and does not support seek. (ffmpeg, yamdi, flvmeta) After repairing meta, normal playback has time tags to support seek.

Haven't solved this for a while, thought it was the way it was. I also discussed this issue with netizens, and it was treated as an srs feature.
In the past few days, I have studied the recorded files and found that the recorded flv format is not the same as the flv format recorded by other platforms.
Use FlvParse to analyze the structure of the recorded flv file, and find that:
the flv converted by ffmpeg has the field onMetaData, but the web flash push stream recording sends flv not.

After looking up the interface, I found that as3 also has the onMetaData interface, which I did not call. Add the following code to solve:

 1 // add metaData for stream
 2     var metaData:Object = new Object();
 3     metaData.title = "SptCallCenter";
 4     metaData.author = "Jeffer";
 5 metaData.width = av_hd_width;
 6     metaData.height = av_hd_height;
 7     metaData.videodatarate = av_hd_Vbitrate/1000;
 8     metaData.framerate = av_hd_fps;
 9 //send metadata
10     metaData.videocodecid = 7;
11     metaData.audiosamplerate = 16000;
12     metaData.audiocodecid = 4;
13     media_stream.send("@setDataFrame", "onMetaData", metaData); 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324524250&siteId=291194637