[FFmpeg-user] Segmenting an rtp H264 stream of an IP camera
David Cassany Viladomat
david.cassany at i2cat.net
Wed Feb 27 12:41:00 CET 2013
Hi,
I haven't tested to encode the testsrc, I'll check it now. Here is the
complete output of my example, with this I get 9 video files (from
live1_level2_0.ts to live1_level2_8.ts) which are reproducible (tested with
vlc and an android tablet).
ffmpeg -analyzeduration 10 -i rtsp://192.168.10.149/live1.sdp -vf
scale=640:-1 -g 50 -r 25 -qmin 28 -qmax 28 -ac 2 -b:a 128k -c:v libx264
-c:a libfdk_aac -profile:v baseline -map 0 -flags -global_header -f segment
-segment_time_delta 0.03 -segment_time 3 live1_level2_%d.ts
ffmpeg version 1.1.2 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 14 2013 11:53:42 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-librtmp --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264
--enable-nonfree --enable-version3 --enable-decoder=pcm_alaw
--enable-decoder=pcm_mulaw
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[rtsp @ 0xa6b74c0] max_analyze_duration 10 reached at 13333
[rtsp @ 0xa6b74c0] decoding for stream 0 failed
[rtsp @ 0xa6b74c0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://192.168.10.149/live1.sdp':
Metadata:
title : RTSP/RTP stream 1 from DCS-7010L
comment : live1.sdp with v2.0
Duration: N/A, start: 0.000000, bitrate: 64 kb/s
Stream #0:0: Video: h264 (High), yuvj420p, 640x360 [SAR 1:1 DAR 16:9],
75 fps, 75 tbr, 90k tbn, 150 tbc
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
[libx264 @ 0xa7078a0] using SAR=1/1
[libx264 @ 0xa7078a0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.2 AVX
[libx264 @ 0xa7078a0] profile Constrained Baseline, level 3.0
[segment @ 0xa70d480] Codec for stream 0 does not use global headers but
container format requires global headers
[segment @ 0xa70d480] Codec for stream 1 does not use global headers but
container format requires global headers
Output #0, segment, to 'live1_level2_%d.ts':
Metadata:
title : RTSP/RTP stream 1 from DCS-7010L
comment : live1.sdp with v2.0
encoder : Lavf54.59.106
Stream #0:0: Video: h264, yuvj420p, 640x360 [SAR 1:1 DAR 16:9],
q=28-28, 90k tbn, 25 tbc
Stream #0:1: Audio: aac, 8000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (pcm_mulaw -> libfdk_aac)
Press [q] to stop, [?] for help
RTP: missed 48 packets28.0 size=N/A time=00:00:13.92 bitrate=N/A dup=370
drop=0
[h264 @ 0xaccc8c0] error while decoding MB 34 3, bytestream (-5)
[h264 @ 0xaccc8c0] concealing 815 DC, 815 AC, 815 MV errors in P frame
Trying to remove 1024 samples, but the queue is emptybitrate=N/A dup=376
drop=0
[segment @ 0xa70d480] Encoder did not produce proper pts, making some up.
[libfdk_aac @ 0xa70c8e0] Trying to remove 1024 samples, but the queue is
empty
frame= 638 fps= 63 q=12015532.0 Lsize=N/A time=00:00:25.52 bitrate=N/A
dup=376 drop=0
video:1739kB audio:3kB subtitle:0 global headers:0kB muxing overhead
-100.001234%
[libx264 @ 0xa7078a0] frame I:18 Avg QP:28.00 size: 13882
[libx264 @ 0xa7078a0] frame P:620 Avg QP:28.00 size: 2469
[libx264 @ 0xa7078a0] mb I I16..4: 44.9% 0.0% 55.1%
[libx264 @ 0xa7078a0] mb P I16..4: 6.2% 0.0% 2.9% P16..4: 15.6% 4.4%
1.3% 0.0% 0.0% skip:69.6%
[libx264 @ 0xa7078a0] coded y,uvDC,uvAC intra: 31.0% 63.6% 20.8% inter:
7.1% 12.8% 1.3%
[libx264 @ 0xa7078a0] i16 v,h,dc,p: 37% 22% 19% 22%
[libx264 @ 0xa7078a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 13% 24% 4% 10%
10% 4% 3% 4%
[libx264 @ 0xa7078a0] i8c dc,h,v,p: 67% 16% 14% 3%
[libx264 @ 0xa7078a0] ref P L0: 87.4% 7.9% 4.6%
[libx264 @ 0xa7078a0] kb/s:558.13
Thanks for your time. regards,
deivit
2013/2/27 Carl Eugen Hoyos <cehoyos at ag.or.at>
> David Cassany Viladomat <david.cassany <at> i2cat.net> writes:
>
> > ffmpeg -analyzeduration 10 -i rtsp://192.168.10.149/live1.sdp
> > -g 50 -r 25 -ac 2 -b:a 128k -c:v libx264 -c:a libfdk_aac
> > -profile:v baseline -map 0 -flags -global_header -f segment
> -segment_time_delta 0.03 -segment_time 3 live1_level2_%d.ts
>
> Is your problem only reproducible with rtsp input
> or also if you use (for example) -f lavfi -i testsrc
> -f s16le -i /dev/zero ?
>
> Please provide the complete, uncut console output of
> your failing command line.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list