Convert Video info MP4 using ffmpeg

Convert Video For Streaming

if you want to scale the video to specific size, use -vf scale option, example

Inject metadata

See ffmpeg

Cut a Video using ffmpeg

To cut a video using ffmpeg, use

To cut a video and encoding it

DURATION_IN_SECONDS specify duration of new clip. If you specify 60, it will cut 60 seconds of video start from time specified in -ss. In this cause, from 00:17:00 to 00:18:00.

For more info, see “Cutting small sections” part of ffmpeg documentation.

https://trac.ffmpeg.org/wiki/Seeking

See Install ffmpeg on Ubuntu

error: ‘x264_bit_depth’ undeclared (first use in this function)

When installing ffmpeg, i get error

This is due to incompatability with ffmpeg and x264.

What you can do is try another version of x264. You will be able to download older version of x264 from

ftp://ftp.videolan.org/pub/x264/snapshots

On 2018-08-14, it failed with latest stable snapshot. So i tried 14 days old stable snapshot

This worked with ffmpeg.

Solution here is to try latet version first, if it did not work, try older version, say try 1 month old version, if that did not work, go back 2 months, see if that works.

Now install ffmpeg with

ffmpeg

Install FFmpeg on CentOS using yum
Install ffmpeg on Ubuntu
Cut a Video using ffmpeg
Scale a video using ffmpeg
Create thumbnail from video using ffmpeg
Convert Video info MP4 using ffmpeg

Saving a steam with ffmpeg

ffmpeg -i "stream_url" -c copy -f mpegts test.ts

Example

Following commend will save the steam as 1.mp4

ffmpeg -i "rtmp://cp.livecastnet.com:1935/85nortetv/live" 1.mp4

error: ‘x264_bit_depth’ undeclared (first use in this function

Install FFmpeg on CentOS using yum

Install epel repository using

Method 1

Install scrpms repo

On CentOS 7

On CentOS 6

Install ffmpeg with

NOTE: On 2019-12-11 i tested it on CentOS 7. ffmpeg worked. Version is 4.2.1. mplayer/mencoder install failed with dependency error.

Method 2

http://li.nux.ro/repos.html

On CentOS 7

Install ffmpeg with

NOTE: On 2019-12-11 i tested it on CentOS 7. ffmpeg and mencoder install worked. But version is very old. ffmpeg version 2.8.15. MPlayer SVN-r37391-4.8.3

See ffmpeg