Closed GoogleCodeExporter closed 8 years ago
Possibly some issue with your input file? Here is a source code that works for
me to retrieve track-id on an
existing mp4 file:
#include <stdio.h>
#include <mp4v2/mp4v2.h>
int main( int argc, char** argv )
{
if( argc != 2 ) {
printf( "usage: %s file.mp4\n", argv[0] );
return 1;
}
/* open file for modification */
MP4FileHandle file = MP4Modify( argv[1], MP4_DETAILS_ERROR, 0 );
if( file == MP4_INVALID_FILE_HANDLE ) {
printf( "MP4Modify failed\n" );
return 1;
}
/* fetch track id of first track */
MP4TrackId tid = MP4FindTrackId( file, 0, NULL, 0 );
if( tid == MP4_INVALID_TRACK_ID )
printf( "tid=%u (FAILED)\n", tid );
else
printf( "tid=%u (SUCCESS)\n", tid );
MP4Close( file );
return 0;
}
Original comment by Kona8l...@gmail.com
on 20 Jun 2009 at 4:01
[deleted comment]
Is your file already hinted? If not, why are you trying to get the hint track
reference id?
You are passing the track id of your audio track to a function that want the
track id of
an hint track.
If you don't need any hinting you can just pass MP4_INVALID_TRACK_ID as the
hint
track Id in MP4CopyTrack()
Original comment by damiog
on 20 Jun 2009 at 9:01
[deleted comment]
[deleted comment]
Well if you don't know what hinted means you can just ignore it. And all your
duration/time convention stuff is just weird. The edit list times must be in
the movie
timescale unit, not in the track one.
And wouldn't be easier to just copy the samples you need to the new file
instead of
using an edit list?
Original comment by damiog
on 20 Jun 2009 at 10:28
[deleted comment]
I'm going to close this issue because it's not an issue. Sorry but this is not
the place to seek tutorial styled help.
It's for bugs, RFEs and such. (This is not meant to sound disparaging).
Original comment by Kona8l...@gmail.com
on 20 Jun 2009 at 11:35
[deleted comment]
MP4CopyTrack() with applyEdits semantics to create a clip from a larger source
works for me. Again no issue
here. I know of no place that offers free tutorial help; in my opinion your
best bet is to find open-source
programs that use mp4v2 and see how they use edits to create a clip; I'm not
aware of any that do. Sorry.
Original comment by Kona8l...@gmail.com
on 21 Jun 2009 at 2:15
Original issue reported on code.google.com by
nibhadad...@gmail.com
on 19 Jun 2009 at 3:41