Hi,
My current system:
***
OS: Ubuntu Linux 14.04 with 3.14.5-MSSr6 #1 SMP.
Hardware: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
***
1) I managed to complete the detailed instruction for installing intel
media sdk on generic Linux OS.
I followed the instruction given in
- https://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028761.html
-
https://software.intel.com/en-us/articles/how-to-setup-media-server-studio-on-secondary-os-of-linux
2) I also compiled the latest ffmpeg from github following the procedure
presented in
https://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028761.html
3) I was testing compression of video camera feed using the command
>> /opt/ffmpeg_qsv/bin/ffmpeg -f v4l2 -framerate 30 -video_size 640x480 -i
/dev/video0 -c:v h264_qsv out.mp4 -loglevel 1000000
*I got the following error:*
[h264_qsv @ 0x2e327e0] Error initializing an internal MFX session
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
*Things that I tried:*
1) ensure user is part of video group
2) Run the command with sudo and su
3) export LD_LIBRARY_PATH (export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mediasdk/lib64)
4) add ld.so.conf
/etc/ld.so.conf.d/intel-mediasdk.conf -> /opt/intel/mediasdk/lib64
5) ldconfig -p -N | grep intel.mediasdk
libmfxsw64.so (libc6,x86-64) => /opt/intel/mediasdk/lib64/libmfxsw64.so
libmfxhw64.so (libc6,x86-64) => /opt/intel/mediasdk/lib64/libmfxhw64.so
6) Testing with a sample yuv file instead of camera feed got the same error
Please see the detailed log attached.
Any help to proceed next would be appreciated.
Regards,
Jay
ffmpeg version N-78755-g9a27780 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --disable-shared --enable-static --enable-gpl --enable-nonfree --enable-fontconfig --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-version3 --enable-ffplay --disable-doc --disable-ffserver --enable-pthreads --enable-filters --enable-libvorbis --enable-libtheora --enable-runtime-cpudetect --enable-libass --enable-bzlib --enable-zlib --prefix=/opt/ffmpeg_qsv/ --enable-libmfx
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 27.100 / 57. 27.100
libavformat 57. 26.100 / 57. 26.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 37.100 / 6. 37.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-framerate' ... matched as AVOption 'framerate' with argument '30'.
Reading option '-video_size' ... matched as AVOption 'video_size' with argument '640x480'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_qsv'.
Reading option 'out.mp4' ... matched as output file.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '1000000'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 1000000.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2e2f4e0] fd:3 capabilities:84000001
[video4linux2,v4l2 @ 0x2e2f4e0] Current input_channel: 0, input_name: Camera 1, input_std: 0
[video4linux2,v4l2 @ 0x2e2f4e0] The V4L2 driver changed the pixel format from 0x32315559 to 0x56595559
[video4linux2,v4l2 @ 0x2e2f4e0] Trying to set codec:rawvideo pix_fmt:yuv420p
[video4linux2,v4l2 @ 0x2e2f4e0] The V4L2 driver changed the pixel format from 0x32315559 to 0x56595559
[video4linux2,v4l2 @ 0x2e2f4e0] Trying to set codec:rawvideo pix_fmt:yuv420p
[video4linux2,v4l2 @ 0x2e2f4e0] The V4L2 driver changed the pixel format from 0x32315659 to 0x56595559
[video4linux2,v4l2 @ 0x2e2f4e0] Trying to set codec:rawvideo pix_fmt:yuv422p
[video4linux2,v4l2 @ 0x2e2f4e0] The V4L2 driver changed the pixel format from 0x50323234 to 0x56595559
[video4linux2,v4l2 @ 0x2e2f4e0] Trying to set codec:rawvideo pix_fmt:yuyv422
[video4linux2,v4l2 @ 0x2e2f4e0] Setting time per frame to 1/30
[video4linux2,v4l2 @ 0x2e2f4e0] All info found
[video4linux2,v4l2 @ 0x2e2f4e0] 0: start_time: 2894.368 duration: -9223372036854.775
[video4linux2,v4l2 @ 0x2e2f4e0] stream: start_time: 2894.368 duration: -9223372036854.775 bitrate=147456 kb/s
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 2894.367651, bitrate: 147456 kb/s
Stream #0:0, 1, 1/1000000: Video: rawvideo, 1 reference frame (YUY2 / 0x32595559), yuyv422, 640x480, 1/1000000, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out.mp4.
Applying option c:v (codec name) with argument h264_qsv.
Successfully parsed a group of options.
Opening an output file: out.mp4.
[file @ 0x2e33680] Setting default whitelist 'file'
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x2e2f1c0] Setting 'video_size' to value '640x480'
[graph 0 input from stream 0:0 @ 0x2e2f1c0] Setting 'pix_fmt' to value '1'
[graph 0 input from stream 0:0 @ 0x2e2f1c0] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0x2e2f1c0] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x2e2f1c0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x2e2f1c0] Setting 'frame_rate' to value '30/1'
[graph 0 input from stream 0:0 @ 0x2e2f1c0] w:640 h:480 pixfmt:yuyv422 tb:1/1000000 fr:30/1 sar:0/1 sws_param:flags=2
[format @ 0x2e3c720] compat: called with args=[nv12|qsv]
[format @ 0x2e3c720] Setting 'pix_fmts' to value 'nv12|qsv'
[auto-inserted scaler 0 @ 0x2e3d680] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 0 @ 0x2e3d680] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x2e3c720] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x2e33120] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x2e3d680] w:640 h:480 fmt:yuyv422 sar:0/1 -> w:640 h:480 fmt:nv12 sar:0/1 flags:0x4
[h264_qsv @ 0x2e327e0] Error initializing an internal MFX session
Output #0, mp4, to 'out.mp4':
Stream #0:0, 0, 0/0: Video: h264, 1 reference frame, none, q=2-31, 128 kb/s, 30 fps
Metadata:
encoder : Lavc57.27.100 h264_qsv
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_qsv))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0x2e333a0] Statistics: 0 seeks, 0 writeouts
_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user