[FFmpeg-user] FW: Recording RTSP stream / av_interleaved_write_frame(): Invalid argument

juha s. salmjuh at hotmail.com
Wed Apr 4 12:27:00 CEST 2012


Hi 
 
I capture RTSPstream but get some files broken as below I have copy-paste logs here and send it to the developers. But now I'm thinking, that do I have some option wrong and should I change command which I use for recording:
 
ffmpeg -i rtsp://192.168.12.23:8554 -aspect 16:9 -copyts -vcodec libx264 -preset fast -b:v 900k  -y /videos/Lives/18928653.mp4
 
Any ideas ?
 
 
BR,
jiiii
 

 



From: salmjuh at hotmail.com
To: ffmpeg-devel at ffmpeg.org
Subject: FW: Recording RTSP stream / av_interleaved_write_frame(): Invalid argument
Date: Wed, 4 Apr 2012 10:24:10 +0000





Hi 
 
 
I updated to new version, but still this problem occurs time to time. Hope some one find these log of invalid files useful for solving the problem. Here is one invalid files log:
 
root at CVod1:~# cat /DVB/Log/18984340.log
ffmpeg version N-34954-ga4e359a Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr  4 2012 10:03:00 with gcc 4.6.1
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --en                                            able-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.101 /  2. 66.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[rtsp @ 0x28553e0] SDP:
v=0
o=1333368378841000 1 IN IP4 10.71.31.231
s=--
i=-- Media
t=0 0
a=tool:Digital Rapids Corp Streaming2005.05.26
a=type:broadcast
a=control:*
a=source-filter: incl IN IP4 * 10.71.31.231
a=rtcp:unicast reflection
a=range:npt=0-
a=x-qt-text-nam:--
a=x-qt-text-inf:-- Media
m=audio 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 MPEG4-GENERIC/90000
a=fmtp:96 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;bitrate=2;config=1390
a=control:trackID=1
m=video 0 RTP/AVP 97
c=IN IP4 0.0.0.0
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=4D4020;sprop-parameter-sets=Z01AIJZWBQF/ywgAAAMACAAAAwGUIA==,aO8GDMg=
a=control:trackID=2
[rtsp @ 0x28553e0] audio codec set to: aac
[rtsp @ 0x28553e0] audio samplerate set to: 90000
[rtsp @ 0x28553e0] audio channels set to: 1
[rtsp @ 0x28553e0] video codec set to: h264
[NULL @ 0x2864040] RTP Packetization Mode: 1
[NULL @ 0x2864040] RTP Profile IDC: 4d Profile IOP: 40 Level: 20
[NULL @ 0x2864040] Extradata set to 0x2864600 (size: 35)!hello state=0
[h264 @ 0x2864040] Missing reference picture
[h264 @ 0x2864040] decode_slice_header error
[h264 @ 0x2864040] concealing 920 DC, 920 AC, 920 MV errors
[h264 @ 0x2864040] Current profile doesn't provide more RBSP data in PPS, skipping
    Last message repeated 2 times
