[FFmpeg-user] libcamera_android build fix?
Andrew Randrianasulu
randrianasulu at gmail.com
Wed Oct 25 15:06:21 EEST 2023
diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c
index 602b59047d..c981985f10 100644 ---
a/libavdevice/android_camera.c
+++ b/libavdevice/android_camera.c
@@ -648,8 +648,8 @@ static int add_display_matrix(AVFormatContext *avctx,
AVStream *st)
av_display_matrix_flip(display_matrix, 1, 0);
}
- side_data = av_packet_side_data_new(&st->codecpar->side_data,
- &st->codecpar->nb_side_data,
+ side_data = av_packet_side_data_new(&st->codecpar->coded_side_data,
+
&st->codecpar->nb_coded_side_data,
AV_PKT_DATA_DISPLAYMATRIX,
sizeof(display_matrix), 0);
====
something like this.
but it still does not work from console
configure:
./configure --enable-jni --enable-mediacodec --enable-neon
--target-os=android --disable-outdevs --disable-indev=xcbgrab
run:
./ffmpeg -pixel_format nv12 -loglevel trace -f android_camera
-camera_index 1 -input_queue_size 5 -video_size 1280x720 -i 0:0 -c:v
libx264 -g 30 -b:v 980k -r 30 -s 1280x720 -b:a 28k 11test.mp4
it just sits here doing nothing, I guess waiting for application window?
[android_camera @ 0xb4000071aebc64d0] Android camera capture session is
active.
I found similar question at
https://www.mail-archive.com/ffmpeg-user@ffmpeg.org/msg21783.html
and this explanation of camera api:
https://www.sisik.eu/blog/android/ndk/camera
More information about the ffmpeg-user
mailing list