Re: [Libav-user] Helo in understanding PTS and DTS

2012-11-28 Thread Chandranath Bhattacharyya
>>outStream->codec->time_base = 1/25 and outStream->time_base = 1/12800. The >>1st one was set by me but I cannot figure out why and who set 12800? I >>noticed that before line (7) outStream->time_base = 1/9 and right after >>it it changes to 1/12800, why? I was testing on Windows and found

Re: [Libav-user] Helo in understanding PTS and DTS

2012-11-28 Thread hatred
Hi Igor, my comments below 2012/11/28 Morduhaev, Igor (ig...@stats.com) > I had fps issues when transcoding from avi to mp4(x264). Eventually the > problem was in PTS and DTS values, so lines 12-15 where added before > av_interleaved_write_frame function: > > > > 1. AVFormatContext* outContai

Re: [Libav-user] Why container and codec has different time base?

2012-11-28 Thread hatred
Hi Igor, As I known some formats require specific timebases (like MPEGTS streams) so, you can not manipulate with them. But you can manipulate with CodecContext and can set time base that you need. For example, if FPS equal to 25, you can set coder time base to 1/25 and simple increment PTS by 1 f

Re: [Libav-user] avcodec_decode_video2 strange behaviour on lost frame

2012-11-28 Thread Alex Cohn
On 28 Nov 2012 20:21, "serdel" wrote: > > I implemented a simple algorithm which kept track of previous frame and the > current one and checked if the sequence is correct. If it wasn't I didn't > put the frame to the avcodec_decode_video2 function and stayed that way > until next sequence has star

Re: [Libav-user] avcodec_decode_video2 strange behaviour on lost frame

2012-11-28 Thread serdel
I implemented a simple algorithm which kept track of previous frame and the current one and checked if the sequence is correct. If it wasn't I didn't put the frame to the avcodec_decode_video2 function and stayed that way until next sequence has started. It brought the desired results until one unl

[Libav-user] Frame Rate Oddities

2012-11-28 Thread Noah Zigas
Hi All, I'm new to FFmpeg programming and I'm having a strange issue with H264 file framerates. I'm simply trying to capture video from an NTSC camera using a Matrox capture card. I wrote a simple application to capture 10 seconds of video to an MP4 file. The program works, sort of. I get an M

[Libav-user] Why container and codec has different time base?

2012-11-28 Thread Morduhaev, Igor (ig...@stats.com)
I used ffmpeg to get video info. The output is Duration: 00:05:57.00, start: 0.00, bitrate: 611 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 808x610, 609 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc The time base is used to somehow(this is also my another question) cal

[Libav-user] Helo in understanding PTS and DTS

2012-11-28 Thread Morduhaev, Igor (ig...@stats.com)
I had fps issues when transcoding from avi to mp4(x264). Eventually the problem was in PTS and DTS values, so lines 12-15 where added before av_interleaved_write_frame function: 1. AVFormatContext* outContainer = NULL; 2. avformat_alloc_output_context2(&outContainer, NULL, "mp4", "c:\\test.m

Re: [Libav-user] avcodec_decode_video2 strange behaviour on lost frame

2012-11-28 Thread Alex Cohn
On Wed, Nov 28, 2012 at 2:27 PM, serdel wrote: > Hi, > > I am using ffmpeg to decode an rtps (live555) streaming. I decode each > frame separately in a standard sequence. The normal sequence is SPS and > PPS, then NAL_IDR_SLICE and finaly NAL_SLICE until next SPS&PPS. On normal > work, avcodec_de

Re: [Libav-user] YV12

2012-11-28 Thread Carl Eugen Hoyos
Mark Kenna writes: > Is there an inbuilt method of converting YV12 into > YUV420p using the scaler? The scaler does not support it but it may be sufficient to set the codec_tag correctly before decoding (difficult to say without more information about your use case). There is also a swapuv f

[Libav-user] YV12

2012-11-28 Thread Mark Kenna
Hi Guys Is there an inbuilt method of converting YV12 into YUV420p using the scaler? I understand the U/V components are swapped but if there's something built in I'd rather use that. Thanks, Mark. ___ Libav-user mailing list Libav-user@ffmpeg.org http:

[Libav-user] avcodec_decode_video2 strange behaviour on lost frame

2012-11-28 Thread serdel
Hi, I am using ffmpeg to decode an rtps (live555) streaming. I decode each frame separately in a standard sequence. The normal sequence is SPS and PPS, then NAL_IDR_SLICE and finaly NAL_SLICE until next SPS&PPS. On normal work, avcodec_decode_video2 returns positive value of bytes used and sets t

[Libav-user] Is a buffer required while streaming using ffmpeg code?

2012-11-28 Thread Navin
As per the ffmpeg tutorial code, for code like this:/ while(av_read_frame_proc(pFormatCtx, &packet) >= 0) { if (packet.stream_index == videoStream) { avcodec_decode_video2_proc(pCodecCtx, pFrame, &frameFinished, &packet);// Decode video frame if (frameFinished) {