Gonzalo Garramuño | 17 May 2013 18:09
Picon

iZeranoe latest build and glut

I am getting a strange behavior in the latest zeranoe builds of ffmpeg 
when I link them to my program.  The program fails to start and 
complains about avcodec not knowing glutStrokeCharacter.  I used 
dependency walker and indeed there are failed entries for glut.  I am 
currently linking against freeglut.  ffmpeg and ffplay don't have a 
problem.  Using the previous zeranoe build does not show the problem, 
but it uses avcodec-54 and I would like to link against the latest.  My 
guess is something is wrong with the makefile but cannot figure what.
Can someone suggest what could be the cause of the problem and something 
to try?
Thanks in advance.
Pradeep Karosiya | 17 May 2013 10:25
Picon

Audio encoding using avcodec_fill_audio_frame() and memory leaks

Hi,

As a part of encoding decoded audio packets, I'm using
avcodec_fill_audio_frame(). I'm passing allocated AVFrame pointer to along
with buffer containing the decoded samples and other parameters number of
channels, sample format, buffer size. Though the encoding is working fine
I'm not able to completely eliminate the memory leaks. I've taken care of
most of things but still I'm not able detect the leakage.
Below is the function which I'm using for encoding. Please suggest
something.
AudioSample contains decoded data and it is completely managed in different
class(free in class destructor). I'm freeing the AVFrame in FFmpegEncoder
destructor and AVPacket is freed every time using av_free_packet() with
av_packet_destruct enabled. What more do I need to free?

