[Libav-user] Encode x265 annexb stream from grayscale images
Marina Vasilevsky
marina at dentlytec.com
Sun Aug 19 11:35:18 EEST 2018
Hello,
Trying to create simple utility that encodes multiple images to x265 annexB
stream.
OS Ubuntu
libav version: 3.4.2
Command line works:
ffmpeg -loglevel 48 -f image2 -s 640x640 -pattern_type sequence
-start_number 180 -i /media/marina/sdxdata/sw/records/pattern/%08d.pgm -c:v
libx265 -preset veryslow -x265-params lossless=1 -vf "format=gray8" -f hevc
out1.bin
Source code - I followed guiding and examples of ffmpeg
avcodec_receive_packet always returns EAGAIN,
When I send null frame, it returns packet - with encoded latest frame.
Attached file is implementation of frame encode and codec init
There is main loop that calls "AppendFrame" multiple times
Thanks,
Marina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180819/cb19b616/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rec_svc_enc.cpp
Type: text/x-c++src
Size: 5357 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180819/cb19b616/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rec_svc_enc.h
Type: text/x-chdr
Size: 1082 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180819/cb19b616/attachment.h>
More information about the Libav-user
mailing list