[FFmpeg-devel] H.264 RTP

Richard Haywood richard
Thu Jan 31 10:11:15 CET 2008


I am new to using ffmpeg and have tried emailing the ffmpeg user list and
they have no more suggestions.  I've tried to have a look though the code,
but wondered if anyone else has the same problem and is trying to solve the
problem already.
Any help is very gratefully received.
RH

Client:

gdb ./ffmpeg_g

(gdb) r -i rtp://127.0.0.1?localport=8800 -f mp4 out.mp4

This gives:

(gdb) r -i rtp://127.0.0.1?inputport=8800 -f mp4 out.mp4
Starting program: /ffmpeg_source/ffmpeg-checkout-2008-01-30/ffmpeg_g -i
rtp://127.0.0.1?inputport=8800 -f mp4 out.mp4
[Thread debugging using libthread_db enabled]
[New Thread -1210963264 (LWP 5261)]
FFmpeg version SVN-r11690, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --enable-libx264 --enable-gpl
--enable-pthreads
  libavutil version: 49.6.0
  libavcodec version: 51.50.0
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Jan 31 2008 08:51:26, gcc: 4.1.3 20070929 (prerelease) (Ubuntu
4.1.2-16ubuntu2)

then the application just sits there and does nothing.

(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e3e26d in select () from /lib/tls/i686/cmov/libc.so.6
#2  0x080d4eef in rtp_read (h=0x85dc230, buf=0x85dcb28 " ?]\b", size=2048)
at rtpproto.c:199
#3  0x08075b82 in get_buffer (s=0x85dcad0, buf=0x85dcb28 " ?]\b", size=2048)
at aviobuf.c:377
#4  0x080715b0 in av_open_input_file (ic_ptr=0xbfcf6e30, filename=0xbfcf8b16
"rtp://127.0.0.1?inputport=8800", fmt=0x0, buf_size=0,
    ap=0xbfcf6dfc) at utils.c:450
#5  0x0805e7b8 in opt_input_file (filename=0xbfcf8b16
"rtp://127.0.0.1?inputport=8800") at ffmpeg.c:2678
#6  0x0806745a in parse_options (argc=6, argv=0xbfcf7eb4, options=0x84226e0,
parse_arg_function=0x805f880 <opt_output_file>)
    at cmdutils.c:127
#7  0x08063f6c in main (argc=6, argv=0xbfcf7eb4) at ffmpeg.c:3929


(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0xffffe3f0 to 0xffffe430:
0xffffe3f0:     add    %al,(%eax)
0xffffe3f2:     add    %al,(%eax)
0xffffe3f4:     add    %al,(%eax)
0xffffe3f6:     add    %al,(%eax)
0xffffe3f8:     add    %al,(%eax)
0xffffe3fa:     add    %al,(%eax)
0xffffe3fc:     add    %al,(%eax)
0xffffe3fe:     add    %al,(%eax)
0xffffe400 <__kernel_vsyscall+0>:       push   %ecx
0xffffe401 <__kernel_vsyscall+1>:       push   %edx
0xffffe402 <__kernel_vsyscall+2>:       push   %ebp
0xffffe403 <__kernel_vsyscall+3>:       mov    %esp,%ebp
0xffffe405 <__kernel_vsyscall+5>:       sysenter
0xffffe407 <__kernel_vsyscall+7>:       nop
0xffffe408 <__kernel_vsyscall+8>:       nop
0xffffe409 <__kernel_vsyscall+9>:       nop
0xffffe40a <__kernel_vsyscall+10>:      nop
0xffffe40b <__kernel_vsyscall+11>:      nop
0xffffe40c <__kernel_vsyscall+12>:      nop
0xffffe40d <__kernel_vsyscall+13>:      nop
0xffffe40e <__kernel_vsyscall+14>:      jmp    0xffffe403
<__kernel_vsyscall+3>
0xffffe410 <__kernel_vsyscall+16>:      pop    %ebp
0xffffe411 <__kernel_vsyscall+17>:      pop    %edx
0xffffe412 <__kernel_vsyscall+18>:      pop    %ecx
0xffffe413 <__kernel_vsyscall+19>:      ret
0xffffe414:     nop
0xffffe415:     nop
0xffffe416:     nop
0xffffe417:     nop
0xffffe418:     nop
0xffffe419:     nop
0xffffe41a:     nop
0xffffe41b:     nop
0xffffe41c:     nop
0xffffe41d:     nop
0xffffe41e:     nop
0xffffe41f:     nop
0xffffe420 <__kernel_sigreturn+0>:      pop    %eax
0xffffe421 <__kernel_sigreturn+1>:      mov    $0x77,%eax
0xffffe426 <__kernel_sigreturn+6>:      int    $0x80
0xffffe428:     jmp    0xffffe440 <__kernel_rt_sigreturn>
0xffffe42a:     nop
0xffffe42b:     nop
0xffffe42c:     nop
0xffffe42d:     nop
0xffffe42e:     nop
0xffffe42f:     nop
End of assembler dump.



(gdb) info all-registers
eax            0xfffffdfe       -514
ecx            0xbfcf6854       -1076926380
edx            0x0      0
ebx            0x7      7
esp            0xbfcf6810       0xbfcf6810
ebp            0x85dcb28        0x85dcb28
esi            0x0      0
edi            0x0      0
eip            0xffffe410       0xffffe410 <__kernel_vsyscall+16>
eflags         0x246    [ PF ZF IF ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x33     51
st0            0        (raw 0x00000000000000000000)
st1            0        (raw 0x00000000000000000000)
st2            0        (raw 0x00000000000000000000)
st3            0        (raw 0x00000000000000000000)
st4            0        (raw 0x00000000000000000000)
st5            2147483647       (raw 0x401dfffffffe00000000)
st6            1        (raw 0x3fff8000000000000000)
st7            1        (raw 0x3fff8000000000000000)
fctrl          0x37f    895
fstat          0x120    288
ftag           0xffff   65535
fiseg          0x73     115
fioff          0x80fecfb        135261435
foseg          0x7b     123
fooff          0xbfcf6d1c       -1076925156
fop            0x1c9    457
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64
= {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
mxcsr          0x1f80   [ IM DM ZM OM UM PM ]
mm0            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}}
mm1            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}}
mm2            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}}
mm3            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}}
mm4            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}}
mm5            {uint64 = 0xfffffffe00000000, v2_int32 = {0x0, 0xfffffffe},
v4_int16 = {0x0, 0x0, 0xfffe, 0xffff}, v8_int8 = {0x0, 0x0,
    0x0, 0x0, 0xfe, 0xff, 0xff, 0xff}}
mm6            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000},
v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x80}}
mm7            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000},
v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x80}}


At the server I am using:

./ffmpeg -f vob -i test.VOB -an -vcodec libx264 -f rtp rtp://127.0.0.1:8800

and this appears to encode properly and using different software I can see
that it is sending packets out.

When I run exactly the same at the client, and at the server run:
./ffmpeg -f vob -i test.VOB -an -vcodec libx264 -f rtp rtp://127.0.0.1:8800

Then I get lots of messages at the client, not sure they are good as most of
them indicate that it is recovering from losses - even though they are
within the same PC and there should be no network losses, but I think this
is a problem for another day.




More information about the ffmpeg-devel mailing list