void FfmpegEncoder::WriteAudioSample(AudioSample *audS)
{

    int num_audio_frame = 0;
    AVCodecContext *c = NULL;
   // AVFrame *frame;
    AVPacket pkt;

    av_init_packet(&pkt);
    pkt.destruct = av_destruct_packet;
    pkt.data = NULL;
    pkt.size = 0;
    int ret = 0, got_packet = 0;
    c = m_out_aud_strm->codec;
     static int64_t aud_pts_in = -1;
(Continue reading)

Denis | 16 May 2013 21:46
Picon

FFmpeg, raspberry

Do the FFmpeg libraries support the raspberry h264 hardware encoding?
Have you got any example on how I can use it for encoding?

--

-- 
www.denisgottardello.it
Skype: mrdebug
Videosurveillance and home automation! 
http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php
YIRAN LI | 16 May 2013 09:31
Picon

How to disable zlib include

Hi,

Several days ago I succeeded in building ffmpeg with zlib support, I think I just got zlib code, made and installed, then ffmpeg build automatically included it.

But today I tried to disable zlib support, but couldn't do it. I uninstalled header files and libs. and I can see the configure result is "zlib enable no, bzlib enabled yes'

But why, after I opened generated ffmpeg with dependency walker and found that AVCODEC-54.DLL still needs ZLIB1.DLL

Could anyone tell me how to do? Because zlib support is auto detected, is there anyway to explicitly disable that?

Great thanks!


_______________________________________________
Libav-user mailing list
Libav-user@...
http://ffmpeg.org/mailman/listinfo/libav-user
Xian Yan Yang | 16 May 2013 05:10
Picon

Does anyone know how to generate quicktime compatiable H264 video by ffmpeg?

I've generated H264 video stream from my camera, but the video can't play in quicktime, only works in VLC. 

Does anyone face same problem as me?

Thanks
Br.Luffy
_______________________________________________
Libav-user mailing list
Libav-user@...
http://ffmpeg.org/mailman/listinfo/libav-user
dboyaoao | 15 May 2013 03:48
Picon

how can I play h264 file??????????

HI:
   when I use av_read_frame ,I save the video file in the local,but why I
can't play the h264 file use vlc?anybody can help?

--
View this message in context: http://libav-users.943685.n4.nabble.com/how-can-I-play-h264-file-tp4657588.html
Sent from the libav-users mailing list archive at Nabble.com.
袁袁斌 | 15 May 2013 20:56
Picon

avformat_open_input() error!

Hello,
  I am trying to use ffmpeg to demux video (with VS 2010, Win7).
  When calling avformat_open_input() to open the input file, it always returns -1094995529.  the codes are blow:

Init(const char *strFileName)
{
    //some other codes

  AVFormatContext* m_pFormatCtx = NULL;
  //I also tried this :   
  //m_pFormatCtx = avformat_alloc_context();

  // Initialize libavcodec, and register all codecs and formats
  av_register_all();

res = avformat_open_input(&m_pFormatCtx, strFileName, NULL, NULL);
if(res) {
printf("FFMPEG: Could not open input container\n");
return ERR_UNKNOWN;
}

      //...some other codes
}
Is there anything wrong?
Many thanks!!!

_______________________________________________
Libav-user mailing list
Libav-user@...
http://ffmpeg.org/mailman/listinfo/libav-user
iwastemoretimethanu | 15 May 2013 21:51
Picon

Audio playing to fast using fflplay

I'm not sure if anyone else has ran into this but the audio is playing much
faster than the video. Here is a little breakdown. Any help would be great,
THANKS! 

_Here is what I know_: 

 * I know the sound being grabbed is correct because I made a playback 
   test function. 
 * I know the sound is being encoded into the video file because I can 
   hear the sound when played in ffplay or any other player. 

_Here is the problem_: 

 * When the output video is played, the video starts off at the correct 
   speed, but the audio is playing far too quickly. 
     o For reference, my test output is supposed to be 20 seconds. With 
       my current settings, this is 100 video frames and 100 audio 
       frames at 5 FPS. 
     o All 20 seconds of audio play in the first 5 seconds of the 
       video, which shouldn't be happening simply because the audio and 
       video are being encoded side-by-side (write_audio_frame() is 
       being called directly after write_video_frame()). 
*I also attempted to use atempo

_Here is what I have tried_: 

 * Changing pts values before the encode, after the encode, using the 
   native av_rescale_q() function to try and automatically set the pts 
   value. 
     o  I have done quite a bit of research on this and it seems to be 
       the consensus that pts is supposed to be set before the frame is 
       encoded into the packet, and I have a formula that should work 
       for both the audio and video pts: 
         + frame_count * (1000/STREAM_FRAME_RATE) * 90 
         + ^ frame scale              ^ getting ms                     
               ^ pts is apparently supposed to be time * 90 
 * Reducing the frames per second to a safe value (well-below the 
   potential of the system) 
 * Switching between the av_interleaved_write_frame() and the manual 
   av_write_frame() 

_Here is what I think the problem could be_: 

 * I've always thought it could be the pts/dts that are off, as those 
   are what are supposed to be controlling the speed/when the sound is 
   played...but considering how many different ways I've modified these 
   and tried things that I think should have worked with my 
   understanding of them and how little any of my trials have mattered 
   in the output file, I'm beginning to think the possibility of this 
   being the problem is getting slimmer and slimmer. 

_Technical details about the audio data (just in case)_: 

 * Using SFML (Built off of OpenAL) to grab the data 
 * Developing on Windows, audio data is being grabbed from the muxer 
   with the microphone disabled. 
 * The sound data is PCM, 16 bit (stored as int16_t*) 
 * I started off using an algorithm that interlaced the audio with the 
   video manually by using a method of 
     o if audio->pts < video->pts, write another audio frame 
     o else write video frame 
 * I now just encode an audio frame after every video frame because it 
   /should /sync itself, considering the audio is being grabbed while 
   the video is being encoded 
 * I have access to the raw buffered audio data (int16_t*), the sample 
   rate (uint), the channel count (uint), and the sample count (size_t).

--
View this message in context: http://libav-users.943685.n4.nabble.com/Audio-playing-to-fast-using-fflplay-tp4657609.html
Sent from the libav-users mailing list archive at Nabble.com.
Mohan Reddy | 15 May 2013 12:36
Picon

to change the encoding bitrate inbetween encoding

Dear All,

     Am using ffmpeg libavcodec for encoding h264 streams using lib x264 on win32.
 
Can some one help me how to acheive the below.
 
1. Need to change the encoding bitrate inbetween encoding.
say initiallly set it to 300kbps and later inbetween encoding wanted to
chaneg the bitrate
to 100kbps.
 
2>. How to use use x264_encoder_intra_refresh(). Say want to do intra refresh between encoding.
 
Thanks,
Mohan

_______________________________________________
Libav-user mailing list
Libav-user@...
http://ffmpeg.org/mailman/listinfo/libav-user
Joe Flowers | 15 May 2013 17:19
Favicon

Using the libav* libraries in a thread-safe manner?

Hello Everyone,

I need to use the libav* APIs (specifically the audio codecs) in a thread-safe way, but they seem to be full of malloc()s and free()s which aren't re-entrant.

Does anyone know how to make (enable) the libav* APIs to be thread-safe?
I can't use the command-line utilities provided. I need to make API calls within my C coding.

Are there flags or initialization and de-allocation procedures I need to follow in my C code that calls the APIs?

Thanks!

Joe
-------------

_______________________________________________
Libav-user mailing list
Libav-user@...
http://ffmpeg.org/mailman/listinfo/libav-user
Xian Yan Yang | 15 May 2013 12:47
Picon

quicktime doesn't play my mpeg4 video stream which encoded by libav

Hi all:

I've been stucked with this problem for quite a long time, and finally I decide to ask for help here.

I encode my camera video to MPEG4 ES stream with libav. I could use VLC to play the video, but it doesn't work for quicktime or realplayer.

There must be something wrong with my encoding code. see below:

avcodec_register_all();
AVCodec *codec = NULL;
codec = avcodec_find_encoder(CODEC_ID_MPEG4);
if (!codec) 
{
return false;
}
c = avcodec_alloc_context3(codec);
if (NULL == c)
{
return false;
}
AVDictionary *d = NULL;

c->codec_id = CODEC_ID_MPEG4;
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->width = dwDstWidth;
c->height = dwDstHeight;
AVRational atemp = {1,dwFps__};
c->time_base = atemp;
c->gop_size = 10;
c->max_b_frames=1;

c->pix_fmt = PIX_FMT_YUV420P;
c->bit_rate = 400000;
c->level = 1;//profile-level-id
if (avcodec_open2(c, codec,&d) < 0) 
{
avcodec_close(c);
av_free(c);
c = NULL;
return false;
}
av_dict_free(&d);
picture= avcodec_alloc_frame();
...
----------------------------------------------------------------------------------
I wonder if my set of parameraters for encoding mpeg4 video is right? Or some special parameters are needed for quicktime?

Thanks
Br.Luffy


_______________________________________________
Libav-user mailing list
Libav-user@...
http://ffmpeg.org/mailman/listinfo/libav-user

Gmane