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.

241 questions
2
votes
1 answer

x264 / libx264 : Can only one I/P frame to be used as reference for B-frames?

As you know ref parameter can set the number of previous frames each P-frame can use as references. I need the same thing for B-Frames, but ref=1 does not work for B-Frames. I mean an I/P frame to be used as reference for B-frames only. is it…
Maria
  • 344
  • 8
  • 30
2
votes
1 answer

How to avoid color shift using FFmpeg libx264

I’d like to convert some footage to proxy H.264 using ffmpeg. I got a slight colorshift using the following command: ffmpeg -i /path/to/045_0054.MXF -map 0 -dn -c:v libx264 -preset slow -profile:v main -level:v 4.1 -coder 1 -pix_fmt yuv420p -crf 25…
florit
  • 325
  • 2
  • 13
2
votes
1 answer

What ffmpeg arguments will approximate Zoom recording quality

I've been recording screen sharing presentations using Quicktime on my Mac and it uses x264 format with ~60fps. The produced video file is with type MOV and around 2.2GB for 1 hour of presentation. I want to compress it using ffmpeg and I've been…
2
votes
1 answer

FFmpeg : Attach metadata to the segment muxer

I tried to attach metadata to the segment muxer using bitstream filter with no success, Please tell me how can do it?
Maria
  • 344
  • 8
  • 30
2
votes
2 answers

FFMPEG: Convert WebM VP8/VP9 multi-resolution video to MP4 (H.264)

I have been trying to convert a multi-resolution WebM video ( VP9/VP8/H.264 ) (1280 x 1080 till the half, thereafter 1080 x 1280) to MP4 container with H.264 encoding for video. When transcoded with FFMPEG is locking into the frame size it's…
thedeadalive
  • 35
  • 1
  • 6
2
votes
1 answer

muxing streamable segmented mp4 with libav

currently i have an application that is supposed to send fragmented mp4 data over a websocket to a client for it to be played there. i have a working implementation that pipes the raw frames to a spawned ffmpeg process and then reads fragmented mp4…
2
votes
1 answer

FFMPEG - Width/ Height Not Divisible by 2 (Scaling to Generate MBR Output)

I am trying to generate multilple variants of videos in my library (Mp4 formats) and have renditions planned ranging from 1080p to 240p and popular sizes in between. For that I am taking a video with a AxB resolution and then running through a code…
2
votes
0 answers

Ffmpeg libx264rgb and libx264 yuv444p gives very different results

I am trying to create a lossy compressed video from several .png files. I am using the following ffmpeg commdans: ffmpeg -i %8d.png -frames:v 4 -c:v libx264rgb -pix_fmt rgb24 -g 4 -qp 30 -r 25 out.mp4 and ffmpeg -i %8d.png -frames:v 4 -c:v libx264…
2
votes
0 answers

How to set the PTS field with the time the frame was actual captured (using FFmpeg)?

Using FFmpeg, I want to update the PTS field with the time the frame was actual captured. I'm doing it with the following FFmpeg command (the "copyts" flag does the job): ffmpeg -re -f v4l2 -copyts -i /dev/video0 -c:v libx264 -intra -f mpegts…
J.M.
  • 472
  • 1
  • 6
  • 15
2
votes
2 answers

ffmpeg conversion skips audio

While converting a video to mp4 format using ffmpeg the audio gets skipped because of which the audio goes out of sync with the Video. One can have a look at the following Video: https://vialogues.com/vialogues/play/486 I am using the following…
pg2286
  • 1,011
  • 12
  • 21
2
votes
1 answer

Why does my H.264 video have a green overlay after video filter is applied?

When executing the following code: ffmpeg -i input.mov -c:v libx264 -preset veryslow -pix_fmt yuv420p -filter_complex "drawtext=fontfile=font.ttf:fontcolor=white@1:fontsize=h/6:x=(w-text_w)/2:y=(h-text_h)/2:text='Henk de…
d1che
  • 23
  • 6
2
votes
1 answer

How to disable libx264 stderr output?

I'm writing a library that uses the ffmpeg library interface (libavcodec, libavformat, libavutil, etc.) to manipulate some video. Part of this involves some encoding for which I'm using libx264. Everything works great but libx264 writes output to…
Dave
  • 427
  • 4
  • 14
2
votes
1 answer

RTMP live stream directly from NVENC encoder

I am trying to create a live RTMP stream containing the animation generated with NVIDIA OptiX. The stream is to be received by nginx + rtmp module and broadcasted in MPEG-DASH format. Full chain up to dash.js player is working if the video is first…
rnd
  • 41
  • 8
2
votes
1 answer

ffpmeg drops last frame when compressing from MP4 to MP4 (libx264)

So, I'm using this code to compress my *mp4 file. I need to get lower quality and decrease bitrate: ffmpeg -i input.mp4 -c:v libx264 output.mp4 The problem is: the last frame of footage is dropped after ffmpeg compression. Screenshot is here:…
Usoboi
  • 23
  • 4
2
votes
1 answer

Conversion from mjpeg to mp4 (libx264) with FFmpeg

If you convert from mjpeg to mp4 (libx264) with FFmpeg, Playback can not be performed on Windows · Mac. Thumbnails are not displayed on the icon. However, with the HTML5 Video tag, playback is possible. Why? Please tell me if you understand. Thank…
salud
  • 103
  • 1
  • 1
  • 8