Record Video and Audio from rtsp stream

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
zippytiff
New Cone
New Cone
Posts: 3
Joined: 26 Oct 2012 00:30

Record Video and Audio from rtsp stream

Postby zippytiff » 26 Oct 2012 00:52

Hi,

im running VLC on windows v2.0.4

I did lots of googling on this issue and couldnt find any obvious answers, apollogies if this is a duplicate of another thread

i have an rtsp feed from an IP Camera, in VLC i can see from Tools/Codec Information that i have

Stream 0
Type : Video
etc.....

Stream 1
Type : Audio
etc....

When watching the stream live in VLC, i get the video and audio ! GREAT, this is what i then want to record

So i have tried advanced settings : Record button (where are the settings for this button???)

But when i check the file it recorded to my video's folder it only has video and NO Audio as confirmed by Gspot

I have tried the Stream wizard, but generally keeping the defaults and clicking next next next etc

Please could i have some pointers to get both audio and video from an rtsp stream recorded

Thanks in advance

Lotesdelere
Cone Master
Cone Master
Posts: 10111
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Record Video and Audio from rtsp stream

Postby Lotesdelere » 26 Oct 2012 08:22

Please open Tools -> Messages (set Verbosity to 2) before you start to record and then paste the full resulting log here or on Pastebin.com if it's too long.

Also upload a short sample of the resulting recorded file to either http://streams.videolan.org/upload/ or to EmbedUpload.com, so it will upload the file for you to several other hosts, and then post the link to the file here.

zippytiff
New Cone
New Cone
Posts: 3
Joined: 26 Oct 2012 00:30

Re: Record Video and Audio from rtsp stream

Postby zippytiff » 26 Oct 2012 09:02

Hi,

Thanks for reply, i have done the level 2 logging....

i noticed one set of entries which said:

mux_ogg debug: adding input
mux_ogg debug: g726 stream
main debug: adding a new input
mux_ogg debug: adding input
mux_ogg warning: Missing frame rate, assuming 25fps
main error: cannot add this stream

it has not effected the results but may throw in some extra errors, but i did thi log over my 3G dongle/vpn into lab as im traveling at the moment, but last night i was in lab on LAN when i saw results for initial post.

log below:

