QSV Failure

Dec 23, 2013 at 11:08 PM
Have installed the latest Handbrake "nightly" and attempted to use a separately posted profile, but repeated attempts have failed. The basis for the log errors is not clear. Any input is appreciated.

Profiles Tested:
[QSV MP4] 
Description=Handbrake with Intel QSV. 
handbrake-general=--loose-anamorphic --modulus 2 --deinterlace qsv --verbose=2 -f mp4 -4 
handbrake-video=--start-at duration:3 -e qsv_h264 -q 22 --qsv-preset balanced --h264-profile high --h264-level 4.0
handbrake-audio=-E faac -R auto -B 160 
handbrake-audioac3=-E faac -R auto -B 160 

[QSV MP4 High Quality]
Description=QSV with High profile, high quality 2 pass MP4 (H.264/AAC) conversion, primarily for HD videos.  Takes the most time but produces the best results.
handbrake-general=--loose-anamorphic --verbose=2 -f mp4 -4
handbrake-video=--start-at duration:3 -e qsv_h264 -b 1800 -x me=hex:trellis=2:subq=8:partitions=all:8x8dct:ref=5:rc_lookahead=50:keyint=25:keyint_min=20:bframes=3:weight_b:level_idc=40:b_pyramid=normal:direct_pred=auto:mixed_refs:deblock=-1,-1:nofast_pskip:nodct_decimate:b_adapt=2:threads=auto
handbrake-audio=-E faac -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E faac -R auto -B 384 -D 0 -a 1,2,3,4,5
Some excerpts from the log:
ERROR> --> No Audio Codec detected in raw stream
ERROR> 2013-12-23T17:19:48 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> TsMuxer Streams Muxing failed
INFORMATION> 2013-12-23T17:19:48 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> Fallback muxing streams with FFMpegParts
--> Audio Delay : -0.325
--> Video Codec detected : mpeg video, FPS : 29.97
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg --> Launching process C:\Program Files\MCEBuddy2x\ffmpeg\ffmpeg.exe
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg --> Process arguments  -probesize 100M -analyzeduration 300M -fflags +genpts -y -r 29.97 -f mpegvideo -i "C:\Users\3770K\AppData\Local\Temp\working0\Pawn Stars_HSTRYHD_2013_06_20_20_30_00_VIDEO" -itsoffset 0.325 -i "C:\Users\3770K\AppData\Local\Temp\working0\Pawn Stars_HSTRYHD_2013_06_20_20_30_00_AUDIO0" -map 0:v -map 1:a -acodec copy -vcodec copy -f mpegts "C:\Users\3770K\AppData\Local\Temp\working0\Pawn Stars_HSTRYHD_2013_06_20_20_30_00.ts"
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg --> ffmpeg version N-54802-gfc6de70 Copyright (c) 2000-2013 the FFmpeg developers
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   built on Oct 14 2013 09:43:55 with gcc 4.8.0 (GCC)
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   configuration: --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libmodplug --extra-libs=-lstdc++ --enable-libcaca --prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-static --disable-shared --enable-libsoxr --enable-fontconfig --ena  libavutil      52. 40.100 / 52. 40.100
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libavcodec     55. 18.102 / 55. 18.102
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libavformat    55. 12.102 / 55. 12.102
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libavdevice    55.  3.100 / 55.  3.100
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libavfilter     3. 81.101 /  3. 81.101
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libswscale      2.  4.100 /  2.  4.100
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libswresample   0. 17.102 /  0. 17.102
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg -->   libpostproc    52.  3.100 / 52.  3.100
2013-12-23T17:19:48 MCEBuddy.AppWrapper.FFmpeg --> [mpeg1video @ 00000000024489c0] Invalid frame dimensions 0x0.

error opening C:\Users\3770K\AppData\Local\Temp\working0\Pawn Stars_HSTRYHD_2013_06_20_20_30_00.ts/BDMV/index.bdmv
2013-12-23T17:20:53 MCEBuddy.AppWrapper.Handbrake --> libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\3770K\AppData\Local\Temp\working0\Pawn Stars_HSTRYHD_2013_06_20_20_30_00.ts/BDMV/BACKUP/index.bdmv

2013-12-23T17:20:53 MCEBuddy.AppWrapper.Handbrake --> [17:20:53]  - Intel microarchitecture Ivy Bridge
2013-12-23T17:20:53 MCEBuddy.AppWrapper.Handbrake --> [17:20:53]  - logical processor count: 8
2013-12-23T17:20:53 MCEBuddy.AppWrapper.Handbrake --> [17:20:53] Intel Quick Sync Video support: yes
2013-12-23T17:20:53 MCEBuddy.AppWrapper.Handbrake --> [17:20:53]  - Intel Media SDK hardware: API 1.7

