Questions tagged [ffmpeg]

FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files.

Filter by
Sorted by
Tagged with
3
votes
2answers
6k views

ffmpeg Cut a media preserving all streams but also all metadata, timecodes and everything else

Today I wanted to obtain a ts file cut preserving everything, so I tried with this command: ffmpeg -i "original.ts" -map 0 -c copy -t 00:30:0.0 -threads 1 "cutted.ts" The resulting file have ...
3
votes
1answer
1k views

FFmpeg script to clean up and compress iPhone video recordings from university lectures

I video record my university lectures using an iPhone 6 and then export them to OS X. The files can often become up to 4 GB/hour in size. I'm looking to create or use a pre-existing solution that can ...
3
votes
1answer
3k views

ffmpeg reducing 60fps to 30fps, but file size is larger

I just did: ffmpeg -i inputfile -r 30 -vcodec libx264 -an -s hd480 output_30.mp4 and ffmpeg -i inputfile -vcodec libx264 -an -s hd480 output_60.mp4 on a 60fps file. Why is the second file 27 MB ...
3
votes
1answer
1k views

Crossfading audio at beginning and ending of video

The html5 video tag has a loop attribute. When playing a video in a continuous loop, it doesn't do this seamlessly. I hear cracks and pops at the beginning. With ffmpeg I am able to trim .05 seconds ...
3
votes
2answers
142 views

Why is this ffmpeg command outputting such long clips?

I am trying edit out a two minute clip from a long movie. This is the command I'm using: ffmpeg -ss 01:05:16 -t 120 -i input.avi -vcodec copy -an clips/output.avi I thought that 120 would be in ...
3
votes
1answer
135 views

How do I prevent Quality loss in the beginning of a video?

My company transcodes videos sent in by users (recorder by our own screenrecording software) I use FFMpeg to do the work using this command: /ffmpeg/ffmpeg -i in.mov -vcodec libx264 -fpre /ffmpeg/...
3
votes
2answers
844 views

Why I can't check the bit rate on some videos?

I've downloaded a video from YouTube, well I've downloaded the video stream and the audio stream of a YouTube video separately. Then with this ffmpeg command ffmpeg -protocol_whitelist "file,http,...
3
votes
1answer
1k views

FFmpeg: Cutting 3 seconds at the beginning of a video leaves 5 seconds blank

I have an MKV video, and want to cut the first 3 seconds. I tried with FFmpeg: ffmpeg -i /input.mkv -ss 00:00:3.0 -c copy -t 00:09:58.0 output.mkv But the result (when played in VLC) is that there ...
3
votes
1answer
443 views

ffmpeg tile command: ordering frames top to bottom rather than left to right

By default, the tile command builds the output one row at a time, from left to right. I would like instead for my output to be built in columns, top to bottom. That is, for a 4x4 tiling, the tile ...
3
votes
2answers
330 views

Convert FFMPEG Waveform Back to audio

I'm trying to convert an audio file to an FFMPEG waveform, train it in HyperGAN, and produce an image file to convert to an audio file. What I'm asking is if there is a way to convert a waveform image ...
3
votes
1answer
1k views

Screen cast and capture video cam and show both on screen using ffmpeg

I'm using the following command to capture my screen cast and laptop video camera at the same time. Video from the camera appears in a smallish window in bottom right of the screen cast. This works, ...
3
votes
1answer
1k views

Crop a video with a moving crop area of fixed size

I have 3840 × 2160 videos where I want to cut out a moving person on stage (e.g. music video). The crop area is fixed (1080 x 1920). The problem is, the person is moving around. Not much, but in a ...
3
votes
1answer
2k views

ffmpeg repackaging AVI (h264) into mp4 gives choppy playback in html5 video on chromium

I have file.avi which contains a h264 video: $ ffmpeg -i file.AVI Input #0, avi, from 'file.AVI': Duration: 00:00:20.61, start: 0.000000, bitrate: 1530 kb/s Stream #0:0: Video: h264 (Main) (...
3
votes
1answer
482 views

FFmpeg cuts video?

I'm trying to add an image to the start of a video. I don't want it to overwrite the video, I asked about it and got this answer: ffmpeg -r 30 -loop 1 -t 3 -i image.jpg -i inputvideo.mxf -f lavfi -t ...
3
votes
2answers
1k views

FFMpeg crop filter doesn't change orientation

I am trying to crop a portrait video of 1280x720 to 568x320 so that the video will be displayed in landscape view (16:9). I am using the following command ffmpeg -i VID_1438833296.mp4 -vf crop=568:...
3
votes
2answers
4k views

remove black frames from vob files with ffmpeg

I have a few .vob files with "black frames" (it seems that an issue during the acquisition from VHS did that). I can get where these black frames occur with the command ffmpeg -i source.vob -vf ...
3
votes
1answer
343 views

