• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
preview image is not correctly showing the exact frame image after saving the QTMovie to a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

preview image is not correctly showing the exact frame image after saving the QTMovie to a file


  • Subject: preview image is not correctly showing the exact frame image after saving the QTMovie to a file
  • From: Muthulingam Ammaiappan <email@hidden>
  • Date: Thu, 18 Oct 2012 11:45:53 +0800

Hi Friends,

i found the strange behaviour while save the QTMovie to a file in a hard
drive..(example:Desktop)... it shows the different frame image than the
start time frame image as a preview in the desktop..... but if i open the
saved QTMovie in a "Quick Time Player" it shows the correct frame image at
the start time...

i suspect that it might be bug in cocoa ...

here is my code snippet for trim the original movie and save the trimmed
movie to a different file:



    QTMovie *newmovie;

    NSError *error = nil;



    newmovie = [[QTMovie alloc] initToWritableData:[NSMutableData data]
error:&error];



    [newmovie setAttribute:[NSNumber numberWithBool:YES] forKey:
QTMovieEditableAttribute];



    QTTime starttime = QTMakeTimeWithTimeInterval(videostarttime);

    QTTime duration = QTMakeTimeWithTimeInterval(currentclipduration);





    QTTimeRange range = QTMakeTimeRange(starttime, duration);

    [newmovie insertSegmentOfMovie:mvmovie timeRange:range atTime:QTZeroTime
];





    NSDictionary *dictionary = [NSDictionary

                            dictionaryWithObjects:

                            [NSArray arrayWithObjects:

                             [NSNumber numberWithBool:YES],

                             [NSNumber numberWithBool:YES],

                             [NSNumber numberWithLong:kQTFileTypeMP4],  //
TODO - allow to select the codec

                             nil]

                            forKeys:

                            [NSArray arrayWithObjects:

                             QTMovieFlatten, QTMovieExport,
QTMovieExportType, nil]];









    NSString *fileextn,*underscore,*combinedstring;



    clipcount++;









    NSString *intString = [NSString stringWithFormat:@"%d", clipcount];

    fileextn = @".MP4 ";

    underscore = @"_";

    intString = [intString stringByAppendingString:fileextn];





    combinedstring = [underscore stringByAppendingString:intString];



    NSString* filename ;



    filename = [curFileName stringValue].stringByDeletingPathExtension;



    filename = [filename stringByAppendingString:combinedstring];



    NSString *result = [[NSHomeDirectory() stringByAppendingPathComponent:
@"Desktop"] stringByAppendingPathComponent:filename];







    [newmovie writeToFile:result withAttributes:dictionary];


    [newmovie release];




can anyone please help me to fix this problem?....i dont know what i did
wrong... execpt the "preview frame image of the saved QTMovie file all are
working as per the expectation...


Thanks & Regards,

Muthu
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Associate icon with file ext. / quick look
  • Next by Date: Draw a nsview with nsbutton cell
  • Previous by thread: gesture recognizers and nil-targeted actions
  • Next by thread: Cross-fading between layers
  • Index(es):
    • Date
    • Thread