Skip to main content
Inspiring
June 30, 2014
Answered

Record Live event on FMS

  • June 30, 2014
  • 1 reply
  • 385 views

I have same issue by FMS and F4V format.

I want to archive live event at same time and to do that I record live stream in F4V format on the onPublish event.

This is main.asc codes:

[code]

//live stream fragments

var liveStream = Stream.get("f4f:" + streamName.name);

liveStream.record();

liveStream.play(streamName,-1,-1);

//Create Archive (f4v) for on-demand

var vodFile = Stream.get("mp4:" + StreamName.name + ".f4v");

vodFile.record();

vodFile.play(streamName,-1,-1);

[code]

So when I use h264 in my source event when FMS create f4v, F4V file is 320kb (f4v isn't growing) and just record 5 second of my event whoever my live event is more than 1 hour.

But when I don't use h264 in source event my F4V file is correct and record all 1 hour video from live event.

I don't know what's a problem

I use FMS 5 extended edition and FFMPEG for stream webcam on to the FMS

This is my FFMPEG code:

[code]

ffmpeg -f dshow -i video="A4TECH USB2.0 PC Camera" -vcodec libx264 -b:v 32k -acodec libmp3lame -b:a 64k -ar 44100  -f flv rtmp://12.11.1.3/livepkgr/liveevent?adbe-live-event=liveevent

Please advise me to solve this problem.

Many Thanks.

This topic has been closed for replies.
Correct answer m_yazdian

Solve above problem with edit FFMPEG syntax.

[code]

ffmpeg -y -f dshow -s 640*480 -i video="A4TECH USB2.0 PC Camera":audio="Microphone (Creative SB Audigy 2 ZS (WDM))"  -c:v libx264 -b:v 120k -pix_fmt yuv420p -vb 450 -an -map 0:0 -acodec libmp3lame -b:a 64k -ar 44100 -f flv rtmp://12.11.1.3/livepkgr/Liveevent?adbe-live-event=Liveevent

1 reply

m_yazdianAuthorCorrect answer
Inspiring
July 1, 2014

Solve above problem with edit FFMPEG syntax.

[code]

ffmpeg -y -f dshow -s 640*480 -i video="A4TECH USB2.0 PC Camera":audio="Microphone (Creative SB Audigy 2 ZS (WDM))"  -c:v libx264 -b:v 120k -pix_fmt yuv420p -vb 450 -an -map 0:0 -acodec libmp3lame -b:a 64k -ar 44100 -f flv rtmp://12.11.1.3/livepkgr/Liveevent?adbe-live-event=Liveevent