[FFmpeg-user] Issues in Creating SDP for a H264/AAC file
Yadnesh Phadke
yadnesh at gmail.com
Tue Apr 19 13:30:29 CEST 2011
The video plays well on Android handset and on VLC player. The issue is
only with streaming using FFMpeg.
I can upload the file for reference, if required.
Regards,
Yadnesh
On Tue, Apr 19, 2011 at 4:34 PM, Yadnesh Phadke <yadnesh at gmail.com> wrote:
> Hi All,
>
>
>
> I have recorded a video from my Samsung Galaxy S (Android 2.2) phone which
> I am trying to stream using the following ffmpeg command.
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> ffmpeg -i ~/Media/video-2011-04-13-15-13-09.mp4 -an -vcodec copy -f rtp
> rtp://192.168.1.122:11111 -i ~/Media/video-2011-04-13-15-13-09.mp4 -vn
> -strict experimental -acodec copy -flags +global_header -f rtp rtp://
> 192.168.1.122:22222 -newaudio
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> The created SDP seems to be incomplete. The output shows no value for "
> sprop-parameter-sets"
>
> Earlier, I have successfully streamed and played the stream for other MP4
> files having H264 and AAC encoded media. Facing issue with files created on
> Android. Is this issue related to any specific encoding level of H264?
>
> Here is the complete output of that streaming command:
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
>
> built on Sep 20 2010 18:45:33 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
>
> configuration: --prefix=/home/yadnesh --enable-shared --disable-static
> --disable-optimizations --disable-mmx --disable-stripping --enable-debug
> --enable-version3 --enable-pthreads --enable-gpl --enable-libfaac
> --enable-libx264 --enable-nonfree
>
> libavutil 50.15. 1 / 50.15. 1
>
> libavcodec 52.72. 2 / 52.72. 2
>
> libavformat 52.64. 2 / 52.64. 2
>
> libavdevice 52. 2. 0 / 52. 2. 0
>
> libswscale 0.11. 0 / 0.11. 0
>
>
> Start time = 0
>
>
> Seems stream 1 codec frame rate differs from container frame rate: 60000.00
> (60000/1) -> 1000.00 (1000/1)
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> '/home/yadnesh/Media/video-2011-04-13-15-13-09.mp4':
>
> Metadata:
>
> major_brand : 3gp4
>
> minor_version : 768
>
> compatible_brands: 3gp43gp6
>
> Duration: 00:00:09.72, start: 0.000000, bitrate: 3457 kb/s
>
> Stream #0.0(eng): Audio: aac, 16000 Hz, mono, s16, 56 kb/s
>
> Stream #0.1(eng): Video: h264, yuv420p, 720x480, 3435 kb/s, 29.85 fps,
> 1k tbr, 30k tbn, 60k tbc
>
>
> Start time = 0
>
>
> Seems stream 1 codec frame rate differs from container frame rate: 60000.00
> (60000/1) -> 1000.00 (1000/1)
>
> Input #1, mov,mp4,m4a,3gp,3g2,mj2, from
> '/home/yadnesh/Media/video-2011-04-13-15-13-09.mp4':
>
> Metadata:
>
> major_brand : 3gp4
>
> minor_version : 768
>
> compatible_brands: 3gp43gp6
>
> Duration: 00:00:09.72, start: 0.000000, bitrate: 3457 kb/s
>
> Stream #1.0(eng): Audio: aac, 16000 Hz, mono, s16, 56 kb/s
>
> Stream #1.1(eng): Video: h264, yuv420p, 720x480, 3435 kb/s, 29.85 fps,
> 1k tbr, 30k tbn, 60k tbc
>
> Output #0, rtp, to 'rtp://192.168.1.122:11111':
>
> Metadata:
>
> encoder : Lavf52.64.2
>
> Stream #0.0(eng): Video: avc1 / 0x31637661, yuv420p, 720x480, q=2-31,
> 3435 kb/s, 90k tbn, 30k tbc
>
> Output #1, rtp, to 'rtp://192.168.1.122:22222':
>
> Metadata:
>
> encoder : Lavf52.64.2
>
> Stream #1.0(eng): Audio: aac, 16000 Hz, mono, 56 kb/s
>
> Stream mapping:
>
> Stream #0.1 -> #0.0
>
> Stream #0.0 -> #1.0
>
> SDP:
>
> v=0
>
> o=- 0 0 IN IP4 192.168.1.122
>
> s=No Name
>
> t=0 0
>
> a=tool:libavformat 52.64.2
>
> m=video 0 RTP/AVP 96
>
> c=IN IP4 192.168.1.122
>
> b=AS:3435
>
> a=rtpmap:96 H264/90000
>
> a=fmtp:96 packetization-mode=1; sprop-parameter-sets=
>
> a=control:streamid=0
>
> m=audio 0 RTP/AVP 97
>
> c=IN IP4 192.168.1.122
>
> b=AS:56
>
> a=rtpmap:97 MPEG4-GENERIC/16000/1
>
> a=fmtp:97
> profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;
> config=1408
>
> a=control:streamid=1
>
>
> Press [q] to stop encoding
>
> frame= 287 fps= 0 q=-1.0 Lsize= 0kB time=9.58 bitrate= 0.0kbits/s
>
> video:4032kB audio:68kB global headers:0kB muxing overhead -99.999333%
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
> On debugging into the FFMpeg code, I found that while creating sdp it does
> not go in to the loop (of function static char
> *extradata2psets(AVCodecContext *c))
>
> while (r < c->extradata + c->extradata_size) {
>
> }
>
>
>
> Can you please help me with the causes of such wrong SDP? Could the cause
> be the file format (3GP) or the codec (H264)?
>
>
> Regards,
>
> -- Yadnesh
>
> ----------------------------------------------------------------------
> Christopher Morley - There is only one success - to be able to spend your
> life in your own way.
>
--
----------------------------------------------------------------------
Christopher Morley - There is only one success - to be able to spend your
life in your own way.
More information about the ffmpeg-user
mailing list