[FFmpeg-user] Video and audio goes out of sync in live rtmp streaming
Loadlinx
limiteddi at gmail.com
Sun Mar 9 04:46:28 CET 2014
Hi all
Capturing stream with DVB and transcoding to H264/AAC. Works fine for about
3-4 hours then video/audio goes out of sync. Raw TS direct from DVB is fine.
-async 1 switch didnt help
How can I keep audio and video in sync?
Here is my command
fmpeg -i udp://239.0.8.1:12706 -vcodec libx264 -preset superfast -vb 1500k
-s 720x480 -acodec libfdk_aac -ab 32k -threads 8 -f flv rtmp://
192.168.1.10:1935/live/channel1
Here is the output
ffmpeg version 2.1.git Copyright (c) 2000-2014 the FFmpeg developers
built on Feb 22 2014 21:53:05 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include
--extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree
--enable-pic
libavutil 52. 65.100 / 52. 65.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 1.103 / 4. 1.103
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
[mpeg2video @ 0x237d200] Invalid frame dimensions 0x0.
Last message repeated 39 times
Input #0, mpegts, from 'udp://239.0.8.1:12706':
Duration: N/A, start: 80369.478711, bitrate: 157 kb/s
Program 706
Stream #0:0[0x1522]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv), 544x480 [SAR 20:17 DAR 4:3], max. 15000 kb/s, 29.97 fps, 29.97
tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x1523](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz,
stereo, s16p, 157 kb/s
[libx264 @ 0x2384400] using SAR=8/9
[libx264 @ 0x2384400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1
Cache64
[libx264 @ 0x2384400] profile High, level 3.0
[libx264 @ 0x2384400] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft
2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=1
deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00
mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=0 threads=8 lookahead_threads=1
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=abr mbtree=0 bitrate=1500 ratetol=1.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, flv, to 'rtmp://192.168.1.10:1935/live/channel1':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p,
720x480 [SAR 8:9 DAR 4:3], q=-1--1, 1500 kb/s, 1k tbn, 29.97 tbc
Stream #0:1(eng): Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A),
48000 Hz, stereo, s16, 32 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Stream #0:1 -> #0:1 (mp2 -> libfdk_aac)
Press [q] to stop, [?] for help
frame= 26 fps=0.0 q=22.0 size= 69kB time=00:00:02.13 bitrate=
266.6kbits/frame= 46 fps= 45 q=19.0 size= 163kB time=00:00:02.73
bitrate= 487.6kbits/frame= 58 fps= 38 q=23.0 size= 274kB
time=00:00:03.13 bitrate= 715.4kbits/frame= 79 fps= 39 q=28.0 size=
497kB time=00:00:03.83 bitrate=1060.7kbits/
More information about the ffmpeg-user
mailing list