[英]Is it possible to rotate the frame while decoding a video with ffmpeg c++ api based on the metadata info?
目前,我通過以下方式獲取輪換信息:
av_dict_get(videoStream->metadata, "rotate", NULL, AV_DICT_MATCH_CASE);
現在,在解碼視頻時如何應用此旋轉值?
我使用avcodec_send_packet()
和avcodec_receive_frame()
解碼幀,然后隱蔽像素格式並使用sws_scale()
縮放幀。
您必須使用過濾器圖和轉置或hflip過濾器。 Swscale不會這樣做。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.