[rtsp @ 0x28553e0] All info found
[rtsp @ 0x28553e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://10.71.31.231:8555':
  Metadata:
    title           : --
    comment         : -- Media
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 20, 1/90000: Audio: aac, 44100 Hz, stereo, s16
    Stream #0:1, 22, 1/90000: Video: h264 (Main), yuv420p, 640x360, 1/50, 25 fps, 25 tbr, 90k tbn, 50 tbc
[buffer @ 0x28b5b20] w:640 h:360 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:flags=2
[libx264 @ 0x28ad7e0] using mv_range_thread = 24
[libx264 @ 0x28ad7e0] using SAR=1/1
[libx264 @ 0x28ad7e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x28ad7e0] profile High, level 3.0
[libx264 @ 0x28ad7e0] 264 - core 122 r2184 5c85e0a - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblo                                            ck=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp                                            _offset=-2 threads=24 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1                                             open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=900 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpst                                            ep=4 ip_ratio=1.40 aq=1:1.00
[h264 @ 0x2864040] detected 16 logical cores
Output #0, mp4, to '/DVB/Videot/--/18984340.mp4':
  Metadata:
    title           : --
    comment         : -- Media
    encoder         : Lavf54.3.100
    Stream #0:0, 0, 1/25: Video: h264 (![0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1/25, q=-1--1, 900 kb/s, 25 tbn, 25 tbc
    Stream #0:1, 0, 1/44100: Audio: aac (@[0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (h264 -> libx264)
  Stream #0:0 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
[h264 @ 0x486b880] Missing reference picture
[h264 @ 0x486b880] decode_slice_header error
[h264 @ 0x486b880] concealing 920 DC, 920 AC, 920 MV errors
[h264 @ 0x4c6cec0] Increasing reorder buffer to 1
[h264 @ 0x4c6cec0] no picture
*** 1 dup!
[libx264 @ 0x28ad7e0] using mv_range_thread = 24
[h264 @ 0x2864040] Current profile doesn't provide more RBSP data in PPS, skipping
Current profile doesn't provide more RBSP data in PPS, skippingate=   0.0kbits/s dup=1 drop=0
[h264 @ 0x2864040] Current profile doesn't provide more RBSP data in PPS, skipping
Current profile doesn't provide more RBSP data in PPS, skippingate=   0.0kbits/s dup=1 drop=0
[mp4 @ 0x28ad2a0] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 103424 >= 101444
av_interleaved_write_frame(): Invalid argument
root at CVod1:~#

 
 
 

 




From: salmjuh at hotmail.com
To: ffmpeg-devel at ffmpeg.org
Subject: Recording RTSP stream / av_interleaved_write_frame(): Invalid argument
Date: Thu, 29 Mar 2012 09:57:50 +0000









Hi
 
I have captured RTSP stream and everything is worked quit nice. Now I have upraged latest version and about 75 % of captured recoding are failed because "moov atom not found" and "av_interleaved_write_frame(): Invalid argument". So is there somethin broken or ´m'I doing something wrong ?

 
Im using this line for recording: ffmpeg -i rtsp://192.168.12.23:8554 -aspect 16:9 -copyts -vcodec libx264 -preset fast -b:v 900k  -y /videos/Lives/18928653.mp4

Any help would be greatly appriciated !

---------

Here is debug information about one file that is broken. Please, can somebody help me with this one ?
 
 
root at CVod1:/DVB# ffmpeg -i /videos/Lives/18928653.mp4
ffmpeg version N-34813-g96d0494 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 28 2012 08:37:13 with gcc 4.6.1
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.100 /  2. 66.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x30aa3e0] moov atom not found
/videos/Lives/18928653.mp4: Invalid data found when processing input
root at CVod1:/DVB#
 
 
 
 
root at CVod1:/DVB# cat /DVB/Log/18928653.Lives
ffmpeg version N-34813-g96d0494 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 28 2012 08:37:13 with gcc 4.6.1
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.100 /  2. 66.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[rtsp @ 0x27b13e0] SDP:
v=0
o=1332932278761000 1 IN IP4 10.71.31.232
s=Lives
i=---
t=0 0
a=tool:--- Streaming
a=type:broadcast
a=control:*
a=source-filter: incl IN IP4 * 10.71.31.232
a=rtcp:unicast reflection
a=range:npt=0-
a=x-qt-text-nam:Lives
a=x-qt-text-inf:---
m=audio 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 MPEG4-GENERIC/90000
a=fmtp:96 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;bitrate=2;config=1390
a=control:trackID=1
m=video 0 RTP/AVP 97
c=IN IP4 0.0.0.0
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=4D4020;sprop-parameter-sets=Z01AIJZWBQF/y/+AAYACCAAAAwAIAAADAZQg,aO8GDMg=
a=control:trackID=2
[rtsp @ 0x27b13e0] audio codec set to: aac
[rtsp @ 0x27b13e0] audio samplerate set to: 90000
[rtsp @ 0x27b13e0] audio channels set to: 1
[rtsp @ 0x27b13e0] video codec set to: h264
[NULL @ 0x27bffe0] RTP Packetization Mode: 1
[NULL @ 0x27bffe0] RTP Profile IDC: 4d Profile IOP: 40 Level: 20
[NULL @ 0x27bffe0] Extradata set to 0x27c05a0 (size: 40)!hello state=0
[h264 @ 0x27bffe0] Missing reference picture
[h264 @ 0x27bffe0] decode_slice_header error
[h264 @ 0x27bffe0] concealing 920 DC, 920 AC, 920 MV errors
[h264 @ 0x27bffe0] Current profile doesn't provide more RBSP data in PPS, skipping
    Last message repeated 1 times
