<PAGE>

                                                                     Exhibit 4.2



                  STOCK RESTRICTION AND REGISTRATION AGREEMENT
                  --------------------------------------------


     THIS STOCK RESTRICTION AGREEMENT dated as of October 15, 2001, is by and
among Sonic Foundry, Inc., a Maryland corporation (the "Buyer") and Zero Stage
Capital VI Limited Partnership ("Zero Stage"), Saturn Capital, Inc. ("Saturn"),
and Saturn Partners Limited Partnership ("Saturn Partners") (collectively, "New
Stockholders").

     WHEREAS, the Buyer, MediaSite Acquisition, Inc., a Maryland corporation
("Acquisition") which is a wholly owned subsidiary of Buyer, and MediaSite,
Inc., a Pennsylvania corporation (the "Company") are parties to an Asset
Purchase Agreement and Plan of Asset Transfer and Reorganization dated as of the
date hereof (the "Purchase Agreement") pursuant to which Acquisition will
acquire substantially all of the assets and liabilities of the Company; and

     WHEREAS, the parties desire to provide for certain restrictions and other
matters relating to the shares to be issued to the New Stockholders following a
distribution by the Company to its shareholders (the "Shares");

     NOW, THEREFORE, the parties agree as follows:


                                    ARTICLE I
                                    ---------

                                TERM OF AGREEMENT
                                -----------------

     Term of Agreement. This Agreement and the rights and obligations of the
parties under this Agreement, shall terminate on the earliest to occur of the
following: (a) one year following the closing of the Purchase Agreement (the
"Closing"), or (b) immediately prior to the consummation of (i) the sale of all,
or substantially all, of the Buyer's assets or capital stock either through a
direct sale or merger, consolidation, reorganization or any other form of
business combination or acquisition in which the Buyer is the target of such
acquisition, or (ii) the sale of 50% or more of the Buyer's capital stock
pursuant to a "change in control" of the Buyer, provided, however, that the New
Stockholders shall at all times comply with all applicable requirements of
federal and state securities law, including Rule 144, with respect to the sale
of the Shares.


                                   ARTICLE II
                                   ----------

                               LOCK-UP PROVISIONS
                               ------------------

     Section 2.1 Lock-up Provisions. The New Stockholders hereby agree that,
without the prior written consent of Buyer, they will not (1) offer, pledge,
sell, contract to sell, sell any


<PAGE>


option or contract to purchase, purchase any option or contract to sell, grant
any option, right or warrant to purchase, lend, or otherwise transfer or dispose
of, directly or indirectly, any Restricted Shares or (2) enter into any swap or
other arrangement that transfers to another, in whole or in part, any of the
economic consequences of ownership of the Restricted Shares.

     Section 2.2 Definition of Restricted Shares. Restricted Shares of each New
Stockholder shall mean all Shares acquired by each New Stockholder at the
Closing, provided, however, that the amount of Shares deemed "Restricted Shares"
with respect to each New Stockholder shall decrease with time according to the
schedule set forth below:

<TABLE>
<CAPTION>

          -------------------------------------------------------------------------------------------------
          Time Period                                       Amount of Restricted Shares
          -----------                                       ---------------------------
          -------------------------------------------------------------------------------------------------
          <S>                                              <C>
          Until 3 months following Closing                  All Shares acquired by each New Stockholder
                                                            at the Closing
          -------------------------------------------------------------------------------------------------
          Beginning 3 months following Closing              66 2/3% of the Shares acquired by each New
                                                            Stockholder at the Closing shall be deemed
                                                            Restricted Shares.
          -------------------------------------------------------------------------------------------------
          Beginning 6 months following Closing              33 1/3% of the Shares acquired by each New
                                                            Stockholder at the Closing shall be deemed
                                                            Restricted Shares.
          -------------------------------------------------------------------------------------------------
          Beginning 9 months following Closing              No Shares shall be deemed Restricted Shares.
          -------------------------------------------------------------------------------------------------
</TABLE>


                                   ARTICLE III
                                   -----------

                               GENERAL PROVISIONS
                               ------------------

     Section 3.1 Specific Enforcement. Because the Shares cannot be readily
purchased or sold in the open market, the parties hereby acknowledge and agree
that they may be irreparably damaged in the event that this Agreement is not
specifically enforced. Upon a breach or threatened breach of the terms,
covenants and/or conditions of this Agreement by any party, the other parties
shall, in addition to all other remedies, be entitled to a temporary or
permanent injunction, without showing any actual damage, and/or a decree for
specific performance, in accordance with the provisions hereof.

     Section 3.2 Legend. All certificates evidencing any of the New
Stockholder's Shares subject to this Agreement shall also bear a legend
substantially as follows during the term of this Agreement:

          "The shares represented by this certificate are subject to
     restrictions on transfer and may not be sold, exchanged, transferred,
     pledged, hypothecated or otherwise disposed of except in accordance with
     and subject to all the terms and


                                       2


<PAGE>


     conditions of a certain Stock Restriction and Registration Agreement, a
     copy of which the Company will furnish to the holder of this certificate
     upon request and without charge."

     Section 3.3 Governing Law; Successors and Assigns. This Agreement shall be
construed in accordance with and governed by the laws of the State of Wisconsin
and shall be binding upon the heirs, personal successor, executors,
administrators, successors and assigns of the parties.

     Section 3.4 Notices. Notices given hereunder shall be deemed to have been
duly given (i) on the date of personal delivery or (ii) one business day
following delivery by express overnight courier service, to the party being
notified at its address set forth herein or such other address as it may
subsequently notify the other party in writing.

     Section 3.5 Entire Agreement and Amendments. This Agreement constitutes the
entire agreement of the parties with respect to the subject matter hereof, and
may not be modified, amended or terminated except by the written consent of the
Buyer and by each New Stockholder who is to be bound thereby.

     Section 3.6 Waivers. No waiver of any breach or default hereunder shall be
considered valid unless in writing, and no such waiver shall be deemed a waiver
of any subsequent breach or default of the same or similar nature.

     Section 3.7 Severability. If any provision of this Agreement shall be held
to be illegal, invalid or unenforceable, such illegality, invalidity or
unenforceability shall attach only to such provision and shall not in any manner
affect or render illegal, invalid or unenforceable any other severable provision
of this Agreement, and this Agreement shall be carried out as if any such
illegal, invalid or unenforceable provision were not contained herein.

     Section 3.8 Counterparts. This Agreement may be executed in one or more
counterparts, each of which shall be deemed to be an original, but all of which
taken together shall constitute one and the same instrument.

     Section 3.9 Termination. In the event that the Purchase Agreement is
terminated, this Agreement shall terminate and be of no further force or effect.


                                   ARTICLE IV

                                  REGISTRATION
                                  ------------

     Section 4.1 Shelf Registration. The Buyer shall (i) file with the
Securities and Exchange Commission (the "SEC") a registration statement for the
Shares on Form S-3 (the "Shelf Registration") within 60 days of the date of
Closing, (ii) use its best efforts to have such registration statement declared
effective with the SEC as soon as practicable, and (iii) use its best


                                       3


<PAGE>



efforts to maintain the effectiveness of the Registration Statement for a period
not less than three years from the Closing. Should the Shelf Registration not be
declared effective or should its effectiveness lapse for any reason during the
period set forth above, the Buyer shall use its best efforts to have the Shares
registered on another registration statement as soon as reasonably practicable.

     Section 4.2 Survival of Restrictions. Notwithstanding any registration
pursuant to Article IV hereof, the remaining provisions of this Agreement shall
survive the registration of the Shares, as set forth herein.

     Section 4.2 Indemnification. The Buyer will indemnify and hold each New
Stockholder, and their respective partners, officers, directors and agents and
each person, if any, who controls (within the meaning of the Securities Act of
1933 or the Securities Exchange Act of 1934) the New Stockholder or any of the
foregoing, harmless to the maximum extent permitted by law, from and against any
loss, claim, liability, damage or expense (including attorneys' fees) resulting
from a claim that the Shelf Registration, prospectus or amendment thereof or
supplement thereto, which includes Shares to be sold by such New Stockholder,
contains a material misstatement or omission, unless such claim is based upon
information provided by such New Stockholder; and each such New Stockholder will
indemnify and hold harmless the Buyer, its directors, officers and agents and
each person, if any, who controls (within the meaning of the Securities Act of
1933 or the Securities Exchange Act of 1934) the Buyer against any loss, claim,
liability, damage or expense (including attorneys' fees) resulting from any such
claim relating to information provided by such New Stockholder.


                                       4

<PAGE>



IN WITNESS WHEREOF, the parties have executed this Agreement.


SONIC FOUNDRY, INC.

By:   /s/
   ------------------------------

Title: Chief Executive Officer
1617 Sherman Avenue
Madison, WI 53704




NEW STOCKHOLDERS


   /s/
--------------------------


   /s/
--------------------------


   /s/
--------------------------





                                       5