When it works, aka logged in as normal user over ssh, su -u www-data, run batch which contains cvlc command
Code: Select all
0x8815a78] [Media: record_session] main filter debug: looking for video filter2 module: 20 candidates
[0x8815a78] [Media: record_session] swscale filter debug: 1280x720 chroma: RGBA -> 1280x720 chroma: I420 with scaling using Bicubic (good quality)
[0x8815a78] [Media: record_session] main filter debug: using video filter2 module "swscale"
[0x8815a78] [Media: record_session] main filter debug: TIMER module_need() : 1.321 ms - Total 1.321 ms / 1 intvls (Avg 1.321 ms)
[0xb3001648] main decoder debug: removing module "png"
[0x8815a78] main filter debug: removing module "swscale"
When it faults, apache run by www-data, php calling same batch file
Code: Select all
[0xb3886a10] [Media: record_session] main filter debug: looking for video filter2 module: 20 candidates
[0xb3886a10] [Media: record_session] swscale filter debug: 1280x720 chroma: RGBA -> 1280x720 chroma: I420 with scaling using Bicubic (good quality)
[0xb3886a10] [Media: record_session] main filter debug: using video filter2 module "swscale"
[0xb3886a10] [Media: record_session] main filter debug: TIMER module_need() : 1.850 ms - Total 1.850 ms / 1 intvls (Avg 1.850 ms)
Segmentation fault
Code: Select all
if($i == 1 ) shell_exec("nohup /usr/local/Gideo2/bin/start.sh > /usr/local/Gideo2/tmp/server.log 2>&1 &");
Code: Select all
#!/bin/sh
cat /dev/null > /usr/local/Gideo2/tmp/debug.log
cp /usr/local/Gideo2/etc/stream.conf /usr/local/Gideo2/tmp/stream.conf
cvlc -I telnet --telnet-password xxxxxx \
--vlm-conf /usr/local/Gideo2/etc/stream.conf -vvvv --color --file-logging --ttl 12 --udp-caching 100000 \
--sout-mux-caching 250000 --logfile /usr/local/Gideo2/tmp/debug.log --extraintf http,logger \
--sout-keep \
--sout-transcode-high-priority --sout-transcode-threads 4
Code: Select all
del all
new record_session broadcast enabled
setup record_session input "fake://" option "fake-file=/usr/local/Gideo2/lib/background-light-branded.png" option "fake-ar 4:3" option "fake-width=1280" option "fake-height=720"
setup record_session output #transcode{sfilter=mosaic,vcodec=h264,vb=512,scale=.5,threads=4,audio-sync=1}:bridge-in:duplicate{dst=std{access=file,mux=mp4,dst="/usr/local/Gideo2/tmp/record_session.mp4"}}
#setup record_session output #transcode{sfilter=mosaic,vcodec=h264,vb=512,scale=.5,threads=4,audio-sync=1}:bridge-in:duplicate{dst=std{access=file,mux=mp4,dst="/usr/local/Gideo2/tmp/record_session.mp4"},dst=rtp{mux=ps,dst=239.255.12.42,port=1234,sap,name="TestStream"}}
#setup record_session output #transcode{sfilter=mosaic,vcodec=h264,vb=512,scale=.5,threads=4,audio-sync=1,venc=x264{keyint=120,bpyramid,chroma-me,me-range=8,ref=1,ratetol=1.0,8x8dct,mixed-refs,direct=auto,direct-8x8=-1,non-deterministic,scenecut=50}}:bridge-in:duplicate{dst=std{access=file,mux=mp4,dst="/usr/local/Gideo2/tmp/record_session.mp4"}}
#setup record_session option sub-filter=mosaic
# Mosaic options
setup record_session option mosaic-alpha=255
setup record_session option mosaic-height=720
setup record_session option mosaic-width=1280
#setup record_session option mosaic-align=5
#setup record_session option mosaic-xoffset=10
#setup record_session option mosaic-yoffset=10
setup record_session option mosaic-vborder=5
setup record_session option mosaic-hborder=10
setup record_session option mosaic-position=2
setup record_session option mosaic-rows=1
setup record_session option mosaic-cols=2
setup record_session option mosaic-order=Camera1,Camera2,Camera2Primary,Camera1Primary
setup record_session option mosaic-delay=10000
setup record_session option mosaic-keep-picture
setup record_session option mosaic-keep-aspect-ratio
setup record_session option mosaic-offsets=18,16,640,16,214,4,214,4
# Setup new vlm redial #
new camera1 broadcast enabled
setup camera1 input rtsp://root:greenlight@192.168.3.227/mpeg4/1/media.amp
setup camera1 output #mosaic-bridge{id=Camera1,width=624}
setup camera1 option no-sout-audio
new camera2 broadcast enabled
setup camera2 input rtsp://root:greenlight@192.168.3.226/mpeg4/1/media.amp
setup camera2 output #mosaic-bridge{id=Camera2,width=624}
#setup camera2 option rtsp-tcp
setup camera2 option no-sout-audio
new camera1primary broadcast enabled
setup camera1primary input rtsp://root:greenlight@192.168.3.227/mpeg4/1/media.amp
setup camera1primary output #mosaic-bridge{id=Camera1Primary,height=640,width=852}
#setup camera1primary option rtsp-tcp
setup camera1primary option no-sout-audio
new camera2primary broadcast enabled
setup camera2primary input rtsp://root:greenlight@192.168.3.226/mpeg4/1/media.amp
setup camera2primary output #mosaic-bridge{id=Camera2Primary,height=640,width=852}
#setup camera2primary option rtsp-tcp
setup camera2primary option no-sout-audio
new audio broadcast enabled
setup audio input rtsp://root:greenlight@192.168.3.226/mpeg4/1/media.amp
setup audio output #transcode{acodec=mp4a,ab=64,samplerate=11025,channels=1}:duplicate{dst=bridge-out,dst=std{access=file,mux=mp4,dst="/usr/local/Gideo2/tmp/record_session-audio.mp4"}
#setup audio output #transcode{acodec=mp4a,ab=64,afilter=mono,samplerate=22050,channels=1}:duplicate{dst=bridge-out{id=401},dst=standard{access=file,mux=mp4,dst="/usr/local/Gideo2/tmp/record_session-audio.mp4"}etup audio output #duplicate{dst={transcode{acodec=mp3,ab=16,channels=1}:bridge-out{id=3}},select=audio,dst=bridge-out{id=3}}
setup audio option no-sout-video