Hello,
 
I try to encode raw video data with the Motion JPEG codec of ffmpeg.
 
At first I tried encoding with the pixelformat AV_PIX_FMT_YUV420P.
But MJPEG doesnt support this format, so opening the codec context failed.
 
Then I tried encoding with the pixelformat AV_PIX_FMT_YUVJ420P.
I could open the codec and the sws_scale pixelformat-conversion from AV_PIX_FMT_RGB24 to  AV_PIX_FMT_YUVJ420P works as well, but the avcodec_encode_video2 function failed (runtime error: Integer division by zero).
Also ffmpeg creates the following warning: deprecated pixel format used, make sure you did set range correctly.
Modifing the srcRange and dstRange values of my SwsContext via  sws_setColorspaceDetails did not affect the outcome.
 
My configuration perfectly works for other codecs like H264, HEVC and VP9.
What am I doing wrong?
 
Best regards
 
Felix Schillmaier
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to