Flag AVFMT_FLAG_IGNIDX might help. 
We're using it with one of the latest libav (similar to ffmpeg) builds.
I don't 
know if the flag works with ffmpeg.

In our case we are having fragmented video files, which do not contain any hint 
data at all. 
This makes the av_open_input_file (or avformat_open_input as it called now) a 
lenghty procedure as well. 


But watchout: Fast load can lead to a (first time) slow seek. 
Based on my experience, an index is required for 
seeking. 
The first time you wish to seek, the library creates an index.

Beni

-- code --

   if( mIsFastload )
   {

      mFormatContext = avformat_alloc_context();
      mFormatContext->flags |= AVFMT_FLAG_IGNIDX;
   }

   
avformat_open_input( &mFormatContext, mFilePath.toStdString().c_str(), NULL, 
NULL )

----Ursprüngliche Nachricht----

Von: [email protected]
Datum: 03.05.2012 11:22
An: <[email protected]>
Betreff: [Libav-user] 
av_open_input_file takes a while


Hi

I'm using the method avformat_open_input to load a ~2GB h264 encoded video file.


int err = avformat_open_input(&m_formatContext, path, NULL, NULL);

This takes a bit too long however, is there any 
way to make it faster?

-mika                                     
_______________________________________________
Libav-user mailing list
Libav-
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user



_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to