FFmpeg Single Input, Seek to Multiple Outputs

I'm trying to get multiple snapshots of a single input file using Input Seeking. I want to seek to different keyframes and save each to different output images. I can use this using multiple calls: ...
3
votes
0answers
6k views

moov atom not found

I downloaded this video using youtube-dl's HLS downloader. The video was being HLS streamed using AES-128. Even though I could view it perfectly fine when it was being streamed in the browser, VLC ...
3
votes
0answers
3k views

Nginx RTMP didn't accept HEVC h265 input format

I'm trying to created live event broadcast on my VPS server , to make the audience able watch my broadcast I use Nginx RTMP that's produce link at this format http://192.168.1.5:8080/hls/live.m3u8 ...
3
votes
0answers
2k views

How to use ffmpeg to send video stream to another server that gives exactly same quality as manually copying the file to that server?

I tried doing this ffmpeg -i tcp://192.168.1.41:5000?listen -c copy out.avi and have another client publish to this server using ffmpeg -i 1.avi -map 0 -c copy -f mjpeg tcp://192.168.1.41:5000 ...
3
votes
0answers
1k views

Recording for Youtube: ffmpeg Thread message queue blocked

I was recording screencasts on Ubuntu 16.04 for youtube with my plantronics headset C520-M which worked just nice. I was using ffmpeg successfully. Now I wanted to add some "live" video explaining ...
3
votes
1answer
2k views

Extract multiples images from multiples videos with ffmpeg

I have a MP4 movie filmed with a GoPRO. The GoPRO split the movie in several files (I believe because of FAT32 size limitation). What I'm trying to do is extract some specific frames of the FULL ...
3
votes
1answer
15k views

Howto Repaire or fix the duration of a mp4 video

I'm having a film that's ffmpeg and other progs claims to be 07:03:52 long, but the real playtime is actually more like 2:35:00 ffprobe video.mp4 ffprobe version 3.0.2 Copyright (c) 2007-2016 the ...
3
votes
0answers
3k views

Desktop grabbing with FFmpeg at 60 fps using NVENC codec

I'm having trouble recording my desktop at 60FPS using the latest Windows compiled FFmpeg with NVENC codec. Metadata says the file is 60 fps but when I play it, I can see clearly see it is not 60FPS. ...
3
votes
0answers
1k views

FFMpeg encode with original codec

I know about the -c copy switch with ffmpeg, but this does not work with filters as it means "don't re-encode". But what I want is to have my output use the same stream formats as my input. So if I ...
3
votes
0answers
1k views

Overlay animated watermark multiple times

So, I have this animated watermark (MOV w/alpha) that I want to overlay on top of a video. I want to do it multiple times, so once in the beginning, once in the middle and finally towards the end. I'd ...
3
votes
0answers
348 views

Is there a way? multiple images to looping video via ffmpeg?

I want to use ffmpeg to create a 15 second looping video from images for posting to instagram. For instance: Camera takes 3 pictures Each image plays for 2 frames (3 images = 6 frames) After 6 ...
2
votes
3answers
3k views

Is it meaningful to raise frame rate, if so what is the best option?

I have a 3000 by 3000 VR video encoded in H264, the frame rate is 30fps. Now I want to raise the frame rate to 60fps, I am using this command ffmpeg -i input.mp4 -r 60 output.mp4 My questions are: ...
2
votes
3answers
1k views

What's the difference between “visually lossless” and real lossless and what does this mean for future encodes?