2013-12-23T17:21:12 MCEBuddy.AppWrapper.Handbrake --> ERROR: av_interleaved_write_frame failed!
2013-12-23T17:21:12 MCEBuddy.AppWrapper.Handbrake --> [17:21:12] work: average encoding speed for job is 64.130020 fps

Encode failed (error 4)

ERROR> 2013-12-23T17:21:15 MCEBuddy.Transcode.ConvertWithHandbrake --> Handbrake conversion failed
2013-12-23T17:21:15 MCEBuddy.Transcode.ConvertWithHandbrake --> Conversion: Percentage Complete 2.61
ERROR> 2013-12-23T17:21:15 MCEBuddy.Transcode.ConvertWithHandbrake --> Conversion of video failed
ERROR> 2013-12-23T17:21:15 MCEBuddy.Transcode.Convert --> Handbrake did not convert successfully, using fallback if configured
ERROR> 2013-12-23T17:21:15 MCEBuddy.Transcode.Convert --> Unable to convert file Pawn Stars_HSTRYHD_2013_06_20_20_30_00.ts using profile QSV MP4
ERROR> 2013-12-23T17:21:15 MCEBuddy.Engine.ConversionJob --> Conversion failed
Separately, Handbrake QSV rocks through the video. What normally may take about an hour is completed in about nine minutes.
Dec 24, 2013 at 2:20 AM
Are you using Windows XP/Vista/7 - in which case the issue is that the windows service runs in kernel space and the kernel does not allow access to hardware encoding api's which is why handbrake is failing (but works find when you it as an app in user space). This was also documented in another thread.
Windows 8 removes this limitation and handbrake should work fine there as part of the MCEBuddy service.

The solution is a bit of a hack which I had provided in 2.3.14 release. You can start MCEBuddy engine as a command line app. From the start menu, select start MCEBuddy engine as a command line program. Now it should work.
The only downside is that it runs as a regular app now and you will need to start the engine each time windows starts.
Marked as answer by rboy1 on 1/29/2014 at 8:50 AM
Dec 24, 2013 at 4:16 AM
Excellent, it is working - thanks!

I have two challenges remaining:
  • It worked well until it loaded a 6GB HD video and AVIDemux crashed
  • With a -0.85 audio delay adjustment, it is early at the beginning of the clip, and late at the end of the clip - by no small margin. Any tweaks? I searched but I only see references to a static delta.
Dec 29, 2013 at 10:04 PM
I tried doing the conversion from command line, but it is telling me "invalid codec (qsv_h264)" even though i did coppy over the handbreak CLI.exe file that should have it. It is version 0.9.9
Does anyone have any suggestions on what im doing wrong?

here is my command line
"C:\Program Files\MCEBuddy2x\handbrake\HandBrakeCLI.exe" -i "d:\Nova scienceNOW_KVIEDT_2012_10_10_22_00_06.ts" --decomb --denoise="weak" --loose-anamorphic --verbose=2 -f mp4 -4 --start-at duration:3 -e qsv_h264 -b 1800 -x me=hex:trellis=2:subq=8:partitions=all:8x8dct:ref=5:rc_lookahead=50:keyint=25:keyint_min=20:bframes=3:weight_b:level_idc=40:b_pyramid=normal:direct_pred=auto:mixed_refs:deblock=-1,-1:nofast_pskip:nodct_decimate:b_adapt=2:threads=auto -X 720 -E faac -R auto -B 384 -D 2.5 -6 stereo -o "d:\Nova scienceNOW_KVIEDT_2012_10_10_22_00_06.ts" -2
Dec 30, 2013 at 2:20 AM
If I remember correctly, version 0.9.9 does not have qsv. Try the latest nightly build (click the link to other platforms).
Marked as answer by rboy1 on 1/29/2014 at 8:50 AM
Dec 30, 2013 at 8:23 PM
stodly wrote:
If I remember correctly, version 0.9.9 does not have qsv. Try the latest nightly build (click the link to other platforms).
Thanks, I just had to find and download the nightly build. Now i will just need to wait for the workaround to run the MCEBuddy service as an application to be released (non early access) before I can actually use it.
Tried to donate, and use my company credit card, but it wont allow me to put my company name in because it has a number in it.