[MPlayer-users] interrupted encoding with slow network feed

jeff han bhan11 at gmail.com
Wed Apr 11 06:39:19 CEST 2007


the problem with the following cmd:

mencoder http://127.0.0.1:8900/tv.asf -msglevel network=9:open=9 -of mpeg
-oac mp3lame -ovc lavc -lavcopts vcodec=mpeg1video -o AD.mpeg

to transcode in real-time from ASF container to MPEG1, it will exit when the
network feed is not catch up,

change the recv flag from '0' to MSG_WAITALL works for me



places
stream/network.c:
around line 418

if( len<size ) {
        int ret;
        //ret = recv( fd, buffer+len, size-len, 0 );
        ret = recv( fd, buffer+len, size-len, MSG_WAITALL ); //it will wait
for the network
        if( ret<0 ) {
            mp_msg(MSGT_NETWORK,MSGL_ERR,"nop_streaming_read error :
%s\n",strerror(errno));
        }
        len += ret;
//printf("read %d bytes from network\n", len );
    }



More information about the MPlayer-users mailing list