[Libav-user] Converting yuvj420p to AV_PIX_FMT_BGRA
C Lai
for_rmcer at hotmail.com
Tue May 10 16:11:25 CEST 2016
I have a program similar to FFPLAY to play URL "http://10.5.5.9:8080/live/amba.m3u8" on to my target hardware. This URL provides two different size of video stream depending on mode selection. One is 320X240 and the other one is 432X240. The print out from avformat_open_input() is as the following.
--- Print out #1
Input #0, hls,applehttp, from 'http://10.5.5.9:8080/live/amba.m3u8':
Duration: N/A, start: 483.416267, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Main) (HDMV / 0x564D4448), yuvj420p(pc), 320x240 [SAR 1:1 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s
--- Print out #2
Input &0, hls,applehttp, from 'http://10.5.5.9:8080/live/amba.m3u8':
Duration: N/A, start: 7.741067, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Main) (HDMV / 0x564D4448), yuvj420p(pc), 432x240 [SAR 1:1 DAR 9:5], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s
When the streaming is coming in as 320X240, it converts to AV_PIX_FMT_BGRA without problems. However, if it is coming in as 432x240, the converted image is full of white, gray, and black slanted horizontal lines. I didn't code them differently between different sizes. But I don't understand why the conversion doesn't work for size 432x240.
The FFMpeg library was built with the following options.
# ./ffmpeg
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers á built with gcc 4.7.3 (GCC)
configuration: --enable-cross-compile --cross-prefix=arm-unknown-nto-qnx6.6.0eabi- --arch=armv7 --disable-debug --enable-optimizations --enable-asm --enable-avresample --disable-static --enable-shared --enable-memalign-hack --target-os=qnx --enable-gpl --enable-version3 --enable-bzlib --disable-ffserver --disable-ffprobe prefix=/home/build/Desktop/ffmpeg-3.0.2/target
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Can someone suggest me a fix to this problem? Thank you,
Carol
© 2016 MicrosoftTermsPrivacy & cookiesDevelopersEnglish (United States)
More information about the Libav-user
mailing list