Skip to main content
BenSimonI2X
Participating Frequently
October 3, 2012
Question

Recorded FLV files contain corrupt timestamps

  • October 3, 2012
  • 1 reply
  • 2631 views

Howdy -

I'm running FMS 4.5.3 r2005 on standard AWS Linux box.  I'm recording the streams using NetStream.publish("appendWithGap") from a small custom Flash app running on IE+Windows.

Usually, the generated .flv file is fine. However, I've found a number of cases where the .flv file generated was corrupt.  By using ffprobe -show_packets I'm able to see that the presentation timestamp (PTS) of sequential packets occasionally remain the same.  This happens for both audio and video at times. For example, consider the output of the command:

$ ffprobe -show_packets saved.flv | egrep -e '(pts=|codec)'

codec_type=video

pts=0

codec_type=video

pts=0

codec_type=video

pts=0

codec_type=video

pts=0

codec_type=video

pts=0

codec_type=video

pts=0

...

codec_type=video

pts=3912

codec_type=video

pts=3944

codec_type=video

pts=3944

codec_type=video

pts=3944

codec_type=video

pts=3944

codec_type=video

pts=3944

codec_type=video

pts=3944

codec_type=video

pts=3944

codec_type=video

pts=3944

I really don't know much about the internals of the FLV format, but I assume that invalid timestamps like these make for a non-playable (corrupt) video.

Any idea what may cause FMS to record such a video?

What kind of information would be helpful to debug this?

Obviously, my client expects every video recorded to be one that an be played back, and so these corrupt videos are alarming to say the least.

FYI, due to privacy restrictions I can't share the recorded video without a signed NDA.  If it would help, I can provide the entire output of ffprobe.

Thanks,

Ben

This topic has been closed for replies.

1 reply

Participant
October 17, 2012

Can you please validate the flv file using flvcheck tool. You may refer this link for further details.  http://help.adobe.com/en_US/flashmediaserver/configadmin/WS5b3ccc516d4fbf351e63e3d119f29261b7-7ffc.html

BenSimonI2X
Participating Frequently
October 17, 2012

When I run flvcheck without any arguments I get:

$ /opt/adobe/fms/tools/flvcheck stream.flv

FLVCheck version 4,5,3,2005 - Utility to validate flv and mp4 media files.

Copyright(c) 1993-2012 Adobe Systems Incorporated. All Rights Reserved.

www.adobe.com

12-10-17 22:00:38       stream.flv passed

When I add the -w flag I get 17,673 of these messages:

Warning:    -110Video may appear stalled due to lack of audio data. stream.flv

When I add -v I see 17,673 of  these messages:

Adding silence message at time: 2083  ASR: 500

Any thoughts?

Participant
October 18, 2012

Flvcheck has validated the format of file, and it is correct. The logs "Adding Silence message" indicates that audio message was expected and is not recieved after a particular time check, because of which video may appear stalled. Flvcheck -s should fix video stall issue.

To debug this issue, a good starting point would be, validating the input to FMS. FMS records what is published to it. Since you are able to reproduce this issue, can you please enable livestream logging and check if input stream to FMS is different from what it is recording. 

You can get more information about livestream logs at: http://helpx.adobe.com/adobe-media-server/kb/activate-live-netstream-diagnostic-logging.html