[rtsp @ 0x27b13e0] All info found
[rtsp @ 0x27b13e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://10.71.31.232:8554':
  Metadata:
    title           : Lives
    comment         : ---
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 19, 1/90000: Audio: aac, 44100 Hz, stereo, s16
    Stream #0:1, 22, 1/90000: Video: h264 (Main), yuv420p, 640x360 [SAR 3:4 DAR 4:3], 1/50, 25 fps, 25 tbr, 90k tbn, 50 tbc
[buffer @ 0x280ad60] w:640 h:360 pixfmt:yuv420p tb:1/1000000 sar:3/4 sws_param:
[libx264 @ 0x2809780] using mv_range_thread = 24
[libx264 @ 0x2809780] using SAR=1/1
[libx264 @ 0x2809780] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x2809780] profile High, level 3.0
[libx264 @ 0x2809780] 264 - core 122 r2184 5c85e0a - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=24 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1 bitrate=900 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[h264 @ 0x27bffe0] detected 16 logical cores
Output #0, mp4, to '/videos/Lives/18928653.mp4':
  Metadata:
    title           : Lives
    comment         : ---
    encoder         : Lavf54.3.100
    Stream #0:0, 0, 1/25: Video: h264 (![0][0][0] / 0x0021), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1/25, q=-1--1, 900 kb/s, 25 tbn, 25 tbc
    Stream #0:1, 0, 1/44100: Audio: aac (@[0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (h264 -> libx264)
  Stream #0:0 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
