Hi all,
I am working on i.MX53 platform on linux 2.6.35. It captures the camera feed and encodes to H.264 file format. I used mxc_vpu_test as a reference project. The problem is it doesn't play in VLC player or other than the movie player of ubuntu.
When I checked the video created by mxc_vpu_test.out, It is also having same problem. I think, this some encoder header issue.
Has anybody faced same issue & how to fix it?
the command for mxc_vpu_test is,
./mxc_vpu_test -E "-o Out.mp4 -f 2 -c 300 -w 640 -h 480"
Regards,
Nandkishor.
Nandkishor
This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.
Thanks,
Yixing
Nandkishor
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
Hi Kirill,
The encoded video file should play in common video players. This is the primary requirement, I can't suggest user to use some specific player.
For this you should add video frames in container, e.g. avi.
>
>
Guess the header is not stored. Using vpu_EncGiveCommand(handle, ENC_PUT_AVC_HEADER, &hdr_sps) api with appropriate parameters will provide the headers. Write the header to the file before writing the encoded data.Sample code may be fetching the header already - try to use it.
Hi Prasanna,
vpu_EncGiveCommand is already used as below,
enchdr_param.headerType = SPS_RBSP;
vpu_EncGiveCommand(handle, ENC_PUT_AVC_HEADER, &enchdr_param);
vbuf = (virt_bsbuf + enchdr_param.buf - phy_bsbuf);
ret = vpu_write(enc->cmdl, (void *)vbuf, enchdr_param.size);
enchdr_param.headerType = PPS_RBSP;
vpu_EncGiveCommand(handle, ENC_PUT_AVC_HEADER, &enchdr_param);
vbuf = (virt_bsbuf + enchdr_param.buf - phy_bsbuf);
ret = vpu_write(enc->cmdl, (void *)vbuf, enchdr_param.size);
I have attached the screen-shot of video file in hex editor. (mxc_vpu_test.png) and the video file created using G-streamer (g-streamer.png),
Regards,
Nandkishor.
Looks like the header is present in the vpu encoded file. There must be some other problem. Please try playing in mplayer or ffplay.
Hi Prasanna,
As I mentioned earlier the video plays in movie player in ubuntu 12.04. But not in other players like VLC player.
The video file recorded using g-streamer plays in all video player.
Did you see the attached screen shot of both video files in hex editor. g-streamer video file has more informations.
Can you point out what information is missing in other video file (mxc_vpu_test.png) & how can I generate it?
Regards,
Nandkishor.