[MPlayer-dev-eng] [PATCH] fix mencoder creates bad avi files when recording h264 in ts container from DVB

vladisslav vladisslav vladisslav at inbox.ru
Thu Jun 11 18:56:03 CEST 2009


Hello all.

Mencoder writes wrong avi header (width=0,height=0) when converting h264 video with -vo copy from streaming container (for example mpeg-ts) to avi. Avi files are still playable with mplayer but not with some other players/editors (crashes avidemux).
Simple patch originally written by Larry Reznick, http://www.mailinglistarchive.com/mplayer-users@mplayerhq.hu/msg09732.html fixes this problem:

--- r29354/libmpdemux/video.c   2009-05-13 06:58:57.000000000 +0400
+++ r29354-my/libmpdemux/video.c        2009-06-11 20:30:44.000000000 +0400
@@ -235,6 +235,8 @@
      return 0;
    }
    h264_parse_sps(&picture, &(videobuffer[pos]), videobuf_len - pos);
+   sh_video->disp_w=picture.display_picture_width;
+   sh_video->disp_h=picture.display_picture_height;
    mp_msg(MSGT_DECVIDEO,MSGL_V,"Searching for picture parameter set... ");
    while(1){
       int i=sync_video_packet(d_video);




More information about the MPlayer-dev-eng mailing list