[FFmpeg-user] The transcoded file can't see the video played by the JW player which used the VAAPI to transcode file to the FLV format.
Archer Chang
archerchang at qnap.com
Mon Dec 5 17:39:19 EET 2016
Hi Carl,
It can be played normally by the JW Player, if using the libx264 instead of
the h264_vaapi.
Failing command(only can hear the sound but no video)
root at Lucy:~$ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi
-hwaccel_output_format vaapi -hwaccel_lax_profile_check -i
bbb_sunflower_1080p_30fps_normal.mp4 -vf "format=nv12|vaapi,hwupload" -c:v
h264_vaapi -c:a aac -ac 2 -ar 44100 -t 60 -f flv vaapi.mp4.to.flv
ffmpeg version 3.2.git Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --prefix=/opt/cdx --enable-gpl --enable-version3
--enable-nonfree --enable-shared --disable-nvenc --enable-vaapi --enable-
libass --enable-libfreetype --enable-libmp3lame --enable-libopus
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-libwavpack
libavutil 55. 41.101 / 55. 41.101
libavcodec 57. 66.109 / 57. 66.109
libavformat 57. 58.101 / 57. 58.101
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
libva info: VA-API version 0.39.3
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/cdx/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb_sunflower_1080p_30fps_normal.
mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2013-12-16T17:44:39.000000Z
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
genre : Animation
composer : Sacha Goedegebure
Duration: 00:10:34.53, start: 0.000000, bitrate: 3481 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc
(default)
Metadata:
creation_time : 2013-12-16T17:44:39.000000Z
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo,
s16p, 160 kb/s (default)
Metadata:
creation_time : 2013-12-16T17:44:42.000000Z
handler_name : GPAC ISO Audio Handler
Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side),
fltp, 320 kb/s (default)
Metadata:
creation_time : 2013-12-16T17:44:42.000000Z
handler_name : GPAC ISO Audio Handler
Side data:
audio service type: main
File 'vaapi.mp4.to.flv' already exists. Overwrite ? [y/N] y
Output #0, flv, to 'vaapi.mp4.to.flv':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
composer : Sacha Goedegebure
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
genre : Animation
encoder : Lavf57.58.101
Stream #0:0(und): Video: h264 (h264_vaapi) (High) ([7][0][0][0] /
0x0007), vaapi_vld, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 1k tbn,
30 tbc (default)
Metadata:
creation_time : 2013-12-16T17:44:39.000000Z
handler_name : GPAC ISO Video Handler
encoder : Lavc57.66.109 h264_vaapi
Stream #0:1(und): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2013-12-16T17:44:42.000000Z
handler_name : GPAC ISO Audio Handler
encoder : Lavc57.66.109 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
Stream #0:2 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x6ba8e0] Hardware accelerated decoding with frame threading is
known to be unstable and its use is discouraged.
Input stream #0:0 frame changed from size:1920x1080 fmt:yuv420p to
size:1920x1080
fmt:vaapi_vld
frame= 1798 fps= 65 q=-0.0 Lsize= 69354kB time=00:01:00.00
bitrate=9469.0kbits/s
speed=2.17x
video:68331kB audio:945kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.113605%
[aac @ 0x73b0e0] Qavg: 447.803
By the way, Might I ask a question? What is the difference between
ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi *-hwaccel_output_format
vaapi* -hwaccel_lax_profile_check -i infile -vf "format=nv12|*vaapi*,hwupload"
-c:v h264_vaapi outfile
and
ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi
-hwaccel_lax_profile_check -i infile -vf "format=nv12,hwupload" -c:v
h264_vaapi outfile
Seems the transcoding speed is slow if the command without the
-hwaccel_output_format
vaapi parameter.
Regards,
Archer Chang
2016-12-05 20:59 GMT+08:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> 2016-12-05 13:51 GMT+01:00 Archer Chang <lookup69 at gmail.com>:
> > I use the VAAPI HW ACCEL to transcode file to the FLV format that the
> > command as follows.
> >
> > ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi
> > -hwaccel_output_format vaapi -hwaccel_lax_profile_check
> > -i infile.mkv -vf "format=nv12|vaapi,hwupload" -c:v h264_vaapi
> > -c:a aac -ac 2 -ar 44100 *outfile1.flv*
>
> Does it work if you use libx264 instead?
> Please (test current FFmpeg git head and) provide the failing command line
> together with the complete, uncut console output.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list