amsundaram
amsundaram

Reputation: 33

Live Video Encoding in ffmpeg

Actually i am trying to compress raw video to MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1 video.I am using ffmpeg.

ffmpeg -threads 2 -f rawvideo -pix_fmt bgr24 -re -s 720x576 -i - -threads 2 -vcodec libx264 -deinterlace -s 720x576 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 3 -refs 1 -directpred 1 -trellis 0 -flags2 +bpyramid-mixed_refs+wpred-dct8x8+fastpskip-mbtree -wpredp 0 -b 3000k -g 300 -an -f flv -y -

it works (output video is 21MB for 1min) while using -f mp4 error shows (muxer does not seekabe output) any one help me. Is it right way to get it ah?

Thank you very much.

Upvotes: 3

Views: 1974

Answers (1)

Matthias Šubik
Matthias Šubik

Reputation: 108

Actually the error message is correct. If I understand the command line correctly, you want to do STDOUT. This is impossible for mp4, as mp4 is a file format which can't be written without seeking afterwards and updating the header/footer.

So change to mpegts or something else that can be written via a pipe. Alternatively give the filename of the output file, then ffmpeg can write a mp4 file.

Upvotes: 2

Related Questions