- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to mux h264 frames into mpg4 frames using the Intel Media SDK. So going from h264 to mpg4.
However, going through mfxStreamParams and mfxTrackInfo makes me unsure of which values to use.
So, mfxStreamParams, are the parameters for the mpg4 stream I am outputting? Therefore:
SystemType - that would be MFX_MPEG4_SYSTEM_STREAM ?
Flags - I don't see anything more in the description than simply 'Stream flags.' Do I need to worry about this or is it for internal usage?
NumTracks & NumTracksAllocated - Only 1 since only using video correct? Why are these numbers different, wouldn't you always want to allocate as many tracks as you use?
And I guess mfxTrackInfo is the parameters for the h264 stream being input?
Type - MFX_TRACK_H264
SID - Random number or is this just for internal usage since eventually I may indeed want to have multiple streams going through this system?
Header - the h264 header has many components to it and at least from the looking around I've done, seems complicated. Is there any way to automatically get that out of the h264 packet given that I am generating it using the Media SDK?
AudioParam - Guessing I can just use StreamInfo.NumChannel = 0, fill in the mandatory fields too but it'll basically not worry about this one.
VideoParam - In case anyone else stumbles across this post looking for the same thing, check this out reagrding FrameRateExtD and FrameRateExtN - http://software.intel.com/en-us/forums/topic/311684
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthew,
If you want to mux to mp4 container use SystemType = MFX_MPEG4_SYSTEM_STREAM. You can leave Flags = 0.
NumTracks & NumTracksAllocated should be set to 1 if you only want to mux a single video track into the container.
Type should be MFX_TRACK_H264 unless you want to mux MPEG2 stream whihc is also supported for mp4 containers.
SID is a unique identifier for the track. You can set this to whatever you want. 0 is also fine.
Header : For muxing you do not have to set the header. The stream header will be parsed automatically during initialization.
AudioParam : Set o NULL since you're not muxing an audio track.
VideoParam : Just use the video parameter structure used by the encoder.
Regards,
Petter
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthew,
If you want to mux to mp4 container use SystemType = MFX_MPEG4_SYSTEM_STREAM. You can leave Flags = 0.
NumTracks & NumTracksAllocated should be set to 1 if you only want to mux a single video track into the container.
Type should be MFX_TRACK_H264 unless you want to mux MPEG2 stream whihc is also supported for mp4 containers.
SID is a unique identifier for the track. You can set this to whatever you want. 0 is also fine.
Header : For muxing you do not have to set the header. The stream header will be parsed automatically during initialization.
AudioParam : Set o NULL since you're not muxing an audio track.
VideoParam : Just use the video parameter structure used by the encoder.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Petter!
The header had be most worried, so I'm glad to hear I don't have to deal with that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually still have a question regarding this one, what would you use for FrameRateExtN and FrameRateExtD?
I see that FrameRateExtN/FrameRateExtD is the ratio for determining the frame rate but is the only thing important what that ratio is? Or do the actual numbers matter?
Here I see they are using FrameRateExtN = 27000000 and FrameRateExtD = 1080000 : http://software.intel.com/en-us/forums/topic/314483 Would using 25 and 1 be equivalent to say 25,000 to 1,000?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthew,
The Numerator and Denominator frame rate components are used to be able to represent non Integer rate settings, such as 29.97 (=30000/1001).
If you want 30 fps, just set the values to 30 and 1.
Regards,
Petter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page