[FFmpeg-trac] #8659(avdevice:new): av_display_rotation_set() has no effect in android_camera
FFmpeg
trac at avcodec.org
Thu May 14 09:24:00 EEST 2020
#8659: av_display_rotation_set() has no effect in android_camera
------------------------------------+------------------------------------
Reporter: juha-h | Owner:
Type: defect | Status: new
Priority: normal | Component: avdevice
Version: git-master | Resolution:
Keywords: android | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by juha-h):
Command that is executed to record video:
{{{ffmpeg -video_size hd720 -f android_camera -camera_index 1 -i anything
-r 10 -t 5 -y <path>}}}
Output when defaultDisplay.rotation of Android device is
Surface.ROTATION_0 (= portrait):
{{{
05-14 09:13:03.247 4589 4589 I Baresip : [android_camera @ 0x7823e3fc00]
Android camera capture session is active.
05-14 09:13:03.247 4589 4589 I Baresip : Input #0, android_camera, from
'anything':
05-14 09:13:03.247 4589 4589 I Baresip : Duration: N/A, start:
683284.573975, bitrate: N/A
05-14 09:13:03.247 4589 4589 I Baresip : Stream #0:0: Video:
rawvideo (NV21 / 0x3132564E), nv21, 1280x720, 30 fps, 30 tbr,
1000000000.00 tbn, 1000000000.00 tbc
05-14 09:13:03.247 4589 4589 I Baresip : Side data:
05-14 09:13:03.247 4589 4589 I Baresip : displaymatrix: rotation
of 90.00 degrees
05-14 09:13:03.247 4589 4589 I Baresip : Stream mapping:
05-14 09:13:03.247 4589 4589 I Baresip : Stream #0:0 -> #0:0 (rawvideo
(native) -> mpeg4 (native))
05-14 09:13:03.247 4589 4589 I Baresip : Press [q] to stop, [?] for help
05-14 09:13:03.247 4589 4589 I Baresip : [graph 0 input from stream 0:0
@ 0x7823c6b140] sws_param option is deprecated and ignored
05-14 09:13:03.247 4589 4589 I Baresip : Output #0, mp4, to
'/storage/emulated/0/Download/video.mp4':
05-14 09:13:03.247 4589 4589 I Baresip : Metadata:
05-14 09:13:03.247 4589 4589 I Baresip : encoder :
Lavf58.42.100
05-14 09:13:03.247 4589 4589 I Baresip : Stream #0:0: Video: mpeg4
(mp4v / 0x7634706D), yuv420p, 720x1280, q=2-31, 200 kb/s, 10 fps, 10240
tbn, 10 tbc
05-14 09:13:03.247 4589 4589 I Baresip : Metadata:
05-14 09:13:03.247 4589 4589 I Baresip : encoder :
Lavc58.78.102 mpeg4
05-14 09:13:03.247 4589 4589 I Baresip : Side data:
05-14 09:13:03.247 4589 4589 I Baresip : cpb: bitrate max/min/avg:
0/0/200000 buffer size: 0 vbv_delay: N/A
05-14 09:13:03.247 4589 4589 I Baresip : displaymatrix: rotation
of -0.00 degrees
}}}
Output when defaultDisplay.rotation of Android device is
Surface.ROTATION_90 (= landscape):
{{{
05-14 09:15:09.294 4589 4589 I Baresip : [android_camera @ 0x7823e40e00]
Android camera capture session is active.
05-14 09:15:09.294 4589 4589 I Baresip : Input #0, android_camera, from
'anything':
05-14 09:15:09.294 4589 4589 I Baresip : Duration: N/A, start:
683410.615418, bitrate: N/A
05-14 09:15:09.294 4589 4589 I Baresip : Stream #0:0: Video:
rawvideo (NV21 / 0x3132564E), nv21, 1280x720, 30 fps, 30 tbr,
1000000000.00 tbn, 1000000000.00 tbc
05-14 09:15:09.294 4589 4589 I Baresip : Side data:
05-14 09:15:09.294 4589 4589 I Baresip : displaymatrix: rotation
of 90.00 degrees
05-14 09:15:09.294 4589 4589 I Baresip : Stream mapping:
05-14 09:15:09.294 4589 4589 I Baresip : Stream #0:0 -> #0:0 (rawvideo
(native) -> mpeg4 (native))
05-14 09:15:09.294 4589 4589 I Baresip : Press [q] to stop, [?] for help
05-14 09:15:09.294 4589 4589 I Baresip : [graph 0 input from stream 0:0
@ 0x7813e430c0] sws_param option is deprecated and ignored
05-14 09:15:09.294 4589 4589 I Baresip : Output #0, mp4, to
'/storage/emulated/0/Download/video.mp4':
05-14 09:15:09.294 4589 4589 I Baresip : Metadata:
05-14 09:15:09.294 4589 4589 I Baresip : encoder :
Lavf58.42.100
05-14 09:15:09.294 4589 4589 I Baresip : Stream #0:0: Video: mpeg4
(mp4v / 0x7634706D), yuv420p, 720x1280, q=2-31, 200 kb/s, 10 fps, 10240
tbn, 10 tbc
05-14 09:15:09.294 4589 4589 I Baresip : Metadata:
05-14 09:15:09.294 4589 4589 I Baresip : encoder :
Lavc58.78.102 mpeg4
05-14 09:15:09.294 4589 4589 I Baresip : Side data:
05-14 09:15:09.294 4589 4589 I Baresip : cpb: bitrate max/min/avg:
0/0/200000 buffer size: 0 vbv_delay: N/A
05-14 09:15:09.294 4589 4589 I Baresip : displaymatrix: rotation
of -0.00 degrees
}}}
The issue is that in both cases input stream displaymatrix side data has
the same rotation of 90.0 degrees.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8659#comment:19>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list