문제

I just installed a testing version of Adobe Media Server 5 and I'm trying to create an application that will save the videos to disk for later play.

I've found code online that suggests stream.record(), but this results in an FLV file with the correct name, but is less than a kB in size. Inspecting the file with mediainfo (a tool) shows me that the duration of the "video" is correct (for example 2 min 27 sec), but it contains no actual data.

Is my code wrong? Or am I missing a setting?

My main.asc:

application.onPublish = function(clientObj, streamObj) {
    streamObj.record("append");
}

application.onUnpublish = function(clientObj, streamObj) {
    streamObj.record(false);
}

All I want is that people can watch live, but there is still a recording for watching later as well (not DVR mode).

도움이 되었습니까?

해결책

The answer is not the code, that works, but it's the CODECs. If I stream using my tool in audio AAC, that doesn't work. If I stream my desktop (that's what the application does) in x264, that doesn't work either.

If I stream audio in mp3, the file grows.

Unfortunately, the tool doesn't stream video in another codec, so I can't be sure that video is saved, but I assume so.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top