1

I have problem with recorded video in Red5 v1.0.2 (i had issues with previous v1, it does not recorded any video, with 1.0.2 it works). When I record flv I want to convert it to some mp4. But I have problem with settings, because every time there is some issue with quality/audio sync. Can u please help me how to convert with ffmpeg (in future automatic process on server).

Second problem is that in flash client buffer length is always 0, but in v0.8 it was filled and on end I waited until empty, here I'm not sure how long should I wait. I founded this url http://code.google.com/p/red5/issues/detail?id=312 where they said to wait until i get UnPublish.Success, but that event I got only after ns.close()

My flash client record settings is (FP10):

video:

  • resolution = 640x360
  • fps = 30
  • keyframeinterval = 15
  • video quality = 90
  • bandwidth = 0

audio:

  • microphone codec = SPEEX
  • encodeQuality = 9
  • silencelevel = 0

  • bufferTime = 15

recorded video parameters in VLC (translated from czech to english):

video

  • Codec: Flash Video (FLV1)
  • Resolution: 640x360
  • format: Planar 4:2:0 YUV

audio

  • codec: Speex Audio (spx )
  • frequency: 16000Hz
  • bits per sample: 16
  • data flow: 16 kb/s

FFMEPG info about video:

 Metadata:
   server          : Red5 Server 1.0.2 Rev: 4616
   creationdate    : Mon Sep 02 23:17:08 CEST 2013
   canSeekToEnd    : true
 Duration: 00:00:33.24, start: 0.000000, bitrate: 645 kb/s
   Stream #0:0: Video: flv1, yuv420p, 640x360, 625 kb/s, 1k tbr, 1k tbn, 1k tbc

   Stream #0:1: Audio: speex, 16000 Hz, mono, s16, 16 kb/s

bsplayer showing 25fps - but I recorded 30fps, I dont understand this so much.

what I tried with ffmpeg (I'm ffmpeg newbie).

First I recorded 33sec long video

when I convert audio with command: ffmpeg -i test.flv -ar 44100 -ab 160k -ac 1 output.mp3 , then the audio have only 30sec

I tried this commands, but no one with good solution

ffmpeg -i test.flv -vcodec mpeg4 -acodec libvo_aacenc output.mp4

ffmpeg -i test.flv -acodec libvo_aacenc -aq 200 outputsss.mp4

ffmpeg -i test.flv -c:v libvpx -c:a libvorbis output.webm // here is sound synced good - but sound have repeating silence lags (every 1-2s)

really thank you for your help, I'm fighting with conversion many days :(

1
  • Did you tried with Xuggler..? In Xuggler IMediaReader and IMediaWriter will help you to convert flv to mp4 Commented Dec 5, 2013 at 13:20

1 Answer 1

0

We had these Audio Delay issues as well (we're still at 0.8, as 1.0 corrupted recorded FLV files - will try again with 1.0.3).

Our solution was to use the command line "MediaInfo" tool to extract the audio delay. MediaInfo can return XML output (be sure to check for the version string, as this output tends to change with the version) and we parsed for something like /Mediainfo/File/track[@type="Audio"], the correct entry is named (in our case) Video_Delay_String3.

This then is fed into the ffmpeg transcode command with -itsoffset -00:00:00.XX.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your response. By time I founded, that it is maybe created by playing. Because of small buffer. While you are recording video and audio packets are stored in buffer in random order. So it is necessary to set while playing big buffer size (best is to set is same length as video length). I left RED5 and now I am using nginx, that works perfectly, but still have to use this buffer fix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.