请问标准的MPEG4流怎么封装成mp4格式的视频文件,用什么库之类

请教标准的MPEG4流如何封装成mp4格式的视频文件,用什么库之类
DM355压缩的mpeg4流,如何封装为mp4格式的视频文件,网上竟是怎么解析的,想问怎么封装,用什么库啊,如果使用FFmpeg,请问怎么用啊,需要转码吗

------解决方案--------------------
mpeg4ip或者FFMPEG
------解决方案--------------------
FFmpeg有个output_example.c,是个将yuv420的原始数据压缩成FFmpeg支持的文件格式(如mp4,avi等)的例子,你把yuv420压缩成mpeg4流的部分去掉,直接将mpeg4流写入目标文件即可
C/C++ code

/* encode the image */
        out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
//此处avcodec_encode_video就不调用了,将mpeg4流写入 video_outbuf指向的内存,out_size为该帧的大小
        /* if zero size, it means the image was buffered */
        if (out_size > 0) {
            AVPacket pkt;
            av_init_packet(&pkt);

            if (c->coded_frame->pts != AV_NOPTS_VALUE)
                pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
            if(c->coded_frame->key_frame)
                pkt.flags |= PKT_FLAG_KEY;
            pkt.stream_index= st->index;
            pkt.data= video_outbuf;
            pkt.size= out_size;

            /* write the compressed frame in the media file */
            ret = av_interleaved_write_frame(oc, &pkt);
        } else {
            ret = 0;
        }