how to encode with VAAPI for raspberry 3b

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

how to encode with VAAPI for raspberry 3b

Postby acconciox » Fri Oct 14, 2016 11:22 am

hi, im trying to use h264_vaapi on notebook to encode video.VOB to raspberry 3 b.

$this->bbcode_second_pass_code('', '
nice cat VTS_01_1.VOB | nice ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -analyzeduration 512M -probesize 512M -i - -an -map 0:v -vf 'format=nv12|vaapi,hwupload' -vcodec h264_vaapi -y video.mp4

mpv video.mp4
Resuming playback. This behavior can be disabled with --no-resume-playback.
Loading config '/home/alarm/.config/mpv/watch_later/1AEB3C22A37B861998CFBB95CF3B68D4'
Playing: video.mp4
(+) Video --vid=1 (*) (h264)
[ffmpeg/video] h264_mmal: Did not get output frame from MMAL.
Error while decoding frame!
Using hardware decoding (rpi).
VO: [rpi] 720x576 => 1024x576 mmal
V: 00:00:39 / 00:24:39 (2%)
Invalid video timestamp: 42.445000 -> 39.360000
V: 00:01:03 / 00:24:39 (4%)

$; ffmpeg -i
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.51.102
Duration: 00:24:39.76, start: 0.000000, bitrate: 3054 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 3052 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
')
this is ffmpeg with -profile:v 100
$this->bbcode_second_pass_code('', 'nice cat VTS_01_1.VOB | nice ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -analyzeduration 512M -probesize 512M -i - -an -map 0:v -vf 'format=nv12|vaapi,hwupload' -vcodec h264_vaapi -profile:v 100 -y video100.mp4
')
In this case, there is not mmal problem as before
$this->bbcode_second_pass_code('', 'mpv video100.mp4
Playing: video100.mp4
(+) Video --vid=1 (*) (h264)
Using hardware decoding (rpi).
VO: [rpi] 720x576 => 1024x576 mmal
V: 00:00:29 / 00:24:39 (2%)
Invalid video timestamp: 32.765000 -> 29.680000
V: 00:00:39 / 00:24:39 (2%)
Invalid video timestamp: 42.445000 -> 39.360000
V: 00:01:13 / 00:24:39 (4%)
Invalid video timestamp: 76.325000 -> 73.240000
V: 00:01:47 / 00:24:39 (7%)
Invalid video timestamp: 110.205000 -> 107.120000
V: 00:01:56 / 00:24:39 (7%)
Invalid video timestamp: 119.885000 -> 116.800000
V: 00:02:18 / 00:24:39 (9%)
')
But there are problem of freeze video holds image for some secs before restarting51
$this->bbcode_second_pass_code('', '
nice cat VTS_01_1.VOB | nice ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -analyzeduration 512M -probesize 512M -i - -an -map 0:v -vf 'format=nv12|vaapi,hwupload' -vcodec h264_vaapi -profile:v 100 -level 51 -y video10051.mp4
')
Same as before

Is there a way to make with h264_vaapi a file mp4 good for raspberry?
acconciox
 
Posts: 110
Joined: Thu May 05, 2016 4:39 pm

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 10 guests