main warning: resampling stopped after 793905 usec (drift: 61185)
main warning: buffer too early (-66195), down-sampling
main warning: resampling stopped after 1723352 usec (drift: -3228)
main warning: buffer too early (-84120), down-sampling
main warning: resampling stopped after 1690024 usec (drift: 30168)
main warning: buffer too early (-66172), down-sampling
main warning: timing screwed, stopping resampling
main warning: buffer too early (-115688), down-sampling
main warning: resampling stopped after 3279340 usec (drift: 52614)
main warning: buffer too early (-57065), down-sampling
main warning: buffer way too early (-157348), clearing queue
main warning: timing screwed, stopping resampling
main debug: audio output is starving (-656577), playing silence
main warning: buffer too late (62489), up-sampling
main warning: timing screwed, stopping resampling
main warning: buffer too late (101342), up-sampling
main warning: resampling stopped after 1328258 usec (drift: -18786)
main warning: buffer too early (-42817), down-sampling
main debug: auto hiding mouse cursor
main warning: buffer way too early (-130136), clearing queue
main warning: timing screwed, stopping resampling
main debug: audio output is starving (-445828), playing silence
main warning: buffer too early (-41577), down-sampling
main warning: audio output out of sync, adjusting dates (-42317 us)
main warning: not synchronized (-42315 us), resampling
main warning: timing screwed, stopping resampling
main warning: buffer too early (-77670), down-sampling
main debug: auto hiding mouse cursor
main debug: using sout chain=`record{dst-prefix='<REMOVED>_live3.sdp-'}'
main debug: stream=`record'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-record-dst-prefix to <REMOVED>_live3.sdp-
main debug: using sout stream module "stream_out_record"
main debug: TIMER module_need() : 121.495 ms - Total 121.495 ms / 1 intvls (Avg 121.495 ms)
main debug: looking for packetizer module: 21 candidates
packetizer_h264 debug: found NAL_SPS (sps_id=0)
packetizer_h264 debug: found NAL_PPS (pps_id=0 sps_id=0)
main debug: using packetizer module "packetizer_h264"
main debug: TIMER module_need() : 0.391 ms - Total 0.391 ms / 1 intvls (Avg 0.391 ms)
main debug: looking for packetizer module: 21 candidates
main debug: using packetizer module "packetizer_copy"
main debug: TIMER module_need() : 48.529 ms - Total 48.529 ms / 1 intvls (Avg 48.529 ms)
main debug: adding a new sout input (sout_input:0adbbdd0)
main debug: adding a new sout input (sout_input:0adbb8d8)
main warning: resampling stopped after 11653750 usec (drift: 28667)
main debug: removing module "packetizer_h264"
main debug: killing decoder fourcc `h264', 0 PES in FIFO
main debug: removing a sout input (sout_input:0adbb8d8)
stream_out_record warning: failed to find an adequate muxer, probing muxers
stream_out_record debug: probing muxer avi
stream_out_record debug: Using record output `std{access=file,mux='avi',dst='<REMOVED>\\vlc2'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to avi
main debug: set config option: sout-standard-dst to <REMOVED>\vlc2
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>\vlc2)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 64.432 ms - Total 64.432 ms / 1 intvls (Avg 64.432 ms)
main debug: looking for sout mux module: 1 candidate
mux_avi debug: AVI muxer opened
main debug: using sout mux module "mux_avi"
main debug: TIMER module_need() : 67.813 ms - Total 67.813 ms / 1 intvls (Avg 67.813 ms)
stream_out_standard debug: using `file/avi://<REMOVED>\vlc2'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 179.983 ms - Total 179.983 ms / 1 intvls (Avg 179.983 ms)
main debug: adding a new input
mux_avi debug: adding input
main error: cannot add this stream
main debug: adding a new input
mux_avi debug: adding input
mux_avi debug: removing input
main warning: no more input streams for this mux
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_avi"
mux_avi debug: AVI muxer closed
mux_avi info: stream[0] duration:0 totalsize:0 frames:0 fps:25.000000 KiB/s:128
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
stream_out_record debug: probing muxer mp4
stream_out_record debug: Using record output `std{access=file,mux='mp4',dst='<REMOVED>\\vlc3'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to mp4
main debug: set config option: sout-standard-dst to <REMOVED>\vlc3
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>\vlc3)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 2.427 ms - Total 2.427 ms / 1 intvls (Avg 2.427 ms)
main debug: looking for sout mux module: 1 candidate
mux_mp4 debug: Mp4 muxer opened
main debug: using sout mux module "mux_mp4"
main debug: TIMER module_need() : 52.680 ms - Total 52.680 ms / 1 intvls (Avg 52.680 ms)
stream_out_standard debug: using `file/mp4://<REMOVED>\vlc3'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 55.804 ms - Total 55.804 ms / 1 intvls (Avg 55.804 ms)
main debug: adding a new input
mux_mp4 error: unsupported codec g726 in mp4
main error: cannot add this stream
main debug: adding a new input
mux_mp4 debug: adding input
mux_mp4 debug: removing input
main warning: no more input streams for this mux
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_mp4"
mux_mp4 debug: Close
mux_mp4 debug: movie duration 0s
mux_mp4 debug: created 0 chunks (stco)
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
stream_out_record debug: probing muxer ogg
stream_out_record debug: Using record output `std{access=file,mux='ogg',dst='<REMOVED>\\vlc4'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to ogg
main debug: set config option: sout-standard-dst to <REMOVED>\vlc4
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>\vlc4)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 3.618 ms - Total 3.618 ms / 1 intvls (Avg 3.618 ms)
main debug: looking for sout mux module: 1 candidate
mux_ogg info: Open
main debug: using sout mux module "mux_ogg"
main debug: TIMER module_need() : 35.726 ms - Total 35.726 ms / 1 intvls (Avg 35.726 ms)
main debug: muxer support adding stream at any time
main debug: muxer prefers to wait for all ES before starting to mux
stream_out_standard debug: using `file/ogg://<REMOVED>\vlc4'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 40.030 ms - Total 40.030 ms / 1 intvls (Avg 40.030 ms)
main debug: adding a new input
mux_ogg debug: adding input
mux_ogg debug: g726 stream
main debug: adding a new input
mux_ogg debug: adding input
mux_ogg warning: Missing frame rate, assuming 25fps
main error: cannot add this stream
mux_ogg debug: removing input
main warning: no more input streams for this mux
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_ogg"
mux_ogg info: Close
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
stream_out_record debug: probing muxer asf
stream_out_record debug: Using record output `std{access=file,mux='asf',dst='<REMOVED>p\\vlc5'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to asf
main debug: set config option: sout-standard-dst to <REMOVED>\vlc5
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>\vlc5)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 1.410 ms - Total 1.410 ms / 1 intvls (Avg 1.410 ms)
main debug: looking for sout mux module: 1 candidate
mux_asf debug: asf muxer opened
mux_asf debug: Packet size 4096
mux_asf debug: meta data: title='', author='', copyright='', comment='', rating=''
main debug: using sout mux module "mux_asf"
main debug: TIMER module_need() : 27.639 ms - Total 27.639 ms / 1 intvls (Avg 27.639 ms)
stream_out_standard debug: using `file/asf://<REMOVED>\vlc5'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 29.481 ms - Total 29.481 ms / 1 intvls (Avg 29.481 ms)
main debug: adding a new input
mux_asf debug: adding input
main error: cannot add this stream
main debug: adding a new input
mux_asf debug: adding input
mux_asf debug: removing input
main warning: no more input streams for this mux
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_asf"
mux_asf debug: Asf muxer closed
mux_asf debug: Asf muxer creating header
mux_asf debug: pixel aspect-ratio: 1/1
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
stream_out_record debug: probing muxer ts
stream_out_record debug: Using record output `std{access=file,mux='ts',dst='<REMOVED>\\vlc6'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to ts
main debug: set config option: sout-standard-dst to <REMOVED>\vlc6
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>\vlc6)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 1.439 ms - Total 1.439 ms / 1 intvls (Avg 1.439 ms)
main debug: looking for sout mux module: 1 candidate
mux_ts debug: shaping=200000 pcr=70000 dts_delay=400000
main debug: using sout mux module "mux_ts"
main debug: TIMER module_need() : 76.634 ms - Total 76.634 ms / 1 intvls (Avg 76.634 ms)
main debug: muxer support adding stream at any time
main debug: muxer prefers to wait for all ES before starting to mux
stream_out_standard debug: using `file/ts://<REMOVED>\vlc6'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 78.471 ms - Total 78.471 ms / 1 intvls (Avg 78.471 ms)
main debug: adding a new input
mux_ts debug: adding input codec=g726 pid=68
main error: cannot add this stream
main debug: adding a new input
mux_ts debug: adding input codec=h264 pid=69
mux_ts debug: new PCR PID is 69
mux_ts debug: removing input pid=69
mux_ts debug: new PCR PID is 8191
main warning: no more input streams for this mux
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_ts"
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
stream_out_record debug: probing muxer ps
stream_out_record debug: Using record output `std{access=file,mux='ps',dst='<REMOVED>\\vlc7'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to ps
main debug: set config option: sout-standard-dst to <REMOVED>\vlc7
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>\vlc7)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 0.936 ms - Total 0.936 ms / 1 intvls (Avg 0.936 ms)
main debug: looking for sout mux module: 1 candidate
mux_ps info: Open
main debug: using sout mux module "mux_ps"
main debug: TIMER module_need() : 37.590 ms - Total 37.590 ms / 1 intvls (Avg 37.590 ms)
main debug: muxer support adding stream at any time
main debug: muxer prefers to wait for all ES before starting to mux
stream_out_standard debug: using `file/ps://<REMOVED>\vlc7'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 38.868 ms - Total 38.868 ms / 1 intvls (Avg 38.868 ms)
main debug: adding a new input
mux_ps debug: adding input codec=g726
main error: cannot add this stream
main debug: adding a new input
mux_ps debug: adding input codec=h264
mux_ps debug: removing input
main warning: no more input streams for this mux
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_ps"
mux_ps info: Close
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
stream_out_record debug: using muxer avi with extension avi (1/2 streams accepted)
stream_out_record debug: Using record output `std{access=file,mux='avi',dst='<REMOVED>_live3.sdp-.avi'}'
main debug: stream=`std'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to avi
main debug: set config option: sout-standard-dst to <REMOVED>_live3.sdp-.avi
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (<REMOVED>_live3.sdp-.avi)
main debug: using sout access module "access_output_file"
main debug: TIMER module_need() : 0.843 ms - Total 0.843 ms / 1 intvls (Avg 0.843 ms)
main debug: looking for sout mux module: 1 candidate
mux_avi debug: AVI muxer opened
main debug: using sout mux module "mux_avi"
main debug: TIMER module_need() : 0.160 ms - Total 0.160 ms / 1 intvls (Avg 0.160 ms)
stream_out_standard debug: using `file/avi://<REMOVED>_live3.sdp-.avi'
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_need() : 1.272 ms - Total 1.272 ms / 1 intvls (Avg 1.272 ms)
main debug: adding a new input
mux_avi debug: adding input
main error: cannot add this stream
main debug: adding a new input
mux_avi debug: adding input
mux_avi debug: writing header
mux_avi debug: removing input
main warning: no more input streams for this mux
main debug: removing module "packetizer_copy"
main debug: killing decoder fourcc `g726', 0 PES in FIFO
main debug: removing a sout input (sout_input:0adbbdd0)
main debug: destroying chain... (name=record)
main debug: removing module "stream_out_record"
main debug: destroying chain... (name=std)
main debug: removing module "stream_out_standard"
main debug: removing module "mux_avi"
mux_avi debug: AVI muxer closed
mux_avi info: stream[0] duration:11 totalsize:438811 frames:82 fps:7.397545 KiB/s:309
main debug: removing module "access_output_file"
access_output_file debug: file access output closed
main debug: destroying chain done
main debug: destroying chain done
main warning: buffer too early (-41025), down-sampling
main warning: picture is too late to be displayed (missing 125 ms)
main warning: picture is too late to be displayed (missing 21 ms)
main debug: audio output is too slow (43484 us): trashing 50000 us
main warning: audio output out of sync, adjusting dates (103349 us)
main warning: not synchronized (103352 us), resampling
main warning: timing screwed, stopping resampling
main warning: picture is too late to be displayed (missing 193 ms)
main warning: picture is too late to be displayed (missing 170 ms)
main warning: picture is too late to be displayed (missing 142 ms)
main warning: picture is too late to be displayed (missing 263 ms)
main debug: audio output is too slow (91127 us): trashing 50000 us
main debug: audio output is too slow (41127 us): trashing 50000 us
main warning: audio output out of sync, adjusting dates (100976 us)
main warning: picture is too late to be displayed (missing 384 ms)
main warning: PTS is out of range (-25369), dropping buffer
main warning: computed PTS is out of range (17077), clearing out
main warning: not synchronized (100979 us), resampling
main warning: buffer too late (101979), up-sampling
main debug: audio output is too slow (65586 us): trashing 50000 us
main debug: audio output is too slow (15586 us): trashing 50000 us
main warning: audio output out of sync, adjusting dates (75432 us)
main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1000 ms)
main error: ES_OUT_RESET_PCR called
main debug: Buffering 0%
main debug: Buffering 10%
main debug: Buffering 10%
main debug: End of audio preroll
main debug: Buffering 20%
main debug: Buffering 20%
main debug: Buffering 30%
main debug: Buffering 30%
main debug: Buffering 30%
main debug: Buffering 41%
main debug: Buffering 41%
main debug: Buffering 41%
main debug: Buffering 41%
main debug: Buffering 41%
main debug: Stream buffering done (1354 ms in 2502 ms)
main debug: Decoder buffering done in 0 ms
main debug: End of video preroll
main warning: picture is too late to be displayed (missing 365 ms)
main warning: picture is too late to be displayed (missing 261 ms)
main warning: picture is too late to be displayed (missing 158 ms)
main warning: picture is too late to be displayed (missing 76 ms)
main warning: PTS is out of range (784418), dropping buffer
main warning: PTS is out of range (534497), dropping buffer
main warning: not synchronized (75435 us), resampling
main warning: buffer too late (76435), up-sampling
main debug: audio output is starving (-382279), playing silence
main warning: computed PTS is out of range (691840), clearing out
main warning: timing screwed, stopping resampling
main debug: audio output is starving (-932490), playing silence
main warning: picture is too late to be displayed (missing 1095 ms)
main warning: picture is too late to be displayed (missing 986 ms)
main warning: picture is too late to be displayed (missing 850 ms)
main warning: picture is too late to be displayed (missing 781 ms)
main warning: picture is too late to be displayed (missing 677 ms)
main warning: picture is too late to be displayed (missing 26 ms)
main warning: buffer way too late (773000), dropping buffer
main warning: buffer way too late (524000), dropping buffer
main warning: computed PTS is out of range (649575), clearing out
main warning: buffer way too early (-277207), clearing queue
main debug: audio output is starving (-837386), playing silence
main warning: buffer way too late (421714), dropping buffer
main warning: picture is too late to be displayed (missing 287 ms)
main warning: picture is too late to be displayed (missing 726 ms)
main warning: picture is too late to be displayed (missing 623 ms)
main warning: picture is too late to be displayed (missing 240 ms)
main warning: computed PTS is out of range (1046611), clearing out
main warning: buffer way too early (-248000), clearing queue
main warning: picture is too late to be displayed (missing 628 ms)
main debug: audio output is starving (-568461), playing silence
main warning: picture is too late to be displayed (missing 726 ms)
main warning: computed PTS is out of range (1190277), clearing out
main warning: buffer way too early (-733026), clearing queue
main debug: audio output is starving (-1303115), playing silence
main warning: buffer way too late (1170108), dropping buffer
main warning: buffer way too late (921108), dropping buffer
avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
main warning: buffer way too late (765258), dropping buffer
main warning: buffer way too late (297170), dropping buffer
main warning: buffer way too early (-1452353), clearing queue
main warning: PTS is out of range (286449), dropping buffer
main warning: PTS is out of range (38370), dropping buffer
main debug: audio output is starving (-1652443), playing silence
main warning: PTS is out of range (108691), dropping buffer
main warning: buffer way too late (447062), dropping buffer
main warning: buffer way too late (198062), dropping buffer
main warning: buffer too early (-50938), down-sampling
main warning: picture is too late to be displayed (missing 996 ms)
main warning: buffer way too late (631684), dropping buffer
main warning: buffer way too late (625085), dropping buffer
main warning: buffer way too late (380979), dropping buffer
main warning: timing screwed, stopping resampling
main warning: picture is too late to be displayed (missing 107 ms)
main warning: picture is too late to be displayed (missing 37 ms)
main warning: buffer too late (125888), up-sampling

the mediainfo analysis of the saved avi is, showing no audio was saved:

General
Format/Info : Audio Video Interleave
File size : 440 KiB
Duration : 11s 86ms
Overall bit rate mode : Variable
Overall bit rate : 326 Kbps

Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Codec ID : h264
Duration : 11s 86ms
Bit rate mode : Variable
Bit rate : 317 Kbps
Maximum bit rate : 1 000 Kbps
Width : 176 pixels
Height : 144 pixels
Display aspect ratio : 1.222
Frame rate mode : Variable
Frame rate : 7.397 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 1.689
Stream size : 429 KiB (97%)

zippytiff
New Cone
New Cone
Posts: 3
Joined: 26 Oct 2012 00:30

Re: Record Video and Audio from rtsp stream

Postby zippytiff » 26 Oct 2012 16:32

Hi all

changing to the mkv mux did the trick

C:\Program Files\VideoLAN\VLC>vlc -vvv rtsp://<REMOVED>/live1.sdp --sout #duplicate{dst=display,dst=standard{access=file,mux=mkv,dst=c:\testmkv8.mkv}

this will display and output to file

Regards


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 65 guests