Encoding video stream by http protocol using ffmpeg library -


i'm trying encode video files, users upload on server. interpretate file stream, incoming on server http protocol , use ffmpeg realtime file encoding, while upload procedure executes.

when source file have .avi format, have successful encoding result, on .mp4 format appears error:

--------------------- [buffer @ 0000000000308380] unable parse option value "-1" pixel format last message repeated 1 times [buffer @ 0000000000308380] error setting option pix_fmt value -1. --------------------- 

i think might because .mp4 contains "moov atom" data in end of file. think because when processing file "-movflags faststart" command before encoding, have successful result.

that command using now:

ffmpeg -i http://myhost.com/app/video/video2.mp4 -f mp4 -vcodec libx264 -b:v 800k -acodec libvo_aacenc -b:a 128k -ar 44100 -ac 2 -y c:/watch-and-get/video/video5.mp4 

can resolve problem , encode multiple video formats stream without excess steps?

you running old version of ffmpeg. problem fixed.

-pix_fmt pixel format , value should integer.(ffmpeg somehow takes value -1, not sure why. hence u error. updating solve problem)

extra info : run ffmpeg -pix_fmts see available pixel formats.

download latest version. recommend installing latest version binary simpler. have answered same here


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -