[FFmpeg-user] MPEG-TS trouble
roko
roko98 at yahoo.com
Wed Mar 21 15:12:24 CET 2012
Hi Andrey... thx for your response and your interest. I'm using 0.10. I' including the recorded files as attachments.
Here is the full console output:
ffmpeg -i rtsp://admin:admin@192.168.99.146/11 -vcodec copy -y -r 25 algo.mp4
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
built on Mar 2 2012 14:36:33 with gcc 4.5.1 20101208 [gcc-4_5-branch revision 167585]
configuration: --shlibdir=/usr/lib64 --prefix=/usr
--mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared
--disable-static --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libspeex --enable-libxvid --enable-postproc
--enable-gpl --enable-x11grab --extra-cflags='-fmessage-length=0 -O2
-Wall -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC
-I/usr/include/gsm' --enable-debug --disable-stripping --enable-libgsm
--enable-libschroedinger --enable-libdirac --enable-avfilter
--enable-libvpx --enable-version3 --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libx264 --enable-libdc1394
--enable-pthreads --enable-librtmp
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[rtsp @
0x638600] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://admin:admin@192.168.99.146/11':
Metadata:
title : \11
Duration: N/A, start: 0.039956, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 640x480, 25 tbr, 90k tbn, 180k tbc
Output #0, mp4, to 'algo.mp4':
Metadata:
title : \11
encoder : Lavf53.31.100
Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 640x480, q=2-31, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop,
[?] for help
frame= 36 fps= 0 q=-1.0 size= 123kB
time=00:00:01.35 bitrate= 740.1kbits/frame= 49 fps= 47 q=-1.0
size= 156kB time=00:00:01.87 bitrate= 681.3kbits/frame= 62 fps= 40
q=-1.0 size= 217kB time=00:00:02.39 bitrate= 741.7kbits/frame= 75
fps= 36 q=-1.0 size= 252kB time=00:00:02.91 bitrate=
708.6kbits/frame= 88 fps= 34 q=-1.0 size= 286kB time=00:00:03.43
bitrate= 683.0kbits/frame= 101 fps= 32 q=-1.0 size= 337kB
time=00:00:03.95 bitrate= 697.9kbits/frame= 114 fps= 31 q=-1.0
size= 382kB time=00:00:04.47 bitrate= 699.8kbits/frame= 127 fps= 31
q=-1.0 size= 416kB time=00:00:04.99 bitrate= 682.6kbits/frame= 140
fps= 30 q=-1.0 size= 450kB
time=00:00:05.51 bitrate= 668.1kbits/frame= 153 fps= 30 q=-1.0
size= 502kB time=00:00:06.03 bitrate= 681.1kbits/frame= 166 fps= 29
q=-1.0 size= 545kB time=00:00:06.55 bitrate= 681.6kbits/frame= 179
fps= 29 q=-1.0 size= 580kB time=00:00:07.07 bitrate=
671.3kbits/frame= 192 fps= 28 q=-1.0 size= 613kB time=00:00:07.59
bitrate= 661.5kbits/frame= 205 fps= 28 q=-1.0 size= 670kB
time=00:00:08.11 bitrate= 676.5kbits/frame= 218 fps= 28 q=-1.0
size= 711kB time=00:00:08.63 bitrate= 674.4kbits/frame= 231 fps= 28
q=-1.0 size= 745kB time=00:00:09.15 bitrate= 667.0kbits/frame= 244
fps= 28 q=-1.0 size= 779kB time=00:00:09.66 bitrate=
659.6kbits/frame= 257 fps= 27 q=-1.0 size= 837kB time=00:00:10.18
bitrate= 673.2kbits/frame= 266 fps= 27 q=-1.0 Lsize= 866kB
time=00:00:10.54 bitrate= 672.2kbits/s
video:863kB audio:0kB global headers:0kB muxing overhead 0.300009%
I just save 10 seconds... The re-encoding of the file, as you suggest, works and the new file plays well with ffplay:
ffmpeg -loglevel debug -i algo.mp4 -c copy -y -r 25 -vbsf h264_mp4toannexb algo.ts
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
built on Mar 2 2012 14:36:33 with gcc 4.5.1 20101208 [gcc-4_5-branch revision 167585]
configuration: --shlibdir=/usr/lib64 --prefix=/usr
--mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared
--disable-static --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libspeex --enable-libxvid
--enable-postproc --enable-gpl --enable-x11grab
--extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC
-I/usr/include/gsm' --enable-debug --disable-stripping --enable-libgsm
--enable-libschroedinger --enable-libdirac --enable-avfilter
--enable-libvpx --enable-version3 --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libx264 --enable-libdc1394
--enable-pthreads --enable-librtmp
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0.
6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[mov,mp4,m4a,3gp,3g2,mj2
@ 0x638600] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and
score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x638600] ISO: File Type Major Brand: isom
[h264 @ 0x63ee00] err{or,}_recognition separate: 1; 1
[h264 @ 0x63ee00] err{or,}_recognition combined: 1;
10001
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x638600] All info found
rfps: 24.416667 0.019750
Last message repeated 1
times
rfps: 24.500000 0.014722
Last message repeated 1 times
rfps: 24.583333 0.010432
Last message repeated 1
times
rfps: 24.666667 0.006878
Last message repeated 1 times
rfps: 24.750000 0.004062
Last message repeated 1
times
rfps: 24.833333 0.001983
Last message repeated 1 times
rfps: 24.916667 0.000642
Last message repeated 1
times
rfps: 25.000000 0.000038
Last message repeated 1 times
rfps: 25.083333 0.000171
Last message repeated 1
times
rfps: 25.166667 0.001041
Last message repeated 1 times
rfps: 25.250000 0.002649
Last message repeated 1
times
rfps: 25.333333 0.004994
Last message repeated 1 times
rfps: 25.416667 0.008077
Last message repeated 1
times
rfps: 25.500000 0.011897
Last message repeated 1 times
rfps: 25.583333 0.016454
Last message repeated 1
times
rfps: 49.500000 0.016248
Last message repeated 1 times
rfps: 49.583333 0.011722
Last message repeated 1
times
rfps: 49.666667 0.007933
Last message repeated 1 times
rfps: 49.750000 0.004882
Last message repeated 1
times
rfps: 49.833333 0.002567
Last message repeated 1 times
rfps: 49.916667 0.000991
Last message repeated 1
times
rfps: 50.000000 0.000151
Last message repeated 1 times
rfps: 50.083333 0.000049
Last message repeated 1
times
rfps: 50.166667 0.000684
Last message repeated 1 times
rfps: 50.250000 0.002056
Last message repeated 1
times
rfps: 50.333333 0.004165
Last message repeated 1 times
rfps: 50.416667 0.007012
Last message repeated 1
times
rfps: 50.500000 0.010597
Last message repeated 1 times
rfps: 50.583333 0.014918
Last message repeated 1
times
rfps: 50.666667 0.019977
Last message repeated 1 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'algo.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : \11
encoder : Lavf53.31.100
Duration: 00:00:10.54, start: 0.000000, bitrate: 672 kb/s
Stream #0:0(und), 22, 1/90000: Video: h264 (Constrained Baseline) (avc1
/ 0x31637661), yuv420p, 640x480, 1/180000, 670 kb/s, 25.22 fps, 25 tbr,
90k tbn, 180k tbc
Metadata:
handler_name :
[mpegts @ 0x63fe80] muxrate VBR, pcr every 9000 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'algo.ts':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : \11
encoder : Lavf53.31.100
Stream #0:0(und), 0, 1/90000:
Video: h264 (avc1 / 0x31637661), yuv420p, 640x480, 1/90000, q=2-31, 670
kb/s, 25.22 fps, 90k tbn, 90k tbc
Metadata:
handler_name :
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 266 fps= 0 q=-1.0 Lsize= 962kB time=00:00:10.54 bitrate= 747.4kbits/s
video:863kB audio:0kB global headers:0kB muxing overhead 11.490276%
Just for competition, I try to save the RTSP stream using the same settings, it throws the same error:
Input #0, rtsp, from 'rtsp://admin:admin@192.168.99.146/11':
Metadata:
title : \11
Duration: N/A, start: 0.039956, bitrate: N/A
Stream #0:0, 22, 1/90000: Video: h264 (Constrained Baseline), yuv420p, 640x480, 1/180000, 25 tbr, 90k tbn, 180k tbc
[mpegts @ 0x778440] muxrate VBR, pcr every 9000 pkts, sdt
every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'algo.ts':
Metadata:
title : \11
encoder : Lavf53.31.100
Stream #0:0, 0, 1/90000: Video: h264, yuv420p, 640x480, 1/90000, q=2-31, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
Failed
to open bitstream filter h264_mp4toannexb for stream 0 with codec copy:
Invalid
argument
[mpegts @ 0x778440] H.264 bitstream malformed, no startcode found,
use the h264_mp4toannexb bitstream
filter
av_interleaved_write_frame(): Invalid data found when processing input
Any help will be greatly appreciated!
________________________________
2012/3/21 Carl Eugen Hoyos <cehoyos at ag.or.at>:
> Andrey Utkin <andrey.krieger.utkin <at> gmail.com> writes:
>
>> 2012/3/21 Carl Eugen Hoyos <cehoyos <at> ag.or.at>:
>> > No transcoding takes place with above command line.
>>
>> Carl, i think you're wrong here, i use this bitstream filter with -c
>> copy successfully.
>
> But a bitstream filter does no transcoding afaict.
Ah, sorry, i misunderstood you.
roko,
First of all check that you use recent ffmpeg, at last 0.10 version.
Then try doing
ffmpeg -i rtsp://admin:admin@192.168.99.146/11 -vcodec copy -y -r 25 algo.mp4
ffmpeg -loglevel debug -i algo.mp4 -c copy -y -r 25 -vbsf
h264_mp4toannexb algo.ts
And report here does error stays. If so, please share full log of
second command execution, and algo.mp4 file.
--
Andrey Utkin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: algo.mp4
Type: application/octet-stream
Size: 886291 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120321/444fd2bc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: algo.ts
Type: application/octet-stream
Size: 985496 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120321/444fd2bc/attachment-0001.obj>
More information about the ffmpeg-user
mailing list