[FFmpeg-user] From Webcam (windows PC ) to red5 rtmp (linux)

jacky_free renaux.jacky at orange.fr
Sat Dec 24 15:11:29 CET 2011


Hi

I would like to direct stream from webcam to red5 
On windows PC to linux red5 

 
My command line are 
 
set prog=ffmpeg.exe
set bb=400k
set ss=720x576
set aspect=4:3
set fps=25.00
set f_out="rtmp://myserver/oflaDemo playpath=oflaDemo/canal1 live=1 " 

set lcmd0= -vcodec flv -g %gg% -b:v %bb% -r %fps% -s %ss% -aspect %aspect%
-an -benchmark
set lcmd1= -cmp 2 -subcmp 2 -mbd 2 -flags -aic-cbp-mv0-mv4 -trellis 1
 %prog%  -debug 1 -dump -re -f vfwcap -i 0 %lcmd0% %lcmd1%  -an   -y %f_out%



The results are 

ffmpeg version N-35462-g61b1d85, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Dec  5 2011 14:22:27 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
--enable-zlib
  libavutil    51. 30. 0 / 51. 30. 0
  libavcodec   53. 40. 0 / 53. 40. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 51. 0 /  2. 51. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[vfwcap @ 020C9FE0] BITMAPINFOHEADER
[vfwcap @ 020C9FE0] biSize:	40
[vfwcap @ 020C9FE0] biWidth:	320
[vfwcap @ 020C9FE0] biHeight:	240
[vfwcap @ 020C9FE0] biPlanes:	1
[vfwcap @ 020C9FE0] biBitCount:	24
[vfwcap @ 020C9FE0] biCompression:	0
[vfwcap @ 020C9FE0]     biCompression:	""
[vfwcap @ 020C9FE0] biSizeImage:	230400
[vfwcap @ 020C9FE0] biXPelsPerMeter:	0
[vfwcap @ 020C9FE0] biYPelsPerMeter:	0
[vfwcap @ 020C9FE0] biClrUsed:	0
[vfwcap @ 020C9FE0] biClrImportant:	0
[vfwcap @ 020C9FE0] CAPTUREPARMS
[vfwcap @ 020C9FE0] dwRequestMicroSecPerFrame:	66667
[vfwcap @ 020C9FE0] fMakeUserHitOKToCapture:	0
[vfwcap @ 020C9FE0] wPercentDropForError:	10
[vfwcap @ 020C9FE0] fYield:	0
[vfwcap @ 020C9FE0] dwIndexSize:	34952
[vfwcap @ 020C9FE0] wChunkGranularity:	0
[vfwcap @ 020C9FE0] fUsingDOSMemory:	0
[vfwcap @ 020C9FE0] wNumVideoRequested:	5
[vfwcap @ 020C9FE0] fCaptureAudio:	1
[vfwcap @ 020C9FE0] wNumAudioRequested:	4
[vfwcap @ 020C9FE0] vKeyAbort:	27
[vfwcap @ 020C9FE0] fAbortLeftMouse:	1
[vfwcap @ 020C9FE0] fAbortRightMouse:	1
[vfwcap @ 020C9FE0] fLimitEnabled:	0
[vfwcap @ 020C9FE0] wTimeLimit:	0
[vfwcap @ 020C9FE0] fMCIControl:	0
[vfwcap @ 020C9FE0] fStepMCIDevice:	0
[vfwcap @ 020C9FE0] dwMCIStartTime:	0
[vfwcap @ 020C9FE0] dwMCIStopTime:	0
[vfwcap @ 020C9FE0] fStepCaptureAt2x:	0
[vfwcap @ 020C9FE0] wStepCaptureAverageFrames:	0
[vfwcap @ 020C9FE0] dwAudioBufferSize:	0
[vfwcap @ 020C9FE0] fDisableWriteCache:	0
[vfwcap @ 020C9FE0] AVStreamMaster:	0
[rawvideo @ 02789A60] err{or,}_recognition separate: 1; 1
[rawvideo @ 02789A60] err{or,}_recognition combined: 1; 65537
[vfwcap @ 020C9FE0] All info found
[vfwcap @ 020C9FE0] Estimating duration from bitrate, this may be inaccurate
Input #0, vfwcap, from '0':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/1000: Video: rawvideo, bgr24, 320x240, 1001/30000,
29.97 tbr, 1k tbn, 29.97 tbc
[NULL @ 027C3EC0] Unable to find a suitable output format for
'rtmp://.........../oflaDemo playpath=oflaDemo/canal1 live=1 '
rtmp://.........../oflaDemo playpath=oflaDemo/canal1 live=1 : Invalid
argument

I did mask server address 

It seems there are discrepencies between 
vcodec from webcam and 
vcodec to rtmp which must be flv 

Is there something which I can modify  ? 
Is there a way to pipe on windows (from webcam to temp_file , and temp_file
to rtmp 
Allowing to reencode to AVC to rtmp stream ?)

Thanks and have a nice christmas fest 

Regards 
jacky 





More information about the ffmpeg-user mailing list