[Ekiga-devel-list] High resolutions with H.264



Hi,

First of all, I'd like to thank everyone contributing to developing this
great application and I hope to be able to contribute myself in the near
future. A few weeks ago, I namely started working on a students project,
which consists in upgrading Ekiga to permit videoconferencing at higher
resolutions (960x720 or above) over a LAN or a fiber optic connection. In
order to achieve this goal, I decided to focus on the recently added CELT
codec and the H.264 codec for audio and video transmission since they turn
out to provide best results.
As a development setup, I use two clients and a traffic shaper that are
connected via LAN cables with the following configuration:

A (Alice) [if = 192.168.1.10] <----------------> [if = 192.168.1.20] S
(TrafficShaper) [if = 192.168.2.20] <----------------> [if = 192.168.2.10] B
(Bob)

Since the H.264 plugin in Opal 3.6.1 implements the baseline profile at
level 3.0, the maximal frame size (= nb macroblocks) is 1620 according to
h264_levels[] in h264frame.h. This limits the usage of this codec to a
resolution of 704x576 or lower and to a maximal bandwidth of 10 Mbit/s. So,
my idea was to use the same codec but at a higher profile. I finally decide
to use the 4.1 level which offers maximal bandwidths of 50 Mbit/s and
supports all the defined resolutions in h264_resolutions[] (up to
1920x1088). To do so, I changed the profile-level-id in h264-x264.cxx, in
its header file and in enc-ctx.h from 42C01E to 42C029 (since Ox29
corresponds to 41 in decimal). Moreover, I successfully added new resolution
definitions (up to 1600x1200) to videoinput-info.h. I am now able to output
the video locally at these resolutions.
Though, Ekiga crashes when establishing a new videoconferencing session with
the remote client when I use resolutions higher than VGA (I tried 800x600,
960x720 and 1024x768). It works well for VGA resolution or lower with the
new profile level. When analysing the traffic between the two clients, it
seems that the client that initated the session (B in my case) crashes as
soon as it receives the first (few) H.264 RTP packet(s) from the other
client, while A does not receive any video packet.

Here are some intersting parts of B's log file produced when a session is
established at a resolution of 1024x768:

2009/04/01 16:02:30.775      0:44.603      Aggregator:0xad1a0b90   
OpalPlugin    to_normalised_options: H.264
   h264-x264.cxx(558)    H264    Cap    Profile and Level: 66;192;41
   h264-x264.cxx(473)    H264    Cap    Frame Size: 3072(8192)
   h264-x264.cxx(498)    H264    Cap    MB/s: 92160(245760)
   h264-x264.cxx(449)    H264    Cap    Bitrate: 10240000(50000000)

=> The values are correctly retrieved from the 41 level_idc in the
h264_levels[] array.

   h264-x264.cxx(217)    H264    Decoder    Decoder successfully opened
2009/04/01 16:02:31.177      0:45.005      Aggregator:0xad1a0b90   
OpalPlugin    Setting decoder options:
                    Format Name       = H.264
                     Media Type       = video
                   Payload Type       = [pt=123]
                  Encoding Name       = h264
                 Bandwidth-TIAS (R/W) = 768000     UnsignedInt
 CAP RFC3894 Packetization Mode (R/W) = "1"         FMTP name:
packetization-mode (5) String
      CAP RFC3894 Profile Level (R/W) = "42c029"    FMTP name:
profile-level-id (000000) String
                     Clock Rate (R/O) = 90000      UnsignedInt
                   Frame Height (R/W) = 768        UnsignedInt
                     Frame Time (R/W) = 3000       UnsignedInt
                    Frame Width (R/W) = 1024       UnsignedInt
                   Max Bit Rate (R/W) = 4096000    UnsignedInt
                 Max Frame Size (R/O) = 1400       UnsignedInt
            Max Rx Frame Height (R/W) = 1088       UnsignedInt
             Max Rx Frame Width (R/W) = 1920       UnsignedInt
            Min Rx Frame Height (R/W) = 120        UnsignedInt
             Min Rx Frame Width (R/W) = 160        UnsignedInt
            Rate Control Enable (R/W) = 1          Boolean
   Rate Control Max Frames Skip (R/W) = 1          UnsignedInt
       Rate Control Window Size (R/W) = 500        UnsignedInt
