У ср, 2009-07-29 у 07:40 +0800, Woods пише:
> Dear experts,
> 
> I am trying to get video elementary stream from a MP4 file, using ffmpeg
> lib.
> 
> What I did is
> (1) find correct id of video stream from MP4 file.
> (2) using av_read_frame() to get a AVPacket with this specific stream-id,
> and dump all found packets' packet->data into a file.
> 
> I expect this is the video elementary stream, and name the file as
> video.m4v.
> But the problem is the VLC player cannot recognize the file. It seems what I
> get is not the elementary stream.
> 
> Please correct me if my understanding is wrong. I appreciate your
> suggestions!
> 

File's extension always was just a hint bout files content, but if you
gave this extension by yourself to file with unknown format that it's a
bad hint and doesn't mean anything. Renaming than file to txt wouldn't
convert it to movie script.

Basically file with video and audio streams contents not only this
streams, but also a special information about it contents. All that you
did is just separating raw video stream h264/xvid/dxiv or whatever it
was from information the information that was describing it. That's why
vlc can't open it - it can't guess format. To be able to reproduce this
video you should mux it to some container format. Try to look into
ffmpeg.c to figure out how to do this.

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to