In FFmpeg's H.264 Video Encoding Guide we are told: Tip: If you're looking for an output that is roughly "visually lossless" but not technically lossless, use a -crf value of around 17 or 18 (you'...
2
votes
1answer
5k views

How to identify i-frame from idr-frame in the ffprobe show frames output?

The ffprobe show frames output shows the following details: [FRAME] media_type=video key_frame=1 pkt_pts=42 pkt_pts_time=0:00:00.042000 pkt_dts=42 pkt_dts_time=0:00:00.042000 pkt_duration=N/A ...
2
votes
2answers
1k views

Error converting mp4 to matroska format

I'm using ffmpeg version 2.8.11 to convert an AVC/AAC video to HEVC/AAC: with the command ffmpeg -loglevel error -i input.mp4 -c:a copy -c:v libx265 -preset fast -x265-params crf=25 -vf scale=-8:ih ...
2
votes
2answers
11k views

How to change output filename in ffmpeg batch?

I'm using windows and ffmpeg to convert video mp4 into audio mp3. I've come up with the following batch line that will do the job: for %f in (*.mp4); do ffmpeg -i %f -vn -ar 44100 -ac 1 -b:a 32k -f ...
2
votes
2answers
8k views

How to resolve ffmpeg error cannot load default config file?

I have got this error message when using ffmpeg [Parsed_drawtext_0 @ 03bdc300] Could not load font "/Library/Fonts/DroidSansMono.ttf": cannot open resource Fontconfig error: Cannot load default ...
2
votes
2answers
6k views

Lossless conversion of yuv420p10le to yuv420p

I have an mp4 movie, containing an h264 video stream (pixel format yuv420p10le), and an AAC audio stream. My favorite player cannot read the yuv420p10le pixel format. I was wondering if it is ...
2
votes
1answer
2k views

FFmpeg encode variable input framerate

I have a Qt application running, i hijack the openGL frameBuffer when a new frame has been rendered. A new frame is drawned when only some changes appear in the scene, so no constant frameRate. Now i ...
2
votes
1answer
3k views

ffmpeg: crop then scale does not work

I want to crop black border, then scale to video to 1280x720, however, the following command does not work,crop works well, but scale has no effect: ffmpeg -i input.mp4 -filter_complex '[0:v]crop=...
2
votes
1answer
888 views

How to batch covert a folder of mp4 files to avi?

I'm trying to batch convert a folder of MP4 files to AVI using this script: for f in *.mp4; do ffmpeg -i "$f" -q:v 6 "encoded/${f%.*}.avi”; done (This is based an earlier question that was helpfully ...
2
votes
1answer
2k views

Error while trying to set ffmpeg profile

Ok, I have a feeling this might be a silly question, but I can't see what I am doing wrong. This is my command: ffmpeg -i input.mov -c:v libx264 -profile:v baseline output.mp4 and the error it ...
2
votes
1answer
523 views

extract parts of images from a video and save it to a file

I have a video of 2000 x 200 pixels in resolution I need to grab two parts inside that video (cut into the image, not trimming). I need to grab a piece of 500 x 200 pixels from coordinates (0,0) and ...
2
votes
2answers
13k views

Infinite Video Loop in Ffmpeg?

Is there a way to infinitely loop a video in ffmpeg for a livestream? I've been looking around and can see it was possible to use "loop 1" but it appears that is no longer working. This is what I'm ...
2
votes
1answer
14k views

Convert variable input formats to black and white MP4

I am currently using an FFMPEG command like: ffmpeg -i input.mov -vf scale=1920:1080 output.mp4 to convert varying input format file to a fixed resolution MP4 output file. One final step I need is ...
2
votes
1answer
3k views

Can I run this in one command line (ffmpeg)

I used this command ffmpeg -i thevideo.mp4 -c:a copy -vf 'drawbox= : x=0 : y=0 : color=invert:enable=between(t\,11\,39)' output.mp4 but it runs very slow. So, I took another approach, I copy first ...
2
votes
2answers
2k views

YouTube 3gp encoding settings

I'm building a new media site and I'm taking cues from YouTube for which video file formats I should offer for widespread usability among mobile and desktop clients. I'm doing all transcoding using ...
2
votes
3answers
3k views

FFmpeg MP4 to FLV too slow

I am converting .mp4 files to .flv using ffmpeg in centos. But the conversion time is extremely too slow! It takes about 1.5 hours to convert 500MB .mp4 file into .flv. I am using a linux vps with 2 ...
2
votes
2answers
3k views

Change default audio track of Video file using ffmpeg [duplicate]

I have a video file with extension .mkv. It contains 2 Audio Tracks. English Hindi English Audio track is the default Audio track. I am trying to set the default Audio track to Hindi because when I ...
2
votes
1answer
1k views

FFmpeg read, ignoring remaining -vf options: Use ',' to separate filters

Getting error "read, ignoring remaining -vf options: Use ',' to separate filters" My code: ffmpeg -i "/root/nisar/a.mp4" \ -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:1 \ -c:v:0 libx264 -b:...
2
votes
1answer
3k views

Live Streaming IP Camera Stream to Youtube Using ffmpeg

My Objective : To Transcode mjpeg stream from ip camera to youtube using ffmpeg My Command : ffmpeg -re -f mjpeg -i "http://192.168.0.101" -c copy -movflags +faststart -vcodec libx264 -f flv "rtmp:...
2
votes
1answer
2k views

Add multiple mp3 files to an mp4 file with ffmpeg

I would like to add multiple mp3 files to an mp4 file. For adding a single mp3 to an mp4, I used this command with success: "-i /path/to/mp4File -i /path/to/soundmp3File -codec copy -shortest path/to/...
2
votes
1answer
403 views

ffmpeg **doubled** my duration

I'm using ffmpeg to convert a PNG image sequence into a .mov file with alpha channel for us in my NLE. The PNG sequence was rendered out of DashWare where it was generated in sync with a 4m35s (...
2
votes
1answer
7k views

FFMPEG - Use drawtext and complex filters

I have a ffmpeg command that plays several videos from a folder to a live stream, but I would also like to add text overlays over it. The problem is that I used complex filter to concatenate the ...

1
4 5
6
7 8
34