Hello I hope someone can help. I have been at this on and off for over a year.
I have this video from webcam
ffprobe -v error -show_format -show_streams 'rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?'
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=unknown
codec_type=video
codec_time_base=0/2
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=0
height=0
coded_width=0
coded_height=0
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:0
pix_fmt=unknown
level=-99
color_range=N/A
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=false
nal_length_size=0
id=N/A
r_frame_rate=180000/2
avg_frame_rate=0/0
time_base=1/90000
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
[STREAM]
index=1
codec_name=pcm_alaw
codec_long_name=PCM A-law / G.711 A-law
profile=unknown
codec_type=audio
codec_time_base=1/8000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=s16
sample_rate=8000
channels=1
channel_layout=unknown
bits_per_sample=8
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/8000
start_pts=N/A
start_time=N/A
duration_ts=N/A
duration=N/A
bit_rate=64000
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
[/STREAM]
[FORMAT]
filename=rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?
nb_streams=2
nb_programs=0
format_name=rtsp
format_long_name=RTSP input
start_time=0.000000
duration=N/A
size=N/A
bit_rate=64000
probe_score=100
TAG:title=RTSP Session
[/FORMAT]
I have this as ffserver.conf
HTTPPort 8090
RTSPPort 5555
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 20
MaxClients 10
MaxBandwidth 100000
CustomLog -
NoDefaults
<Feed martincam1.ffm>
File /tmp/martincam1.ffm
FileMaxSize 10M
ACL allow 127.0.0.1
</Feed>
<Stream martincam.webm>
Feed martincam1.ffm
Format webm
# Audio settings
AudioCodec vorbis
AudioChannels 1
AudioBitRate 64
AudioSampleRate 48000
# Video settings
VideoCodec libvpx
VideoSize 352x240
VideoFrameRate 10
AVOptionVideo cpu-used 10
AVOptionVideo qmin 10
AVOptionVideo qmax 42
AVOptionVideo quality good
AVOptionAudio flags +global_header
PreRoll 2
StartSendOnKey
VideoBitRate 400 # Video bitrate
</Stream>
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>
I can encode only if I insert silent audio as such
/usr/bin/ffmpeg -loglevel 0 -f lavfi -i anullsrc=channel_layout=mono:sample_rate=48000 -i "rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?" http://127.0.0.1:8090/martincam1.ffm
Once I try to encode the audio as such
/usr/bin/ffmpeg -loglevel 48 -i "rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?" http://127.0.0.1:8090/martincam1.ffm
I get the following errors
/usr/bin/ffmpeg -loglevel 48 -i "rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?" http://127.0.0.1:8090/martincam1.ffm
ffmpeg version 3.3.2-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '48'.
Reading option '-i' ... matched as input url with argument 'rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?'.
Reading option 'http://127.0.0.1:8090/martincam1.ffm' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 48.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?.
Successfully parsed a group of options.
Opening an input file: rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?.
[tcp @ 0x55ebeccb96e0] No default whitelist set
[rtsp @ 0x55ebeccb7700] SDP:
v=0
o=- 38990265062388 38990265062388 IN IP4 192.168.1.29
s=RTSP Session
c=IN IP4 192.168.1.29
t=0 0
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=range:npt=0-
a=framerate:0S
a=fmtp:96 profile-level-id=4d0014; packetization-mode=1; sprop-parameter-sets=Z00AFJWoWH6EAAADAAQAAAMAGhA=,aO48gA==
a=framerate:25
a=control:trackID=3
m=audio 0 RTP/AVP 8
a=control:trackID=4
Failed to parse interval end specification ''
[rtsp @ 0x55ebeccb7700] video codec set to: h264
Failed to parse interval end specification ''
[rtsp @ 0x55ebeccb7700] RTP Profile IDC: 4d Profile IOP: 0 Level: 14
[rtsp @ 0x55ebeccb7700] RTP Packetization Mode: 1
[rtsp @ 0x55ebeccb7700] Extradata set to 0x55ebeccb9d30 (size: 32)
[rtp @ 0x55ebeccb9b60] No default whitelist set
[udp @ 0x55ebeccbc880] No default whitelist set
[udp @ 0x55ebeccbc880] end receive buffer size reported is 131072
[udp @ 0x55ebeccbc680] No default whitelist set
[udp @ 0x55ebeccbc680] end receive buffer size reported is 131072
[rtsp @ 0x55ebeccb7700] setting jitter buffer size to 500
[rtp @ 0x55ebeccdd0c0] No default whitelist set
[udp @ 0x55ebeccdd760] No default whitelist set
[udp @ 0x55ebeccdd760] end receive buffer size reported is 131072
[udp @ 0x55ebeccbc720] No default whitelist set
[udp @ 0x55ebeccbc720] end receive buffer size reported is 131072
[rtsp @ 0x55ebeccb7700] setting jitter buffer size to 500
[rtsp @ 0x55ebeccb7700] hello state=0
[h264 @ 0x55ebeccbaba0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] unknown SEI type 229
[h264 @ 0x55ebeccbaba0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x55ebeccbaba0] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55ebeccbaba0] unknown SEI type 229
[h264 @ 0x55ebeccbaba0] Reinit context to 352x240, pix_fmt: yuv420p
[h264 @ 0x55ebeccbaba0] nal_unit_type: 1, nal_ref_idc: 3
Last message repeated 1 times
[rtsp @ 0x55ebeccb7700] max_analyze_duration 5000000 reached at 5000000 microseconds st:1
[rtsp @ 0x55ebeccb7700] decoding for stream 0 failed
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://192.168.1.29:554/user=admin&password=&channel=1&stream=1.sdp?':
Metadata:
title : RTSP Session
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0, 3, 1/90000: Video: h264 (Main), 1 reference frame, yuv420p(progressive, left), 352x240, 0/1, 0.75 fps, 0.75 tbr, 90k tbn, 1.50 tbc
Stream #0:1, 252, 1/8000: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Successfully opened the file.
Parsing a group of options: output url http://127.0.0.1:8090/martincam1.ffm.
Successfully parsed a group of options.
Opening an output file: http://127.0.0.1:8090/martincam1.ffm.
[NULL @ 0x55ebecd1cb40] Opening 'http://127.0.0.1:8090/martincam1.ffm' for reading
[http @ 0x55ebece090e0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[http @ 0x55ebece090e0] request: GET /martincam1.ffm HTTP/1.1
User-Agent: Lavf/57.71.100
Accept: */*
Range: bytes=0-
Connection: close
Host: 127.0.0.1:8090
Icy-MetaData: 1
[ffm @ 0x55ebecd1cb40] Format ffm probed with size=2048 and score=101
[NULL @ 0x55ebecd1d120] Setting entry with key 'ac' to value '1'
[NULL @ 0x55ebecd1d120] Setting entry with key 'b' to value '64000'
[NULL @ 0x55ebecd1d120] Setting entry with key 'ar' to value '48000'
[NULL @ 0x55ebecd1d120] Setting entry with key 'flags' to value '+global_header'
[NULL @ 0x55ebecd1d120] Setting entry with key 'video_size' to value '352x240'
[NULL @ 0x55ebecd1d120] Setting entry with key 'time_base' to value '1/10'
[NULL @ 0x55ebecd1d120] Setting entry with key 'qmin' to value '10'
[NULL @ 0x55ebecd1d120] Setting entry with key 'qmax' to value '42'
[NULL @ 0x55ebecd1d120] Setting entry with key 'b' to value '400000'
[AVIOContext @ 0x55ebeccbc560] Statistics: 8192 bytes read, 0 seeks
[http @ 0x55ebecd1aa00] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[http @ 0x55ebecd1aa00] request: POST /martincam1.ffm HTTP/1.1
Transfer-Encoding: chunked
User-Agent: Lavf/57.71.100
Accept: */*
Connection: close
Host: 127.0.0.1:8090
Icy-MetaData: 1
Successfully opened the file.
detected 8 logical cores
[h264 @ 0x55ebecd1cb40] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55ebecd1cb40] nal_unit_type: 8, nal_ref_idc: 3
Stream mapping:
Stream #0:1 -> #0:0 (pcm_alaw (native) -> vorbis (libvorbis))
Stream #0:0 -> #0:1 (h264 (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[graph_0_in_0_1 @ 0x55ebece05ce0] Setting 'time_base' to value '1/8000'
[graph_0_in_0_1 @ 0x55ebece05ce0] Setting 'sample_rate' to value '8000'
[graph_0_in_0_1 @ 0x55ebece05ce0] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_1 @ 0x55ebece05ce0] Setting 'channel_layout' to value '0x4'
[graph_0_in_0_1 @ 0x55ebece05ce0] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4
[format_out_0_0 @ 0x55ebeccbc560] Setting 'sample_fmts' to value 'fltp'
[format_out_0_0 @ 0x55ebeccbc560] Setting 'sample_rates' to value '48000'
[format_out_0_0 @ 0x55ebeccbc560] Setting 'channel_layouts' to value '0x4'
[format_out_0_0 @ 0x55ebeccbc560] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0'
[AVFilterGraph @ 0x55ebecd3faa0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x55ebece054e0] [SWR @ 0x55ebece7d8c0] Using fltp internally between filters
[auto_resampler_0 @ 0x55ebece054e0] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:fltp r:48000Hz
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 133 times
[h264 @ 0x55ebecd1cb40] nal_unit_type: 7, nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[h264 @ 0x55ebecd1cb40] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55ebecd1cb40] nal_unit_type: 6, nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[h264 @ 0x55ebecd1cb40] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55ebecd1cb40] unknown SEI type 229
[h264 @ 0x55ebecd1cb40] Reinit context to 352x240, pix_fmt: yuv420p
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 127 times
[h264 @ 0x55ebecdd4660] nal_unit_type: 1, nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 13 times
Too many packets buffered for output stream 0:0.
[AVIOContext @ 0x55ebecd174e0] Statistics: 0 seeks, 0 writeouts
[libvorbis @ 0x55ebecd0fd40] 32 frames left in the queue on closing
Conversion failed!
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
Stream webcam city
By Phoenix. in forum Video Streaming DownloadingReplies: 6Last Post: 29th Apr 2016, 05:27 -
play webcam stream in mplayer on windows.
By arthurm in forum Video Streaming DownloadingReplies: 0Last Post: 22nd Jan 2016, 07:00 -
Capture webcam audio & video stream to MP4 with VirtualDub
By zamar27 in forum Capturing and VCRReplies: 2Last Post: 20th Mar 2015, 19:54 -
how to catch a webcam stream
By rhurbarb in forum Video Streaming DownloadingReplies: 0Last Post: 12th Dec 2013, 15:45 -
how to stream (live) webcam to other viewers on a webpage
By ngate in forum Video Streaming DownloadingReplies: 0Last Post: 4th Dec 2012, 11:33