• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

FLV colorspace is different from Android to Android? Is FLV video HW accelerated?

Community Beginner ,
Sep 09, 2014 Sep 09, 2014

Copy link to clipboard

Copied

I'm not sure how long this problem has been there, maybe since November 2012 when we launched the app, or did it just appear. I can dig deeper if I get any replies. It seems some of our FLV videos, which have a person speaking on front of a white (as in #ffffff) background, end up having gray background in some devices. I had a lot of trouble originally getting the encoding process work and I'm not sure if I even understood it in the end.

Videos have different color spaces, one having RGB values from 0-255 and others from 16-235 for example. The color space information is encoded in the video, which video playback software may use or not. In the end, videos look different with different playback software and hardware combinations.

I've trusted FLV, because I thought Adobe AIR does everything by software and thus it should work (and has worked) exactly the same on all devices. But not any more. The only thing I can think of, is that some parts of video playback is HW accelerated. Is it possible that my Galaxy Tab 10.1, which shows all videos correctly, doesn't use HW to render video, whereas Galaxy Tab 3, which shows some videos incorrectly, uses HW? It may also be, that some of our videos indeed have wrong color space information in them, a bug in our encoding process. But I need to understand how AIR works a bit better to get the problem solved.

We're using a complex command line script, involving Avisynth. The line I underlined may not have always contained ".ConvertToRGB().ConvertToYV12(matrix="pc.601")" part, which could be the problem, but not explain why this happens sometimes and on some devices.

SET p1="%~dp0bin/x264.exe"

SET p2="%~dp0bin/Bepipe/BePipe.exe"

SET p3="%~dp0bin/faac.exe"

SET p4="%~dp0bin/MP4Box-0.4.6-rev2735/MP4Box.exe"

rem 2.1. Create Avisynth file

echo QTInput("%~f1", color=2, audio=1).FieldDeinterlace().BilinearResize(740,410).Crop(10,5,-10,-5).ConvertToRGB().ConvertToYV12(matrix="pc.601") > "%TMPFOLDER%/%~n1.avs"

rem 2.2. Encode video

%p1% --profile main --crf 10 --fps 25 -o "%TMPFOLDER%/%~n1.264" "%TMPFOLDER%/%~n1.avs"

rem 2.3. Encode audio using Avisynth script

%p2% --script "QTInput(\"%~f1\", color=2, audio=1).GetChannel(1, 2).Normalize(0.80)" | %p3% -b 256 -o "%TMPFOLDER%/%~n1.aac" -

rem 2.4. Create mp4 file

%p4% -fps 25 -add "%TMPFOLDER%/%~n1.264" -add "%TMPFOLDER%/%~n1.aac" "%~dp1%~n1.mp4" -new

TOPICS
Performance issues

Views

266

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines