On 12/20/18 6:24 PM, Roland Singer wrote: > Hi, > > hope somebody can help solving a segmentation fault caused by using the > h264_v4l2m2m encoder on an Samsung Exynos5422. > > I tested the encoder using the unmodified examples (git master): > - encode_video.c > - transcoding.c > >> # ./encode_video out h264_v4l2m2m >> [h264_v4l2m2m @ 0x49e150] driver 'uvcvideo' on card 'RYS HFR USB2.0 Camera: >> RYS HFR ' >> [h264_v4l2m2m @ 0x49e150] driver 'exynos-gsc' on card 'exynos-gsc gscaler' >> [h264_v4l2m2m @ 0x49e150] driver 'exynos-gsc' on card 'exynos-gsc gscaler' >> [h264_v4l2m2m @ 0x49e150] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x49e150] Using device /dev/video11 >> [h264_v4l2m2m @ 0x49e150] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x49e150] Encoder does not support b-frames yet >> [h264_v4l2m2m @ 0x49e150] h264 profile not found >> [h264_v4l2m2m @ 0x49e150] Encoder adjusted: qmin (0), qmax (51) >> Send frame 0 >> Segmentation fault (core dumped) > >> # ./transcoding sintel-1280-surround.mp4 out.mp4 >> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sintel-1280-surround.mp4': >> Metadata: >> major_brand : isom >> minor_version : 512 >> compatible_brands: isomiso2avc1mp41 >> creation_time : 1970-01-01T00:00:00.000000Z >> title : Sintel >> encoder : Lavf52.78.5 >> copyright : (c) Copyright 2010 Blender Foundation, all rights >> reserved >> description : Sintel open movie project >> Duration: 00:14:48.06, start: 0.000000, bitrate: 2062 kb/s >> Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, >> 1280x544, 1615 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default) >> Metadata: >> creation_time : 1970-01-01T00:00:00.000000Z >> handler_name : VideoHandler >> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, >> fltp, 440 kb/s (default) >> Metadata: >> creation_time : 1970-01-01T00:00:00.000000Z >> handler_name : SoundHandler >> [h264_v4l2m2m @ 0x5051d0] driver 'uvcvideo' on card 'RYS HFR USB2.0 Camera: >> RYS HFR ' >> [h264_v4l2m2m @ 0x5051d0] driver 'exynos-gsc' on card 'exynos-gsc gscaler' >> [h264_v4l2m2m @ 0x5051d0] driver 'exynos-gsc' on card 'exynos-gsc gscaler' >> [h264_v4l2m2m @ 0x5051d0] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x5051d0] Using device /dev/video11 >> [h264_v4l2m2m @ 0x5051d0] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x5051d0] h264 profile not found >> [h264_v4l2m2m @ 0x5051d0] Encoder adjusted: qmin (0), qmax (51) >> Segmentation fault (core dumped) > > However using ffmpeg directly with the following command works as expected: > >> # ffmpeg -vcodec h264_v4l2m2m -i sintel-1280-surround.mp4 -vcodec >> h264_v4l2m2m output.mp4 >> ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers >> built with gcc 8.2.0 (GCC) >> configuration: --prefix=/usr --disable-debug --disable-static >> --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls >> --enable-gpl --enable-ladspa --enable-libass --enable-libbluray >> --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm >> --enable-libiec61883 --enable-libjack --enable-libmodplug >> --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb >> --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr >> --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 >> --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp >> --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 >> --enable-libxvid --enable-omx --enable-shared --enable-version3 >> --host-cflags='"-fPIC"' >> libavutil 56. 22.100 / 56. 22.100 >> libavcodec 58. 35.100 / 58. 35.100 >> libavformat 58. 20.100 / 58. 20.100 >> libavdevice 58. 5.100 / 58. 5.100 >> libavfilter 7. 40.101 / 7. 40.101 >> libswscale 5. 3.100 / 5. 3.100 >> libswresample 3. 3.100 / 3. 3.100 >> libpostproc 55. 3.100 / 55. 3.100 >> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sintel-1280-surround.mp4': >> Metadata: >> major_brand : isom >> minor_version : 512 >> compatible_brands: isomiso2avc1mp41 >> creation_time : 1970-01-01T00:00:00.000000Z >> title : Sintel >> encoder : Lavf52.78.5 >> copyright : (c) Copyright 2010 Blender Foundation, all rights >> reserved >> description : Sintel open movie project >> Duration: 00:14:48.06, start: 0.000000, bitrate: 2062 kb/s >> Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, >> 1280x544, 1615 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default) >> Metadata: >> creation_time : 1970-01-01T00:00:00.000000Z >> handler_name : VideoHandler >> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, >> fltp, 440 kb/s (default) >> Metadata: >> creation_time : 1970-01-01T00:00:00.000000Z >> handler_name : SoundHandler >> [h264_v4l2m2m @ 0x4f1b10] driver 'uvcvideo' on card 'RYS HFR USB2.0 Camera: >> RYS HFR ' >> [h264_v4l2m2m @ 0x4f1b10] driver 'exynos-gsc' on card 'exynos-gsc gscaler' >> Last message repeated 1 times >> [h264_v4l2m2m @ 0x4f1b10] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x4f1b10] driver 's5p-mfc' on card 's5p-mfc-dec' >> [h264_v4l2m2m @ 0x4f1b10] Using device /dev/video10 >> [h264_v4l2m2m @ 0x4f1b10] driver 's5p-mfc' on card 's5p-mfc-dec' >> Stream mapping: >> Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (h264_v4l2m2m)) >> Stream #0:1 -> #0:1 (aac (native) -> aac (native)) >> Press [q] to stop, [?] for help >> [h264_v4l2m2m @ 0x524dd0] driver 'uvcvideo' on card 'RYS HFR USB2.0 Camera: >> RYS HFR ' >> [h264_v4l2m2m @ 0x524dd0] driver 'exynos-gsc' on card 'exynos-gsc gscaler' >> Last message repeated 1 times >> [h264_v4l2m2m @ 0x524dd0] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x524dd0] Using device /dev/video11 >> [h264_v4l2m2m @ 0x524dd0] driver 's5p-mfc' on card 's5p-mfc-enc' >> [h264_v4l2m2m @ 0x524dd0] h264 profile not found >> [h264_v4l2m2m @ 0x524dd0] Encoder adjusted: qmin (0), qmax (51) >> Output #0, mp4, to 'output.mp4': >> Metadata: >> major_brand : isom >> minor_version : 512 >> compatible_brands: isomiso2avc1mp41 >> description : Sintel open movie project >> title : Sintel >> copyright : (c) Copyright 2010 Blender Foundation, all rights >> reserved >> encoder : Lavf58.20.100 >> Stream #0:0(und): Video: h264 (h264_v4l2m2m) (avc1 / 0x31637661), nv21, >> 1280x544, q=2-31, 200 kb/s, 24 fps, 12288 tbn, 24 tbc (default) >> Metadata: >> creation_time : 1970-01-01T00:00:00.000000Z >> handler_name : VideoHandler >> encoder : Lavc58.35.100 h264_v4l2m2m >> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, >> fltp, 341 kb/s (default) >> Metadata: >> creation_time : 1970-01-01T00:00:00.000000Z >> handler_name : SoundHandler >> encoder : Lavc58.35.100 aac >> [mp4 @ 0x4edfd0] Non-monotonous DTS in output stream 0:0; previous: 0, >> current: 0; changing to 1. This may result in incorrect timestamps in the >> output file. >> ^Came= 218 fps= 54 q=-0.0 size= 15616kB time=00:00:09.15 >> bitrate=13978.0kbits/s speed=2.27x > > Hope we can fix the examples for the MFC Samsung h264_v4l2m2m encoder. > Have a great day! > > Kind Regards > Roland
Oh one more thing. dmesg outputs following line: > vidioc_try_fmt:1070: failed to try output format _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
