Questions tagged [libx264]

C/C++ library that encode video streams into H.264/MPEG4 AVC format

It provides an C++ implementation for Linux, Windows and OSX to encode video streams in format.

libx264 official site is videolan and the source is available from the repository git://git.videolan.org/x264.git.

229 questions
234
votes
7 answers

FFMPEG (libx264) "height not divisible by 2"

I am trying to encode a .mp4 video from a set of frames using FFMPEG using the libx264 codec. This is the command I am running: /usr/local/bin/ffmpeg -r 24 -i frame_%05d.jpg -vcodec libx264 -y -an video.mp4 I sometimes get the following…
Andy Hin
  • 25,283
  • 37
  • 95
  • 135
72
votes
5 answers

webm to mp4 conversion using ffmpeg

When I try to convert a webm file to mp4 the output is very very choppy and it appears as if many frames have been dropped by ffmpeg I used the following commands to convert ffmpeg -i movie.webm movie.mp4 ffmpeg -i movie.webm -vcodec libx264…
Pavan K
  • 3,068
  • 5
  • 31
  • 62
21
votes
5 answers

How to encode h.264 with libavcodec/x264?

I am attempting to encode video using libavcodec/libavformat. Audio works great, but when I try to encode video I get the following errors: [libx264 @ 0x10182a000]broken ffmpeg default settings detected [libx264 @ 0x10182a000]use an encoding…
szatmary
  • 27,213
  • 7
  • 39
  • 54
15
votes
3 answers

broken ffmpeg default settings detected

I am getting broken ffmpeg error while VideoWrite using X264 Fourcc codec.I have install all the dependencies.How can I rectify this problem.The sample code that I have been using is as follows. VideoWriter oVideoWriter ("path.mp4",…
Ramakrishna
  • 656
  • 1
  • 10
  • 25
12
votes
4 answers

Encoding H.264 CBR videos with FFmpeg

I'm trying to encode a video with ffmpeg into H.264 (via the libx264 library) with a constant bit rate. I know, I know, VBR is often preferred, but for this specific job I'm required to use CBR (just as long as it's so many kilobytes per second; it…
Cornstalks
  • 121
  • 1
  • 1
  • 3
12
votes
1 answer

Why sliced thread affect so much on realtime encoding using ffmpeg x264?

I'm using ffmpeg libx264 to encode a 720p screen captured from x11 in realtime with a fps of 30. when I use -tune zerolatency paramenter, the average encode time per-frame can be as large as 12ms with profile baseline. After a study of the ffmpeg…
CurtisGuo
  • 309
  • 2
  • 8
11
votes
2 answers

Encoding for fastest decoding with ffmpeg

Encoding with ffmpeg and libx264, are there presets or flags that will optimize decoding speed? Right now it seems that videos transcoded with similar file sizes are decoded at very different speeds using Qtkit, and I was wondering whether there…
nbubis
  • 1,872
  • 4
  • 26
  • 40
10
votes
1 answer

streaming H.264 over RTP with libavformat

I've been trying over the past week to implement H.264 streaming over RTP, using x264 as an encoder and libavformat to pack and send the stream. Problem is, as far as I can tell it's not working correctly. Right now I'm just encoding random data…
Jacob Peddicord
  • 367
  • 2
  • 6
  • 15
6
votes
0 answers

FFmpeg - generate x264 CBR video transport stream with C-API

Using various posts sprinkled around the Internet, including this one here on SO, I've been able to understand how to use the FFmpeg cli to generate a CBR video bitrate using the x264 codec (wrapped in an MPEG-2 transport stream). Note: I'm…
ZeroDefect
  • 501
  • 5
  • 22
6
votes
1 answer

Live555: X264 Stream Live source based on "testOnDemandRTSPServer"

I am trying to create a rtsp Server that streams the OpenGL output of my program. I had a look at How to write a Live555 FramedSource to allow me to stream H.264 live, but I need the stream to be unicast. So I had a look at testOnDemandRTSPServer.…
user2660369
  • 245
  • 1
  • 4
  • 11
6
votes
2 answers

Creating a video from images using ffmpeg libav and libx264?

I am trying to create a video from images using the ffmpeg library. The images have a size of 1920x1080 and are supposed to be encoded with H.264 using a .mkv container. I have come across various problems, thinking I am getting closer to a…
marikaner
  • 176
  • 1
  • 1
  • 14
6
votes
1 answer

FPS too high when saving video in mp4 container

When I decode frames from avi file and then decode them in x264 and save to mp4 file, the fps of the output file is always 12,800. Therefore the file is played very fast. But, when I save the encoded in h264 frames in avi format and not mp4, so the…
theateist
  • 12,685
  • 16
  • 63
  • 101
5
votes
0 answers

Why is ffmpeg transcoding speed going down over time?

I'm executing basic ffmpeg command to transcode input MP4 video to output MP4 video (both using H264 as video codec, and stripping out audio, for simplicity): ffmpeg -i input-video.mp4 -b:v 20000k -an -vcodec libx264 output-video.mp4 Transcoding is…
Nikola R.
  • 51
  • 1
  • 3
5
votes
1 answer

libx264 encode error Input picture width (40) is greater than stride (0)

I used libx264 in ffmpeg to encode video, I used the configuration below. enCodecContext->bit_rate = 300000; enCodecContext->width = 80; enCodecContext->height = 60; enCodecContext->time_base = (AVRational) {1, 25}; enCodecContext->gop_size =…
alijandro
  • 9,944
  • 2
  • 45
  • 61
5
votes
0 answers

ffmpeg conversion x264 [error]: malloc of size 769152 failed

I am trying to convert video recorded from Android smart watch (.mp4 format) to a format (.mp4) which playable on all browsers. The video recorded from smart watch is not playing in the browsers. so, i've used ffmpeg to convert in into a playable…
prashanthp
  • 75
  • 1
  • 8
1
2 3
15 16