[h264 @ 0x401af80] Missing reference picture
[h264 @ 0x401af80] decode_slice_header error
[h264 @ 0x401af80] concealing 920 DC, 920 AC, 920 MV errors
[h264 @ 0x441c640] Increasing reorder buffer to 1
[h264 @ 0x441c640] no picture
*** 1 dup!
[libx264 @ 0x2809780] using mv_range_thread = 24
[h264 @ 0x27bffe0] Current profile doesn't provide more RBSP data in PPS, skipping
Current profile doesn't provide more RBSP data in PPS, skippingate=   0.0kbits/s dup=1 drop=0
Current profile doesn't provide more RBSP data in PPS, skippingate=   0.0kbits/s dup=1 drop=0
[libx264 @ 0x2809780] scene cut at 10 Icost:192175 Pcost:192175 ratio:0.0000 bias:0.0400 gop:10 (imb:798 pmb:0)
[h264 @ 0x27bffe0] Current profile doesn't provide more RBSP data in PPS, skipping
Current profile doesn't provide more RBSP data in PPS, skippingate=   0.0kbits/s dup=1 drop=0
[libx264 @ 0x2809780] frame=   0 QP=10.00 NAL=3 Slice:I Poc:0   I:920  P:0    SKIP:0    size=87 bytes
[libx264 @ 0x2809780] frame=   1 QP=29.00 NAL=2 Slice:P Poc:8   I:0    P:0    SKIP:920  size=19 bytes
[libx264 @ 0x2809780] frame=   2 QP=29.00 NAL=2 Slice:B Poc:4   I:0    P:0    SKIP:920  size=17 bytes
[libx264 @ 0x2809780] frame=   3 QP=29.00 NAL=0 Slice:B Poc:2   I:0    P:0    SKIP:920  size=17 bytes
frame=   4 QP=29.00 NAL=0 Slice:B Poc:6   I:0    P:0    SKIP:920  size=16 bytes/s dup=1 drop=0
[libx264 @ 0x2809780] frame=   5 QP=29.00 NAL=2 Slice:P Poc:16  I:0    P:0    SKIP:920  size=20 bytes
[libx264 @ 0x2809780] frame=   6 QP=29.00 NAL=2 Slice:B Poc:12  I:0    P:0    SKIP:920  size=18 bytes
[libx264 @ 0x2809780] frame=   7 QP=29.00 NAL=0 Slice:B Poc:10  I:0    P:0    SKIP:920  size=17 bytes
[libx264 @ 0x2809780] frame=   8 QP=29.00 NAL=0 Slice:B Poc:14  I:0    P:0    SKIP:920  size=16 bytes
[libx264 @ 0x2809780] frame=   9 QP=29.00 NAL=2 Slice:P Poc:18  I:0    P:0    SKIP:920  size=20 bytes
[libx264 @ 0x2809780] frame=  10 QP=19.54 NAL=2 Slice:I Poc:20  I:920  P:0    SKIP:0    size=11958 bytes
[libx264 @ 0x2809780] frame=  11 QP=22.51 NAL=2 Slice:P Poc:28  I:17   P:651  SKIP:252  size=2099 bytes
[libx264 @ 0x2809780] frame=  12 QP=24.66 NAL=2 Slice:B Poc:24  I:3    P:414  SKIP:503  size=690 bytes
[h264 @ 0x27bffe0] Current profile doesn't provide more RBSP data in PPS, skipping
[libx264 @ 0x2809780] frame=  13 QP=26.27 NAL=0 Slice:B Poc:22  I:1    P:280  SKIP:639  size=397 bytes
[libx264 @ 0x2809780] frame=  14 QP=25.29 NAL=0 Slice:B Poc:26  I:2    P:359  SKIP:559  size=499 bytes
[libx264 @ 0x2809780] frame=  15 QP=22.92 NAL=2 Slice:P Poc:36  I:16   P:622  SKIP:282  size=2078 bytes
frame=  16 QP=24.69 NAL=2 Slice:B Poc:32  I:14   P:452  SKIP:454  size=863 bytess dup=1 drop=0
[libx264 @ 0x2809780] frame=  17 QP=25.94 NAL=0 Slice:B Poc:30  I:1    P:232  SKIP:687  size=393 bytes
[libx264 @ 0x2809780] frame=  18 QP=25.30 NAL=0 Slice:B Poc:34  I:1    P:218  SKIP:701  size=324 bytes
[libx264 @ 0x2809780] frame=  19 QP=23.44 NAL=2 Slice:P Poc:44  I:34   P:683  SKIP:203  size=2630 bytes
[libx264 @ 0x2809780] frame=  20 QP=24.34 NAL=2 Slice:B Poc:40  I:10   P:379  SKIP:531  size=753 bytes
[libx264 @ 0x2809780] frame=  21 QP=26.11 NAL=0 Slice:B Poc:38  I:15   P:356  SKIP:549  size=584 bytes
[libx264 @ 0x2809780] frame=  22 QP=25.70 NAL=0 Slice:B Poc:42  I:2    P:192  SKIP:726  size=304 bytes
[libx264 @ 0x2809780] frame=  23 QP=22.63 NAL=2 Slice:P Poc:52  I:52   P:721  SKIP:147  size=3692 bytes
[libx264 @ 0x2809780] frame=  24 QP=24.73 NAL=2 Slice:B Poc:48  I:10   P:472  SKIP:435  size=1066 bytes
[libx264 @ 0x2809780] frame=  25 QP=26.20 NAL=0 Slice:B Poc:46  I:14   P:391  SKIP:515  size=704 bytes
[h264 @ 0x27bffe0] Current profile doesn't provide more RBSP data in PPS, skipping
[libx264 @ 0x2809780] frame=  26 QP=26.35 NAL=0 Slice:B Poc:50  I:6    P:200  SKIP:713  size=389 bytes
[libx264 @ 0x2809780] frame=  27 QP=18.93 NAL=2 Slice:P Poc:60  I:87   P:785  SKIP:48   size=7833 bytes
[libx264 @ 0x2809780] frame=  28 QP=22.92 NAL=2 Slice:B Poc:56  I:13   P:541  SKIP:362  size=1405 bytes
[libx264 @ 0x2809780] frame=  29 QP=24.92 NAL=0 Slice:B Poc:54  I:2    P:321  SKIP:597  size=627 bytes
[libx264 @ 0x2809780] frame=  30 QP=23.25 NAL=0 Slice:B Poc:58  I:9    P:500  SKIP:409  size=1057 bytes
frame=  31 QP=11.36 NAL=2 Slice:P Poc:68  I:223  P:697  SKIP:0    size=25242 bytesdup=1 drop=0
[libx264 @ 0x2809780] frame=  32 QP=17.26 NAL=2 Slice:B Poc:64  I:23   P:778  SKIP:93   size=4188 bytes
[libx264 @ 0x2809780] frame=  33 QP=20.60 NAL=0 Slice:B Poc:62  I:6    P:591  SKIP:320  size=1399 bytes
[libx264 @ 0x2809780] frame=  34 QP=16.77 NAL=0 Slice:B Poc:66  I:5    P:635  SKIP:262  size=2147 bytes
[libx264 @ 0x2809780] scene cut at 61 Icost:143962 Pcost:141511 ratio:0.0170 bias:0.1480 gop:61 (imb:769 pmb:29)
[libx264 @ 0x2809780] frame=  35 QP=9.76 NAL=2 Slice:P Poc:76  I:651  P:269  SKIP:0    size=39634 bytes
[libx264 @ 0x2809780] frame=  36 QP=13.43 NAL=2 Slice:B Poc:72  I:77   P:739  SKIP:40   size=12781 bytes
[libx264 @ 0x2809780] frame=  37 QP=14.42 NAL=0 Slice:B Poc:70  I:50   P:771  SKIP:63   size=6841 bytes
[libx264 @ 0x2809780] frame=  38 QP=13.95 NAL=0 Slice:B Poc:74  I:6    P:698  SKIP:189  size=3218 bytes
[h264 @ 0x27bffe0] Current profile doesn't provide more RBSP data in PPS, skipping
[libx264 @ 0x2809780] frame=  39 QP=8.53 NAL=2 Slice:P Poc:84  I:197  P:723  SKIP:0    size=29804 bytes
[mp4 @ 0x2809240] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 199680 >= 199212
av_interleaved_write_frame(): Invalid argument
root at CVod1:/DVB#

 		 	   		  


More information about the ffmpeg-user mailing list