Rate Controller Bit Rate Scaler (R/W) = 100        UnsignedInt
                Target Bit Rate (R/W) = 4096000    UnsignedInt
     Temporal Spatial Trade Off (R/O) = 31         UnsignedInt
            Tx Key Frame Period (R/W) = 125        UnsignedInt


     enc-ctx.cxx(115)    H264    Encoder    x264 encoder successfully opened
2009/04/01 16:02:32.181      0:46.009      Aggregator:0xad1a0b90   
OpalPlugin    Setting encoder options:
                    Format Name       = H.264
                     Media Type       = video
                   Payload Type       = [pt=123]
                  Encoding Name       = h264
                 Bandwidth-TIAS (R/W) = 768000     UnsignedInt
 CAP RFC3894 Packetization Mode (R/W) = "1"         FMTP name:
packetization-mode (5) String
      CAP RFC3894 Profile Level (R/W) = "42c029"    FMTP name:
profile-level-id (000000) String
                     Clock Rate (R/O) = 90000      UnsignedInt
                   Frame Height (R/W) = 768        UnsignedInt
                     Frame Time (R/W) = 3000       UnsignedInt
                    Frame Width (R/W) = 1024       UnsignedInt
                   Max Bit Rate (R/W) = 4096000    UnsignedInt
                 Max Frame Size (R/O) = 1400       UnsignedInt
            Max Rx Frame Height (R/W) = 1088       UnsignedInt
             Max Rx Frame Width (R/W) = 1920       UnsignedInt
            Min Rx Frame Height (R/W) = 120        UnsignedInt
             Min Rx Frame Width (R/W) = 160        UnsignedInt
            Rate Control Enable (R/W) = 1          Boolean
   Rate Control Max Frames Skip (R/W) = 1          UnsignedInt
       Rate Control Window Size (R/W) = 500        UnsignedInt
Rate Controller Bit Rate Scaler (R/W) = 100        UnsignedInt
                        RawFMTP (R/W) =
"packetization-mode=\"1\";profile-level-id=\"42c029\"" String
                Target Bit Rate (R/W) = 4096000    UnsignedInt
     Temporal Spatial Trade Off (R/O) = 31         UnsignedInt
            Tx Key Frame Period (R/W) = 125        UnsignedInt

=> Why are the max bit rate values changed to 4'096'000 even though they are
set to 10'240'000 in the preferences and are correctly retrieved in
h264-x264.cxx? This also happens to the frame size which should be set to
3072 (1024 * 768 / 256) and not to 1400... According to h264_resolutions[],
a frame rate of 1400 should limit the application to use maximally VGA
resolution. Unfortunately, I was not able to find where these values are set
in the code. Are these values enforced by the encoder (libx264) or the
encoder (libavcodec)?

Am I on the right track but missing some other limitations regarding the
resolution support in Ekiga? Did anyone already try to implement higher
resolution videoconferencing in Ekiga? Another issue might also be related
to the hardware performance limitations for encoding/decoding at such high
resolutions. In this regard, I will be provided with the latest hardware
that can be currently found on the mass market.
The least I can say is that it was stated before that implementing higher
resolutions in Ekiga seems to be possible:
"Matthias Schneider (Ekiga developer): About the resolution, as far as I
know, Skype supports 320x240 and 640x480, while Ekiga will probably support
many resolutions up to (theoretically) 1920x1088 (HDTV) (this will mainly
depends on how our testing is progressing), which will be interesting in the
future when processing power will be even more abundant, and devices than
can capture these resolutions are more common."
(http://www.freesoftwaremagazine.com/columns/interview_with_ekiga_developers)

I hope I could describe my issue well enough in order to get some useful
feedback or redirections ;)
Many thanks for your inputs in advance,
Thomas

PS: I appended the Ekiga 3.2.0 log files of both clients A and B to this
post.
http://www.nabble.com/file/p22863659/42c029-1024x768-A.txt
42c029-1024x768-A.txt 
http://www.nabble.com/file/p22863659/42c029-1024x768-B.txt
42c029-1024x768-B.txt 

-- 
View this message in context: http://www.nabble.com/High-resolutions-with-H.264-tp22863659p22863659.html
Sent from the Ekiga Dev mailing list archive at Nabble.com.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]