[FFmpeg-user] HELP :ffplay CANOT play h264 video + pcm_S16LE audio rtp stream

Soho Soho123 soho123.2012 at gmail.com
Mon Jul 15 16:01:05 CEST 2013


Hi All,


Help Please !!!!!
Help Please !!!!!

2013/7/9 Soho Soho123 <soho123.2012 at gmail.com>

> Hi All,
>
> the command line of ffmpeg I used:
> ffmpeg -loglevel debug -f video4linux2 -r 30 -s 1280x720 -input_format
> h264 -i /dev/video1 -f alsa -i hw:0 -ar 48000 -ac 2 -acodec copy -vcodec
> copy  http://localhost:8090/feed1.ffm
>
> It is very appreciated for any input!!
>
> 2013/7/9 Soho Soho123 <soho123.2012 at gmail.com>
>
>> Hi all,
>>
>> I got the big trouble about :
>> ffplay can not play play h264 video + pcm_S16LE audio rtp stream.
>> originally, ffplay can play video stream if no audio.
>> after add audio part , then ffplay can not play
>> Does anyone have ideas?
>> the configuration of ffserver.conf:
>> ======================================================
>> Port 8090
>> RTSPPort 5554
>> <Feed feed1.ffm>
>> File /tmp/feed1.ffm FileMaxSize 5M
>> ACL allow 127.0.0.1
>> </Feed>
>> <Stream test1-rtsp.mpg>
>> Feed feed1.ffm
>> Format rtp
>> AVOptionVideo flags +global_header
>> VideoSize 1280x720
>> VideoFrameRate 30
>> VideoCodec libx264
>> AVOptionAudio flags +global_header
>> AudioCodec pcm_s16le
>> AudioChannels 2
>> AudioSampleRate 48000
>> </Stream>
>> ======================================================
>> the detail log :
>> ======================================================
>> ffserver version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
>>   built on Jul  9 2013 15:51:03 with gcc 4.4.5-1.5.5p4 (GCC)
>>   configuration: --enable-cross-compile --cross-prefix=sdk-linux-
>> --arch=mips --target-os=linux --disable
>> -doc --disable-htmlpages --disable-manpages --disable-podpages
>> --disable-txtpages --disable-mips32r2 --dis
>> able-ffplay --disable-postproc --disable-runtime-cpudetect
>> --disable-swscale-alpha --disable-mipsdspr1 --d
>> isable-mipsdspr2 --disable-mipsfpu --enable-small --prefix=/ffmpeg/romfs
>> --bindir=/ffmpeg/romfs --disable-bsfs --disable-filters --enable-gpl
>> --enable-libx2
>> 64 --extra-cflags=-I/ShareLib_Install/bin/../include
>> --extra-libs='-L/ShareLib_Install/bin/../lib -lx264'
>> --enable-filter='aformat,aresample,copy,format,fps
>> ,framestep,resample' --disable-encoders --enable-encoder='mjpeg,h264,
>> libavutil      52. 18.100 / 52. 18.
>> 100
>>   libavcodec     54. 92.100 / 54. 92.100
>>   libavformat    54. 63.104 / 54. 63.104
>>   libavdevice    54.  3.103 / 54.  3.103
>>   libavfilter     3. 42.103 /  3. 42.103
>>   libswscale      2.  2.100 /  2.  2.100
>>   libswresample   0. 17.102 /  0. 17.102
>> Tue Jul  9 20:57:52 2013 FFserver started.
>> ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
>>   built on Jul  9 2013 15:51:03 with gcc 4.4.5-1.5.5p4 (GCC)
>>   configuration: --enable-cross-compile --cross-prefix=sdk-linux-
>> --arch=mips --target-os=linux --disable
>> -doc --disable-htmlpages --disable-manpages --disable-podpages
>> --disable-txtpages --disable-mips32r2 --dis
>> able-ffplay --disable-postproc --disable-runtime-cpudetect
>> --disable-swscale-alpha --disable-mipsdspr1 --d
>> isable-mipsdspr2 --disable-mipsfpu --enable-small --prefix=/ffmpeg/romfs
>> --bindir=/ffmpeg/romfs --disable-bsfs --disable-filters --enable-gpl
>> --enable-libx2
>> 64 --extra-cflags=-I/ShareLib_Install/bin/../include
>> --extra-libs='-L/ShareLib_Install/bin/../lib -lx264'
>> --enable-filter='aformat,aresample,copy,format,fps
>> ,framestep,resample' --disable-encoders --enable-encoder='mjpeg,h264,
>> libavutil      52. 18.100 / 52. 18.
>> 100
>>   libavcodec     54. 92.100 / 54. 92.100
>>   libavformat    54. 63.104 / 54. 63.104
>>   libavdevice    54.  3.103 / 54.  3.103
>>   libavfilter     3. 42.103 /  3. 42.103
>>   libswscale      2.  2.100 /  2.  2.100
>>   libswresample   0. 17.102 /  0. 17.102
>> Splitting the commandline.
>> Reading option '-loglevel' ... matched as option 'loglevel' (set libav*
>> logging level) with argument 'debu
>> g'.
>> Reading option '-f' ... matched as option 'f' (force format) with
>> argument 'video4linux2'.
>> Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
>> fraction or abbreviation)) with a
>> rgument '30'.
>> Reading option '-s' ... matched as option 's' (set frame size (WxH or
>> abbreviation)) with argument '1280x7
>> 20'.
>> Reading option '-input_format' ... matched as AVOption 'input_format'
>> with argument 'h264'.
>> Reading option '-i' ... matched as input file with argument '/dev/video1'.
>> Reading option '-f' ... matched as option 'f' (force format) with
>> argument 'alsa'.
>> Reading option '-i' ... matched as input file with argument 'hw:0'.
>> Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
>> (in Hz)) with argument '48000'.
>> Reading option '-ac' ... matched as option 'ac' (set number of audio
>> channels) with argument '2'.
>> Reading option '-acodec' ... matched as option 'acodec' (force audio
>> codec ('copy' to copy stream)) with a
>> rgument 'copy'.
>> Reading option '-vcodec' ... matched as option 'vcodec' (force video
>> codec ('copy' to copy stream)) with a
>> rgument 'copy'.
>> Reading option 'http://localhost:8090/feed1.ffm' ... matched as output
>> file.
>> Finished splitting the commandline.
>> Parsing a group of options: global .
>> Applying option loglevel (set libav* logging level) with argument debug.
>> Successfully parsed a group of options.
>> Parsing a group of options: input file /dev/video1.
>> Applying option f (force format) with argument video4linux2.
>> Applying option r (set frame rate (Hz value, fraction or abbreviation))
>> with argument 30.
>> Applying option s (set frame size (WxH or abbreviation)) with argument
>> 1280x720.
>> Successfully parsed a group of options.
>> Opening an input file: /dev/video1.
>> [video4linux2,v4l2 @ 0x69e240] fd:3 capabilities:4000001
>> [video4linux2,v4l2 @ 0x69e240] Selecting input_channel: 0
>> [video4linux2,v4l2 @ 0x69e240] input_channel: 0, input_name: Camera 1
>> [video4linux2,v4l2 @ 0x69e240] Setting time per frame to 1/30
>> [h264 @ 0x69ede0] Using externally provided dimensions
>> [h264 @ 0x69ede0] Frame num gap 18 16
>> [h264 @ 0x69ede0] Frame num gap 21 19
>> [h264 @ 0x69ede0] Frame num gap 27 25
>> [video4linux2,v4l2 @ 0x69e240] All info found
>> [video4linux2,v4l2 @ 0x69e240] Estimating duration from bitrate, this may
>> be inaccurate
>> Input #0, video4linux2,v4l2, from '/dev/video1':
>>   Duration: N/A, start: 24.690000, bitrate: N/A
>>     Stream #0:0, 8, 1/1000000: Video: h264, yuv420p, 1280x720, 1/2000000,
>> -5 kb/s, 30 fps, 30 tbr, 1000k t
>> bn, 2000k tbc
>> Successfully opened the file.
>> Parsing a group of options: input file hw:0.
>> Applying option f (force format) with argument alsa.
>> Successfully parsed a group of options.
>> Opening an input file: hw:0.
>> [alsa @ 0x837ba0] codec_id ==NONE
>> [alsa @ 0x837ba0] All info found
>> [alsa @ 0x837ba0] Estimating duration from bitrate, this may be inaccurate
>> Guessed Channel Layout for  Input Stream #1.0 : stereo
>> Input #1, alsa, from 'hw:0':
>>   Duration: N/A, start: 1373403477.887958, bitrate: 1536 kb/s
>>     Stream #1:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16,
>> 1536 kb/s
>> Successfully opened the file.
>> Parsing a group of options: output file http://localhost:8090/feed1.ffm.
>> Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
>> Applying option ac (set number of audio channels) with argument 2.
>> Applying option acodec (force audio codec ('copy' to copy stream)) with
>> argument copy.
>> Applying option vcodec (force video codec ('copy' to copy stream)) with
>> argument copy.
>> Successfully parsed a group of options.
>> Opening an output file: http://localhost:8090/feed1.ffm.
>> [ffm @ 0x842e40] Format ffm probed with size=2048 and score=101
>> [AVIOContext @ 0x842700] Statistics: 4096 bytes read, 0 seeks
>> Tue Jul  9 20:57:57 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200
>> 4175
>> Successfully opened the file.
>> Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
>>   Metadata:
>>     creation_time   : now
>>     encoder         : Lavf54.63.104
>>     Stream #0:0, 0, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, 1536
>> kb/s
>>     Stream #0:1, 0, 1/1000000: Video: h264, yuv420p, 1280x720, 1/1000000,
>> q=2-31, -5 kb/s, 30 fps, 1000k t
>> bn, 1000k tbc
>> Stream mapping:
>>   Stream #1:0 -> #0:0 (copy)
>>   Stream #0:0 -> #0:1 (copy)
>> Press [q] to stop, [?] for help
>> frame=   23 fps=0.0 q=-1.0 size=     136kB time=00:00:02.37 bitrate=
>> 470.1kbits/s
>>     frame=   38 fps= 37 q=-1.0 size=     272kB time=00:00:02.87 bitrate=
>> 776.4kbits/s
>>     frame=   53 fps= 35 q=-1.0 size=     388kB time=00:00:03.37 bitrate=
>> 943.2kbits/s
>>     frame=   68 fps= 34 q=-1.0 size=     532kB time=00:00:03.87
>> bitrate=1126.1kbits/s
>>     frame=   83 fps= 33 q=-1.0 size=     740kB time=00:00:04.37
>> bitrate=1387.2kbits/s
>>     frame=   98 fps= 32 q=-1.0 size=     972kB time=00:00:04.87
>> bitrate=1635.0kbits/s
>>     frame=  113 fps= 32 q=-1.0 size=    1192kB time=00:00:05.37
>> bitrate=1818.4kbits/s
>>     frame=  128 fps= 32 q=-1.0 size=    1416kB time=00:00:05.87
>> bitrate=1976.1kbits/s
>>     frame=  143 fps= 32 q=-1.0 size=    1632kB time=00:00:06.37
>> bitrate=2098.8kbits/s
>>     frame=  158 fps= 31 q=-1.0 size=    1864kB time=00:00:06.87
>> bitrate=2222.7kbits/s
>>     frame=  173 fps= 31 q=-1.0 size=    2068kB time=00:00:07.37
>> bitrate=2298.7kbits/s
>>     frame=  188 fps= 31 q=-1.0 size=    2276kB time=00:00:07.87
>> bitrate=2369.1kbits/s
>>     frame=  203 fps= 31 q=-1.0 size=    2484kB time=00:00:08.37
>> bitrate=2431.2kbits/s
>>     frame=  218 fps= 31 q=-1.0 size=    2692kB time=00:00:08.87
>> bitrate=2486.2kbits/s
>>     frame=  233 fps= 31 q=-1.0 size=    2904kB time=00:00:09.37
>> bitrate=2538.9kbits/s
>>     frame=  248 fps= 31 q=-1.0 size=    3116kB time=00:00:09.87
>> bitrate=2586.2kbits/s
>>     frame=  263 fps= 31 q=-1.0 size=    3328kB time=00:00:10.37
>> bitrate=2629.0kbits/s
>>     frame=  278 fps= 31 q=-1.0 size=    3544kB time=00:00:10.87
>> bitrate=2670.9kbits/s
>>     frame=  293 fps= 31 q=-1.0 size=    3756kB time=00:00:11.37
>> bitrate=2706.2kbits/s
>>     frame=  308 fps= 31 q=-1.0 size=    3968kB time=00:00:11.87
>> bitrate=2738.5kbits/s
>>     frame=  323 fps= 31 q=-1.0 size=    4180kB time=00:00:12.37
>> bitrate=2768.2kbits/s
>>     Tue Jul  9 20:58:08 2013 192.168.1.3:34550 - - "PLAY
>> test1-rtsp.mpg/streamid=0 RTP/UDP"
>> Tue Jul  9 20:58:08 2013 192.168.1.3:34552 - - "PLAY
>> test1-rtsp.mpg/streamid=1 RTP/UDP"
>> frame=  338 fps= 31 q=-1.0 size=    4308kB time=00:00:12.87
>> bitrate=2742.1kbits/s
>>     frame=  353 fps= 31 q=-1.0 size=    4424kB time=00:00:13.37
>> bitrate=2710.7kbits/s
>>     frame=  368 fps= 31 q=-1.0 size=    4536kB time=00:00:13.87
>> bitrate=2679.1kbits/s
>>     frame=  383 fps= 31 q=-1.0 size=    4652kB time=00:00:14.37
>> bitrate=2652.0kbits/s
>>     frame=  398 fps= 31 q=-1.0 size=    4764kB time=00:00:14.87
>> bitrate=2624.5kbits/s
>>     frame=  413 fps= 31 q=-1.0 size=    4876kB time=00:00:15.37
>> bitrate=2598.8kbits/s
>>     ALSA buffer xrun.
>> Tue Jul  9 20:58:11 2013 [ffm @ 0x679a80]resyncing
>> Tue Jul  9 20:58:11 2013 [ffm @ 0x679a80]cannot find FFM syncword
>> Tue Jul  9 20:58:11 2013 [ffm @ 0x679a80]resyncing
>> frame=  428 fps= 31 q=-1.0 size=    5280kB time=00:00:15.87
>> bitrate=2725.5kbits/s
>>     frame=  443 fps= 30 q=-1.0 size=    5396kB time=00:00:16.37
>> bitrate=2700.3kbits/s
>>     frame=  458 fps= 30 q=-1.0 size=    5512kB time=00:00:16.87
>> bitrate=2676.6kbits/s
>>     frame=  473 fps= 30 q=-1.0 size=    5624kB time=00:00:17.37
>> bitrate=2652.4kbits/s
>>     find Key
>> frame=  488 fps= 30 q=-1.0 size=    5748kB time=00:00:17.87
>> bitrate=2635.0kbits/s
>>     ALSA buffer xrun.
>> frame=  503 fps= 30 q=-1.0 size=    6196kB time=00:00:18.37
>> bitrate=2763.1kbits/s
>>     ALSA buffer xrun.
>> frame=  509 fps= 26 q=-1.0 size=    6224kB time=00:00:18.57
>> bitrate=2745.7kbits/s
>>     frame=  520 fps= 23 q=-1.0 size=    6776kB time=00:00:21.37
>> bitrate=2597.5kbits/s
>>     ALSA buffer xrun.
>> frame=  537 fps= 22 q=-1.0 size=    6856kB time=00:00:24.47
>> bitrate=2295.2kbits/s
>>     ALSA buffer xrun.
>> frame=  561 fps= 22 q=-1.0 size=    7040kB time=00:00:27.30
>> bitrate=2112.5kbits/s
>>     frame=  576 fps= 22 q=-1.0 size=    7092kB time=00:00:27.80
>> bitrate=2089.8kbits/s
>>     frame=  591 fps= 22 q=-1.0 size=    7144kB time=00:00:28.30
>> bitrate=2068.0kbits/s
>>     frame=  606 fps= 22 q=-1.0 size=    7200kB time=00:00:28.80
>> bitrate=2048.0kbits/s
>>     frame=  621 fps= 23 q=-1.0 size=    7252kB time=00:00:29.30
>> bitrate=2027.6kbits/s
>>     ALSA buffer xrun.
>> frame=  636 fps= 23 q=-1.0 size=    7572kB time=00:00:29.80
>> bitrate=2081.5kbits/s
>>     frame=  652 fps= 23 q=-1.0 size=    7808kB time=00:00:30.34
>> bitrate=2108.2kbits/s
>>     frame=  667 fps= 23 q=-1.0 size=    8020kB time=00:00:30.84
>> bitrate=2130.3kbits/s
>>     frame=  682 fps= 23 q=-1.0 size=    8132kB time=00:00:31.34
>> bitrate=2125.6kbits/s
>>     frame=  697 fps= 23 q=-1.0 size=    8244kB time=00:00:31.84
>> bitrate=2121.1kbits/s
>>     frame=  712 fps= 23 q=-1.0 size=    8360kB time=00:00:32.34
>> bitrate=2117.7kbits/s
>>     frame=  726 fps= 23 q=-1.0 size=    8472kB time=00:00:32.80
>> bitrate=2115.9kbits/s
>>     frame=  741 fps= 24 q=-1.0 size=    8584kB time=00:00:33.30
>> bitrate=2111.7kbits/s
>>     ALSA buffer xrun.
>> frame=  756 fps= 24 q=-1.0 size=    8996kB time=00:00:33.80
>> bitrate=2180.3kbits/s
>>     frame=  771 fps= 24 q=-1.0 size=    9108kB time=00:00:34.30
>> bitrate=2175.3kbits/s
>>     frame=  786 fps= 24 q=-1.0 size=    9220kB time=00:00:34.80
>> bitrate=2170.4kbits/s
>>     frame=  802 fps= 24 q=-1.0 size=    9352kB time=00:00:35.34
>> bitrate=2167.8kbits/s
>>     frame=  816 fps= 24 q=-1.0 size=    9460kB time=00:00:35.80
>> bitrate=2164.7kbits/s
>>     frame=  831 fps= 24 q=-1.0 size=    9576kB time=00:00:36.30
>> bitrate=2161.1kbits/s
>>     ALSA buffer xrun.
>> frame=  846 fps= 24 q=-1.0 size=   10008kB time=00:00:36.80
>> bitrate=2227.9kbits/s
>>     frame=  861 fps= 24 q=-1.0 size=   10120kB time=00:00:37.30
>> bitrate=2222.6kbits/s
>>     frame=  876 fps= 24 q=-1.0 size=   10232kB time=00:00:37.80
>> bitrate=2217.5kbits/s
>>     frame=  891 fps= 24 q=-1.0 size=   10348kB time=00:00:38.30
>> bitrate=2213.3kbits/s
>>     Tue Jul  9 20:58:34 2013 192.168.1.3 - - [PLAY] "rtsp://
>> 192.168.1.254:5554/test1-rtsp.mpg/ RTSP/1.0" 200 1
>> 030
>> frame=  907 fps= 25 q=-1.0 size=   10460kB time=00:00:38.84
>> bitrate=2206.2kbits/s
>>     frame=  922 fps= 25 q=-1.0 size=   10572kB time=00:00:39.34
>> bitrate=2201.5kbits/s
>>     ALSA buffer xrun.
>> [ffm @ 0x842940] st:0 PTS: 37891681 DTS: 37891681 < 37892211 invalid,
>> clipping
>> frame=  937 fps= 25 q=-1.0 size=   10984kB time=00:00:39.84
>> bitrate=2258.6kbits/s
>>     frame=  952 fps= 25 q=-1.0 size=   11096kB time=00:00:40.34
>> bitrate=2253.3kbits/s
>>     qframe=  967 fps= 25 q=-1.0 size=   11208kB time=00:00:40.84
>> bitrate=2248.2kbits/s
>>     frame=  982 fps= 25 q=-1.0 size=   11324kB time=00:00:41.34
>> bitrate=2244.0kbits/s
>>     frame=  997 fps= 25 q=-1.0 size=   11444kB time=00:00:41.84
>> bitrate=2240.7kbits/s
>>     frame= 1012 fps= 25 q=-1.0 size=   11560kB time=00:00:42.34
>> bitrate=2236.6kbits/s
>>     ALSA buffer xrun.
>> frame= 1027 fps= 25 q=-1.0 size=   11988kB time=00:00:42.84
>> bitrate=2292.4kbits/s
>>     ALSA buffer xrun.
>> frame= 1029 fps= 23 q=-1.0 size=   12004kB time=00:00:42.90
>> bitrate=2292.2kbits/s
>>     frame= 1052 fps= 23 q=-1.0 size=   12572kB time=00:00:46.90
>> bitrate=2195.9kbits/s
>>     frame= 1067 fps= 23 q=-1.0 size=   12624kB time=00:00:47.40
>> bitrate=2181.8kbits/s
>>
>> =============================================================================
>> ffplay log:
>> ffplay -loglevel debug rtsp://192.168.1.254:5554/test1-rtsp.mpg
>> ffplay version N-54362-ge0be3cb Copyright (c) 2003-2013 the FFmpeg
>> developers
>>   built on Jul  2 2013 22:15:59 with gcc 4.7.3 (GCC)
>>   configuration: --enable-gpl --enable-version3 --disable-w32threads
>> --enable-av
>> isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
>> --enab
>> le-iconv --enable-libass --enable-libbluray --enable-libcaca
>> --enable-libfreetyp
>> e --enable-libgsm --enable-libilbc --enable-libmodplug
>> --enable-libmp3lame --ena
>> ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
>> --enable-l
>> ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
>> --enable-libsp
>> eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
>> --enable-libvo-
>> amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
>> --enable-libxavs --
>> enable-libxvid --enable-zlib
>>   libavutil      52. 38.100 / 52. 38.100
>>   libavcodec     55. 18.100 / 55. 18.100
>>   libavformat    55. 11.100 / 55. 11.100
>>   libavdevice    55.  2.100 / 55.  2.100
>>   libavfilter     3. 77.101 /  3. 77.101
>>   libswscale      2.  3.100 /  2.  3.100
>>   libswresample   0. 17.102 /  0. 17.102
>>   libpostproc    52.  3.100 / 52.  3.100
>> SDP:nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
>> v=0
>> o=- 0 0 IN IP4 127.0.0.1
>> s=No Title
>> c=IN IP4 0.0.0.0
>> t=0 0
>> a=tool:libavformat 54.63.104
>> m=audio 0 RTP/AVP 96
>> b=AS:1536
>> a=control:streamid=0
>> m=video 0 RTP/AVP 97
>> b=AS:-5
>> a=rtpmap:97 H264/90000
>> a=fmtp:97 packetization-mode=1;
>> sprop-parameter-sets=Z0JAH5ZUAoAtyA==,aM44gA==;
>> profile-level-id=42401F
>> a=control:streamid=1
>>
>> [rtsp @ 02a64500] video codec set to: h264
>> [NULL @ 02a679e0] RTP Packetization Mode: 1
>> [NULL @ 02a679e0] Extradata set to 02a67ea0 (size: 22)!
>> [NULL @ 02a679e0] RTP Profile IDC: 42 Profile IOP: 40 Level: 1f
>> hello state=0 0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
>>     nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
>>
>>
>>
>>
>>
>>
>>
>


More information about the ffmpeg-user mailing list