Ffmpeg returns input error when encoding

Hi all! Today when i use ffmpeg to encode a live stream (h264) to the local file, the output show me that this command dose not work at all. The follow is my command:
ffmpeg -i http://tv.drs.ncntv.com.cn:8100/channellive/ch1.flv -c:v copy -c:a copy -f mp4 ch1.mp4
The output is this:
http://tv.drs.ncntv.com.cn:8100/channellive/ch1.flv: Invalid data found when processing input

But when i use ArchLinux or other distributions,this command works very well, with no errors.
So,is there someone to help me?

Ffmpeg isn’t compiled with proprietary codecs.

Clear Linux can not ship ffmpeg with all the proprietary codecs, so you need to compile it

1 Like

flv format demuxing is disabled in our build. This is the cause of the failure: ffmpeg doesn’t know what format it is or how to demux it.

1 Like

Thanks very much! I will try this guide

In a few days the program will be able to decode flv files. That doesn’t mean it will be able to fully decode the video or audio content, but the stream encapsulation will be recognized.

Unfortunately, this not works for compile and install missing proprietary and free codecs from FFmpeg. If you compile any codec was missing, FFmpeg will not find the codec on compile.

I wrote some notes on compiling ffmpeg with third party codecs and libraries here. I also included some notes on finding, building, and installing the codec and other libraries so that the ffmpeg build script can find and include them. I hope these notes can help you.

1 Like

https://johnvansickle.com/ffmpeg/ - static ffmpeg builds.

Also these build scripts will be interested - https://github.com/zimbatm/ffmpeg-static

There are ‘build info’ links on the page that point to lists of the third party libraries included and the codecs enabled in the respective builds offered.

1 Like

You’ll get better performance if you compile it on clearlinux than if you use a static build from someone else.

1 Like

Agree, but update of ffmpeg+deps as just recomplile them all is painful.

Using random binaries from the internet also comes with risk.

Everything is a trade-off :slight_smile:

1 Like