Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid track id - no matter what - while creating a clip #25

Closed
GoogleCodeExporter opened this issue Aug 19, 2015 · 10 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. MP4TrackId trackId = MP4FindTrackId(readfh1, 0, MP4_AUDIO_TRACK_TYPE, 0);
    (where readfh1 is valid  )

MP4ERROR: FindTrackId: Track index doesn't exist - track 1 type soun
MP4ERROR: FindTrackIndex: Track id 0 doesn't exist
Invalid hintId 

What is the expected output? What do you see instead?
expected - valid trackID 
runtime error - 

What version of the product are you using? On what operating system?


Please provide any additional information below.
I am trying to find a clip (from starting say 3 seconds from mp4 file for a 
duration of 100 s (say)). 
I have done proper typecasting, but am unable to resolve these runtime errors.

Pls suggest.

I am using library mp4v2 for making the clip.

--------errors -----------
Deleting already existing file - newClip 
MP4ERROR: FindTrackId: Track index doesn't exist - track 1 type soun
MP4ERROR: FindTrackIndex: Track id 0 doesn't exist
Invalid hintId converted to mp4timestamp = 4410000 
MP4ERROR: MP4File::FindIntegerProperty: no such property - 
moov.iods.audioProfileLevelId

Original issue reported on code.google.com by nibhadad...@gmail.com on 19 Jun 2009 at 3:41

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

[deleted comment]

1 similar comment
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant