[FFmpeg-user] New fellow with questions about ffmpeg to justin.tv

Steven Spartz spartman27 at itctel.com
Wed Jul 18 01:14:37 CEST 2012


I did accidentally post this into the server forum first so sorry if 
this shows up as a double post.

Have been working with ffmpeg on my HP dc5800 desktop running Trisquel 
5.5 and have encountered a problem.

What I am doing is this, running video and audio from a Logitech C270 
USB camera through ffmpeg to justin.tv

If I run just the video to the justin.tv page the stream will work 
flawlessly for as long as I wish.

However if I try to add audio to the stream it will fail with the 
following error:  DTS 411312205 next 411318601 st:0 invalid dropping  
and PTS 411312205 next 411318601 invalid dropping st:0

The stream will usually fail within 5 minutes or less.

Here is the command I am issuing to the server:

ffmpeg -f alsa -ac 1 -i pulse -f video4linux2 -i /dev/video0 -s 1024x576 
-vf 
drawtext="fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf: 
text='\%D \%r': fontcolor=white at 1.0: x=30: y=440: fontsize=30: box=1: 
boxcolor=black at 1.0" -vcodec libx264 -acodec libmp3lame -ab 28k -ar 22050 
-vb 350k -f flv rtmp://live.justin.tv/app/live_


Here is my FFMPEG info

ffmpeg -version
ffmpeg version git-2012-07-03-d8013f3
built on Jul  3 2012 18:16:27 with gcc 4.6.1
configuration: --enable-gpl --enable-libfreetype --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree 
--enable-version3 --enable-x11grab
libavutil      51. 63.100 / 51. 63.100
libavcodec     54. 32.100 / 54. 32.100
libavformat    54. 14.100 / 54. 14.100
libavdevice    54.  0.100 / 54.  0.100
libavfilter     3.  0.101 /  3.  0.101
libswscale      2.  1.100 /  2.  1.100
libswresample   0. 15.100 /  0. 15.100
libpostproc    52.  0.100 / 52.  0.100

And a Sample of output data

DTS 411032947, next:411314602 st:0 invalid dropping
PTS 411032947, next:411314602 invalid dropping st:0
DTS 411127066, next:411315935 st:0 invalid dropping
PTS 411127066, next:411315935 invalid dropping st:0
DTS 411220151, next:411317268 st:0 invalid dropping
PTS 411220151, next:411317268 invalid dropping st:0
DTS 411312205, next:411318601 st:0 invalid dropping
PTS 411312205, next:411318601 invalid dropping st:0
Trying to remove 576 samples, but que emptytime=00:17:12.68 bitrate= 
347.4kbits/s
frame= 1660 fps=1.2 q=16675933.0 Lsize=   50746kB time=00:19:14.90 
bitrate= 360.0kbits/s
video:49371kB audio:1115kB subtitle:0 global headers:0kB muxing overhead 
0.515765%
[libx264 @ 0xa92c840] frame I:7     Avg QP:14.20  size:161374
[libx264 @ 0xa92c840] frame P:422   Avg QP:15.51  size: 65734
[libx264 @ 0xa92c840] frame B:1231  Avg QP:21.55  size: 17617
[libx264 @ 0xa92c840] consecutive B-frames:  0.8%  0.5%  1.6% 97.1%
[libx264 @ 0xa92c840] mb I  I16..4: 14.4% 41.1% 44.5%
[libx264 @ 0xa92c840] mb P  I16..4:  0.8%  3.8%  0.9%  P16..4: 33.2% 
20.0% 20.7%  0.0%  0.0%    skip:20.7%
[libx264 @ 0xa92c840] mb B  I16..4:  0.1%  1.2%  0.2%  B16..8: 24.1%  
4.9%  2.6%  direct:14.2%  skip:52.8%  L0:46.3% L1:35.0% BI:18.8%
[libx264 @ 0xa92c840] final ratefactor: 15.59
[libx264 @ 0xa92c840] 8x8 transform intra:69.0% inter:50.2%
[libx264 @ 0xa92c840] coded y,uvDC,uvAC intra: 91.3% 94.5% 91.1% inter: 
28.7% 44.7% 29.8%
[libx264 @ 0xa92c840] i16 v,h,dc,p: 20% 23%  9% 47%
[libx264 @ 0xa92c840] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 33% 27% 4% 3%  
2%  5%  4%  8%
[libx264 @ 0xa92c840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 37% 13% 5% 6%  
4%  7%  5%  7%
[libx264 @ 0xa92c840] i8c dc,h,v,p: 65% 16% 12%  8%
[libx264 @ 0xa92c840] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0xa92c840] ref P L0: 35.4%  4.0% 41.9% 18.7%
[libx264 @ 0xa92c840] ref B L0: 56.5% 34.0%  9.5%
[libx264 @ 0xa92c840] ref B L1: 86.3% 13.7%
[libx264 @ 0xa92c840] kb/s:320.22

I hope this helps.

I look forward to hearing from you as to what I can do to correct this.



More information about the ffmpeg-user mailing list