FFmpeg-iOS icon indicating copy to clipboard operation
FFmpeg-iOS copied to clipboard

FFMpeg through FFmpegWrapper

Open VicenteFava opened this issue 9 years ago • 7 comments

I am using this library through this wrapper:

https://github.com/OpenWatch/FFmpegWrapper

However, I am getting the error:

[NULL @ 0x7fb59a012a00] Unable to find a suitable output format for '/Users/mytestuser/Library/Developer/CoreSimulator/Devices/E0F92C98-411C-4CEA-8FC9-CE8E33F0A222/data/Containers/Data/Application/069294B7-7D45-4760-B3B2-030649DDFE1A/Documents/video' 2015-08-17 17:30:34.400 TestProject[9671:309324] codec not found: h264

What can I do to fix the issue? Remember that I installed it all through cocoapods.

VicenteFava avatar Aug 17 '15 20:08 VicenteFava

Same issue here

toptierlabs avatar Aug 17 '15 22:08 toptierlabs

That's actually not an error. You should only use the H.264 hardware encoder via VideoToolbox.framework.

On Mon, Aug 17, 2015 at 3:41 PM, toptierlabs [email protected] wrote:

Same issue here

— Reply to this email directly or view it on GitHub https://github.com/chrisballinger/FFmpeg-iOS/issues/6#issuecomment-131984467 .

chrisballinger avatar Aug 18 '15 02:08 chrisballinger

@chrisballinger How do I do that? I compiled ffmpeg with h264 codec. What should I change?

VicenteFava avatar Aug 18 '15 14:08 VicenteFava

@chrisballinger @VicenteFava I was having the same problem and i made the following change to FFOutputStream:

AVCodec *codec = avcodec_find_encoder_by_name([outputCodec UTF8String]); For: AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_H264);

Now that message is gone, and the codec is properly assigned, but I'm getting the following error when writing a packet into the file at this line:

int writeFrameValue = av_interleaved_write_frame(self.formatContext, packet);

Encoder did not produce proper pts, making some up.

Any ideas?

demianardus avatar Aug 18 '15 14:08 demianardus

I don't think that is the problem, the problem that I'm having with av_interleaved_write_frame is an arithmetic issue.

In that line I have the following error

EXC_ARITHMETIC(code=EXC_1386_DIV, subcode=0x0)

I think it's because is trying to do a division by zero

VicenteFava avatar Aug 18 '15 18:08 VicenteFava

+1

zman0225 avatar Aug 30 '15 02:08 zman0225

I've also built it with H264 and having the same 'cannot find codec' issue.

fzakaria avatar Oct 19 '15 07:10 fzakaria