Videos recorded at 60fps have wrong frame rate embedded, causing audio sync problems - LG G6 Questions and Answers

When I record a video on my G6 (from T-mobile) and set the video resolution to FHD 16:9 60fps, the resulting MP4 video files have an incorrect frame rate. I see 59.51fps, instead of the expected 60.00 or 59.94. The result of this is that any video that's more than a few seconds long has audio/video getting out of sync, and the de-sync gets worse further into the video.
Here is the (trimmed) output from the ffprobe utility (from the ffmpeg project):
Code:
> ffprobe take1.mp4
ffprobe version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2007-2017 the FFmpeg developers
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'take1.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-10-22 01:04:08
location : [redacted]
location-eng : [redacted]
Duration: 00:02:43.91, start: 0.000000, bitrate: 24154 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/smpte170m), 1920x1080, 23980 kb/s, SAR 1:1 DAR 16:9, 59.51 fps, 90k tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2017-10-22 01:04:08
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 155 kb/s (default)
Metadata:
creation_time : 2017-10-22 01:04:08
handler_name : SoundHandle
I was able to fix the time stamps (PTSs) using the mkvmerge utility, but that isn't the best solution. This does seem like an actual bug. Here's hoping that anyone from LG's engineering team checks this subreddit!

Related

Videoplayback after update to 3.1

Any changes? Has anything improved?
I have been told that 720p High profile is smooth and OK.
True?
Totally smooth. I was testing it last night with Youtube embeded videos using the stock google browser at 720 and it was great. I even hooked up the HDMI to take a look at it on the big screen. About time.
Sorry, for not being precise.
I meant stuff like mkv files, etc.
720p. in High Profile
I just tried an mkv I originally had to use Handbrake to encode that's 720p/AC3 audio using Moboplayer. Soft decoding was choppy but Hard decoding played it flawlessly! Unfortunately... no sound.
Rockplayer didn't perform as well.
How would 3.1 affect High Profile playback? My understanding is its purely a Tegra 2 hardware issue. 3.1 might bring better handling of wrappers and software decoding but it can't add hardware decoding capabilities that aren't designed in already.
mhausig said:
How would 3.1 affect High Profile playback? My understanding is its purely a Tegra 2 hardware issue. 3.1 might bring better handling of wrappers and software decoding but it can't add hardware decoding capabilities that aren't designed in already.
Click to expand...
Click to collapse
LOLWUT. Tegra 2 supports HD, 720p and 1080p (recording and playback) with lot of codect and formats (mp4,mkv / divix, h.264). Just read about it on official site. NVidia says this.
Also, use mort for tegra 2 with special codecs
Read again, he said "High Profile".
And Tegra 2 can't handle it.
I don't understand this whole "high profile" issue, but I am now watching a movie on my xoom encoded using the Handbrake Apple TV2 profile and the video's specs are 1280x688/23fps/4241kbps........pretty damn nice picture.
fromdetroit7 said:
I don't understand this whole "high profile" issue, but I am now watching a movie on my xoom encoded using the Handbrake Apple TV2 profile and the video's specs are 1280x688/23fps/4241kbps........pretty damn nice picture.
Click to expand...
Click to collapse
Basically, the profiles determine how many compression features can be used to produce a smaller size with equal (or comparable) quality than a higher size version. The higher the profile, the more complex compression features it have and is harder on CPU/GPU decoding.
You can re-encode a video using a basic profile and it will play smooth, the quality can be the same as a high profile version, but the file size can get bigger too.
The point here is that to ensure a smooth video playback on Nvidia Tegra 2 a re-encode is needed and this is what some people hate, they just want to be able to do a simple copy-paste (or drag-drop) of videos without worrying about re-encoding. This also happens because most of the videos found in Internet are encoded in high profile.
Sure, other people doesn't mind doing re-encoding and they are fine doing that.
I'd have thought that all Apple presets are limited to main or baseline profile, but apparently the "AppleTV 2" preset (from HB 0.95) uses high profile. It also removed the vbv rate limitation.
AppleTV: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:
bv-bufsize=9500
AppleTV 2: -e x264 -q 20.0 -r 29.97 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m
The big diff between 1 & 2 is that the -x blah:blah:blah setting is removed in the latter, which basically disables a bunch of compression settings to conform to main/baseline.
In simpler terms, if you're using the AppleTV 2 preset, you're using high profile, which means that the Teg2 can at least handle some 720p high profile. I suspect that smoothness will depend on the content, if the Teg2 is as marginal as many indicate. The acid test would be trying to encode Avatar at [email protected]
BTW, the above preset specifies a second (AC3) audio track. If you only need the main audio track, remove the second to reclaim some space, and more importantly, to increase the probability of smooth playback.
e.mote said:
I'd have thought that all Apple presets are limited to main or baseline profile, but apparently the "AppleTV 2" preset (from HB 0.95) uses high profile. It also removed the vbv rate limitation.
AppleTV: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:
bv-bufsize=9500
AppleTV 2: -e x264 -q 20.0 -r 29.97 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m
The big diff between 1 & 2 is that the -x blah:blah:blah setting is removed in the latter, which basically disables a bunch of compression settings to conform to main/baseline.
In simpler terms, if you're using the AppleTV 2 preset, you're using high profile, which means that the Teg2 can at least handle some 720p high profile. I suspect that smoothness will depend on the content, if the Teg2 is as marginal as many indicate. The acid test would be trying to encode Avatar at [email protected]
BTW, the above preset specifies a second (AC3) audio track. If you only need the main audio track, remove the second to reclaim some space, and more importantly, to increase the probability of smooth playback.
Click to expand...
Click to collapse
Thanks, both posts were great break downs that helped me understand better.
Guy I am talking to says he is using Mobo Player and this is the video he tried. Apparently before update to 3.1 it was not that smooth. He says it is like switching from software decode to hardware decode.
If this serenity trailer is not the filr format we are all talking about, please supply me with a link to an mkv High Profile file, so I can ask him to download and try again.
General
Complete name : E:\PLIKI\Download\Serenity - HD DVD Trailer.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 80.0 MiB
Duration : 2mn 19s
Overall bit rate : 4 802 Kbps
Movie name : Serenity - HD DVD Trailer
Performer : Universal Pictures
Genre : Trailer
Recorded date : 2005
Encoded date : UTC 2007-05-30 05:20:31
Tagged date : UTC 2007-05-30 05:20:31
Cover : Yes
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2mn 19s
Bit rate mode : Variable
Bit rate : 4 675 Kbps
Maximum bit rate : 10.8 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.212
Stream size : 77.8 MiB (97%)
Writing library : x264 core 55 svn-655
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x13 / me=hex / subme=6 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=4675 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30
Encoded date : UTC 2007-05-30 05:20:31
Tagged date : UTC 2007-05-30 05:20:35
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2mn 19s
Bit rate mode : Variable
Bit rate : 128 Kbps
Maximum bit rate : 149 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 2.12 MiB (3%)
Encoded date : UTC 2007-05-30 05:20:34
Tagged date : UTC 2007-05-30 05:20:35
Any ideas as to how it plays scene HD MKVs?
Here's a sample MediaInfo for one:
General #0
Complete name : F:\TV.SHOW.S01E02.720p.HDTV.X264-DIMENSION.mkv
Format : Matroska
File size : 1.09 GiB
PlayTime : 43mn 41s
Bit rate : 3581 Kbps
Encoded date : UTC 2011-05-12 19:59:44
Writing application : mkvmerge v3.0.0 ('Hang up your Hang-Ups') built on Apr 19 2010 11:58:49
Writing library : libebml v0.7.7 + libmatroska v0.8.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 42mn 22s
Bit rate : 3 306 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.150
Stream size : 980 MiB (88%)
Writing library : x264 core 102 r1666 d058f37
Encoding settings : cabac=1 / ref=8 / deblock=1:-2:-2 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=16 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=3306 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.10
Language : English
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 42mn 22s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 116 MiB (10%)
So... update to 3.1 did not change anything?
mkv (h.264) High Profile do not work - so IT IS TEGRA?
has anyone thought this could be a limitation of Android?
here is the media format support from android dev guide
H.263 3GPP (.3gp) and MPEG-4 (.mp4)
H.264 AVC Baseline Profile (BP) 3GPP (.3gp) and MPEG-4 (.mp4). MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+)
MPEG-4 SP 3GPP (.3gp)
VP8 WebM (.webm)
Click to expand...
Click to collapse
Tegra 2 definitely can decode more formats than android support

4GB 1080p M2TS file test - mobo/dice/rock/stock/QQ/Vital player tested

I've tested playback of 4GB 1080p M2TS file on SGS2
1. Stock Player
not supported file.
can't play at all.
2. Vital Player
not recognized. ( .m2ts / .ts )
3. QQ Player
4GB file is recognized as 3GB.
can't play at all.
4. Mobo Player
file size is recognized as 272K
5. RockPlayer
file size is recognized as 4GB.
HW decoding mode -> fail
SW decoding mode -> 5 second audio play. no video
6. vPlayer
file size : 4GB
duration : 6 seconds
slow video( maybe 10~15 fps ) / audio is played.
can't seek file
7. Diceplayer
Settings->Additional file extention option check
rename m2ts->ts
file size :4GB
duration 01:52:15
no video lag.
seek is functional.
I can share my m2ts files for PS3 with SGS2.
test file spec.
General
ID : 1 (0x1)
Complete name : E:\Downloads\District 9.PS3.1080p.m2ts\District 9.PS3.1080p.m2ts.m2ts.ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 3.99 GiB
Duration : 1h 52mn
Overall bit rate : 5 094 Kbps
Maximum Overall bit rate : 35.5 Mbps
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : 27
Duration : 1h 52mn
Bit rate mode : Variable
Bit rate : 4 141 Kbps
Maximum bit rate : 25.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.083
Stream size : 3.33 GiB (83%)
Writing library : x264 core 67 r1169M ab85c9b
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=4141 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=25000 / vbv_bufsize=25000 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 129
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 514 MiB (13%)
juami said:
I've tested playback of 4GB 1080p M2TS file on SGS2
7. Diceplayer
Settings->Additional file extention option check
rename m2ts->ts
file size :4GB
duration 01:52:15
no video lag.
seek is functional.
Click to expand...
Click to collapse
Thanks for sharing.
So the best player to play M2TS video formats is dice player.
Tapatalked from my super smooth, ultra fast samsung galaxy s2.
hi,
just checked Dice Player on my Sensation. its really great app. showing 1080p videos almost flawlessly.
my question is, if dice is lowering the fps to show video more fluently?
Thanks
affliction_emrah said:
hi,
just checked Dice Player on my Sensation. its really great app. showing 1080p videos almost flawlessly.
my question is, if dice is lowering the fps to show video more fluently?
Thanks
Click to expand...
Click to collapse
Well, if it looks fluid that means the framerate is high basically per definition. Low framerates look choppy, high rates to not.
sorry to bring up an old thread. I just got the dice player app and plays my mkv and m2ts files great. The only problem is that i can't seek when i play m2ts files. Is there a fix for it? Thanks.
Anyone tried mx player? Great on my transformer..
Sent from my GT-I9100 using Tapatalk
juami said:
I've tested playback of 4GB 1080p M2TS file on SGS2
1. Stock Player
not supported file.
can't play at all.
2. Vital Player
not recognized. ( .m2ts / .ts )
3. QQ Player
4GB file is recognized as 3GB.
can't play at all.
4. Mobo Player
file size is recognized as 272K
5. RockPlayer
file size is recognized as 4GB.
HW decoding mode -> fail
SW decoding mode -> 5 second audio play. no video
6. vPlayer
file size : 4GB
duration : 6 seconds
slow video( maybe 10~15 fps ) / audio is played.
can't seek file
7. Diceplayer
Settings->Additional file extention option check
rename m2ts->ts
file size :4GB
duration 01:52:15
no video lag.
seek is functional.
I can share my m2ts files for PS3 with SGS2.
test file spec.
General
ID : 1 (0x1)
Complete name : E:\Downloads\District 9.PS3.1080p.m2ts\District 9.PS3.1080p.m2ts.m2ts.ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 3.99 GiB
Duration : 1h 52mn
Overall bit rate : 5 094 Kbps
Maximum Overall bit rate : 35.5 Mbps
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : 27
Duration : 1h 52mn
Bit rate mode : Variable
Bit rate : 4 141 Kbps
Maximum bit rate : 25.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.083
Stream size : 3.33 GiB (83%)
Writing library : x264 core 67 r1169M ab85c9b
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=4141 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=25000 / vbv_bufsize=25000 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 129
Duration : 1h 52mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 514 MiB (13%)
Click to expand...
Click to collapse
You might want to edit the filename/path
reidar.ostrem said:
Anyone tried mx player? Great on my transformer..
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
I don't have a video file to test, but MX has always worked flawlessly on my SGS2 with both HW and SW decode (SW decoding looks surprisingly good as well, but the phone gets very hot).

Smooth Video Playback Using DivX & Rockplayer / MoboPlayer

I've been keeping an eye on the Handbrake 720p thread for a while: http://forum.xda-developers.com/showthread.php?t=1060825 as I have been noticing jerky video playback since I got my Transformer a couple of months ago. As some of the guys in the thread are doing sterling work to try and solve the issue for us all I didn't want to hijack the thread with my workaround for smooth video playback as it means encoding to DivX. Let me explain:
I now encode to DivX using the DivX Plus Converter. I'm not sure about posting direct links to paid software so a quick Google search will point you in the right direction.
The settings are as follows:
Output Profile: DivX HD 720p
Custom Resolution: 1104 X 624 (this is important as I have found 1280 x 720 produces a slight judder at times)
Video Bitrate (kbps): 3000 kbps
Audio Bitrate (kbps): 128 kbps
The slightly lower resolution has no impact on quality at all and comparing the original MKV and the encoded file there is minimal difference in quality if any. After the file is encoded rename the extension from divx to mp4 and play it with Rockplayer or MoboPlayer (in software mode) this is important as the stock media player won't load the file.
I know there is a cost involved here with the encoder used and may not suit everyone but I'm also sure there are other free encoders out there that will do the same job , I just havent had time to try any.
Original file:
General
Unique ID : 198601087651856379593994534176452094873 (0x95692D9C86D819CA13C4B691D5EDAB99)
Complete name : D:\Transformer Convert\The Chicago Code.S01E01.mkv
Format : Matroska
File size : 1.09 GiB
Duration : 44mn 45s
Overall bit rate : 3 495 Kbps
Encoded date : UTC 2011-02-08 01:41:10
Writing application : mkvmerge v3.0.0 ('Hang up your Hang-Ups') built on Apr 19 2010 11:58:49
Writing library : libebml v0.7.7 + libmatroska v0.8.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Format settings, GOP : M=6, N=22
Codec ID : V_MPEG4/ISO/AVC
Duration : 44mn 45s
Bit rate : 3 045 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.138
Stream size : 953 MiB (85%)
Writing library : x264 core 105 r1732 2b04482
Encoding settings : cabac=1 / ref=8 / deblock=1:-2:-2 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=3045 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language : English
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 44mn 45s
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 143 MiB (13%)
Encoded File (2min 23sec clip):
General
Complete name : D:\Transformer Convert\ASUS.TF101.DIVX.Sample.divx
Format : AVI
Format/Info : Audio Video Interleave
File size : 89.2 MiB
Duration : 2mn 23s
Overall bit rate : 5 209 Kbps
Writing library : Boilsoft AVI tool build 1/release
Video
ID : 0
Format : MPEG-4 Visual
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Muxing mode : Packed bitstream
Codec ID : DX50
Codec ID/Hint : DivX 5
Duration : 2mn 23s
Bit rate : 5 071 Kbps
Width : 1 100 pixels
Height : 620 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.310
Stream size : 86.8 MiB (97%)
Writing library : DivX 3330
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Duration : 2mn 23s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : 14ms
Stream size : 2.19 MiB (2%)
Alignment : Split accross interleaves
Interleave, duration : 42 ms (1.00 video frame)
Interleave, preload duration : 500 ms
I have uploaded a sample here if anyone wants to check it out:
ASUS.TF101.DIVX.Sample.rar
I've also uploaded a converted 720p trailer of Prince Of Persia Sands Of Time as it has a lot of panning in it:
Prince Of Persia Trailer
And a converted 1080p trailer of Avatar
Avatar Trailer
Both the trailers have slightly different resolutions to the settings above: Avatar (1280x532), Prince Of Persia (1104x498), these were the defaults chosen by the encoder and I saw no reason to change them.
I am no expert in the field but was happy that I now have smooth video playback on my Transformer until the 720p issue is solved so I thought I would share my findings as I have had a lot of help from the forums on different matters in the last couple of months. I should also say my Transformer is rooted running Prime 1.5 but the results were the same running stock 3.1.
Mods, if there is anything in this post that needs editing please let me know.
Cheers SmithersJ0nes

Compressing video for the xoom?

I have 700mb video files that I would like to trim down to 500-625 mb to fit more on my xoom before I go away to school soon. I don't have much knowledge in video converting so thats why I'm posting. I have an idea but I would like input before I leave my PC on all night to be disappointed with the quality.
Here is a sample mediainfo export of the specs of my desired video files. I would like to know how would I go compressing without losing to much quality.
Format : AVI
Format/Info : Audio Video Interleave
File size : 742 MiB
Duration : 58mn 48s
Overall bit rate : 1 763 Kbps
Writing application : VirtualDubMod 1.5.10.2 (build 2540/release)
Writing library : VirtualDubMod build 2540/release
Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : H264
Duration : 58mn 48s
Bit rate : 1 550 Kbps
Width : 800 pixels
Height : 450 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.144
Stream size : 656 MiB (88%)
Writing library : x264 core 50 svn-569
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x133 / me=hex / subme=5 / brdo=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / chroma_qp_offset=0 / slices=1 / nr=0 / decimate=1 / bframes=2 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=2 / wpredb=1 / bime=0 / keyint=250 / keyint_min=25 / scenecut=40 / rc=abr / bitrate=1550 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30
Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 2000
Duration : 58mn 48s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 80.8 MiB (11%)
Alignment : Aligned on interleaves
Interleave, duration : 33 ms (1.00 video frame)
Interleave, preload duration : 512 ms
Use my script, and set video recode to Yes. Video looks fairly compressible at 1550Kbps, as SD res is usually well under 1000, depending on content. If it's a TV episode (ie low-action), probably 700-800.
Assume 900Kbs for video + 130Kbs for audio, (900+130)Kb/s * 3600 sec/hr / 8 bit/Byte / 1024 Kb/Mb = 453 MB for hour-long vid.
You can further reduce size by using 640 res, or quality 22+. Using VerySlow speed would eke out another 10-15% size reduction vs Medium, although for mobiles it's not recommended.

[Q] Hardware / Software Video Decoding: Howto 480p H.264/AVC1?

WikiPedia said:
Media support
Android supports the following audio/video/still media formats: WebM, H.263, H.264 (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC, HE-AAC (in MP4 or 3GP container), MP3, MIDI, Ogg Vorbis, FLAC, WAV, JPEG, PNG, GIF, BMP.
Click to expand...
Click to collapse
I am confused, I really thought the ZTE Blade should be capable of 480p playback, but I could not make it work so far.
Currently I am using a CM7.2-RC0 KANG with overclocking to 710MHz on smartassV2 governor and I have installed MoboPlayer + MoboPlayer Codec for ARM V6VFP.
I have tried two video files with the following specifications:
Code:
container format: matroska (mkv)
video: 852 x 480 / H264 / 24 fps
audio: MPEG-4 AAC / Stereo / 48000 Hz
Both files are unplayable, video lags & looks like slow motion, audio completely out of sync.
MoboPlayer insisted on the Codec pack on first start, and can only playback such files in software decoding mode.
So my questions are:
Is the ZTE Blade capable of hardware video decoding or not?
Is there any video player capable of correct playback of such 480p H264 content?
Try to reencode the video files using this guide: Link
Thanks for the info, will try handbrake now.
But nevertheless, maybe someone can explain what the problem could be, because I really was not expecting a 480p / H264 file causing any trouble.
From Qualcomm website:
MSM7227 can hardware accelerate video playback on files which are made with MPEG-4 Simple Profile Up to [email protected] (800x480), 2Mbps
agpoli said:
From Qualcomm website:
MSM7227 can hardware accelerate video playback on files which are made with MPEG-4 Simple Profile Up to [email protected] (800x480), 2Mbps
Click to expand...
Click to collapse
Ok, so a re-encode is inevitable, but what to take care of in HandBrake that the resulting file can be played with hardware acceleration?
I am actually re-encoding my two 480p / H264 sample files with the following settings:
Picture Settings
Auto Crop: Yes
Storage width: 800 height: 448
Optimal for source: Off
Anamorphic: Off
Alignment: 16
Keep Aspect: Yes
Filters: All off
Destination
Format: MP4
Web optimized: Yes
Video Encode: H.264 (x264)
Framerate: Same as source
Variable Framerate: Yes
Bitrate (kbps): 1500
2-Pass Encoding: Yes
Audio: AAC (faac) Bitrate=160 SampleRate=48 Mix=Stereo
CABAC Entropy Encoding: Off
So the mentioned Qualcomm limits are met, altough I don't know what "MPEG-4 Simple Profile" exactly means. The resulting files will have [email protected] <= 1.5Mbps.
BTW It's taking a very long time to re-encode on my dual-core hyperthreading Atom 330 desktop (running Ubuntu 10.04 LTS), which means I better get it right without much experimenting.
How exactly can I check if hardware acceleration is actually used for playback?
You don't need to reencode that video you just need to remux it, it is an mkv container which android won't play. Download YAMB (Yet Another Mp4box GUI) and remux it which will take a couple of minutes.
edit: AFAIK the stock video doesn't have s/w decoding the resulting MP4 should play in that.
youngsta2010 said:
You don't need to reencode that video you just need to remux it, it is an mkv container which android won't play. Download YAMB (Yet Another Mp4box GUI) and remux it which will take a couple of minutes.
edit: AFAIK the stock video doesn't have s/w decoding the resulting MP4 should play in that.
Click to expand...
Click to collapse
I could not find something like YAMB for Ubuntu, so I tried with Avidemux, but the resulting .mp4 files could not be played with the stock video player, and resulted in the same problems as the original 480p / H264 files in matroska containers (lagging video looking like slow motion with audio completely out of sync). So that didn't change anything, which does not surprise me, since MoboPlayer can open .mkv files, so the container format can not make any difference.
Unfortunately the re-encoded .m4v video didn't play in the stock video player, and caused about the same lag in MoboPlayer, although it seems slightly better, but still unwatchable.
It seems I am still overlooking something, because the resulting file of the re-encoding meets the mentioned Qualcomm specifications.
So what has to be done, to be able to playback a 800x448 H264 video with 24 fps and MPEG-4 AAC stereo audio with 48000 Hz / 160 kbps?
I really don't want to scale the video down, I want to have the maximum possible with the physical screen resultion, which is 800x448 by keeping the aspect ratio.
I think your problem is the aspect ratio, I think it needs to be less than 800 width. So if you reencode, make the width 800 and keep aspect ratio that should then be fine. I just saw mkv and thought, there's ya problem! Every video i've played that's been over 800 width has been as you describe, like it's playing in slow motion.
edit: Did you reencode to 800 x 448? If so then it should play fine.
That's the catch, the video is now a .M4V file re-encoded to 800x448 with variable bitrate less than 1.5Mbps at 24 fps and MPEG-4 AAC stereo audio with 48000 Hz 160 kbps, so it complies to the Qualcomm specifications for hardware accelerated playback, but it just does not work!
800x448 is the correct aspect ratio, scaled down from the original 852x480.
I have no clue what else to try, and what the problem could be, so my guess is that there has to be a catch with hardware acceleration: MoboPlayer insists on software decoding, and the stock video player doesn't play those files at all.
Can anybody here report successful video hardware acceleration?
I've played MP4's on the stock video player so I know it works. Can you use mediainfo and post the readout from that?
http://mediainfo.sourceforge.net/en/Download/Ubuntu
Ok, here is the output of MediaInfo:
Code:
General
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 256 MiB
Duration : 21mn 28s
Overall bit rate mode : Variable
Overall bit rate : 1 665 Kbps
Encoded date : UTC 2012-03-04 13:38:18
Tagged date : UTC 2012-03-04 14:20:24
Writing application : HandBrake 0.9.6 2012030200
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : No
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 21mn 28s
Bit rate mode : Variable
Bit rate : 1 500 Kbps
Width : 800 pixels
Height : 448 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 23.419 fps
Maximum frame rate : 24.390 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.175
Stream size : 230 MiB (90%)
Writing library : x264 core 120
Encoding settings : cabac=0 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1,00:0,00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=1500 / ratetol=1,0 / qcomp=0,60 / qpmin=3 / qpmax=69 / qpstep=4 / cplxblur=20,0 / qblur=0,5 / ip_ratio=1,40 / aq=1:1,00
Encoded date : UTC 2012-03-04 13:38:18
Tagged date : UTC 2012-03-04 14:20:24
Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 21mn 28s
Bit rate mode : Variable
Bit rate : 160 Kbps
Maximum bit rate : 293 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 24.6 MiB (10%)
Language : English
Encoded date : UTC 2012-03-04 13:38:18
Tagged date : UTC 2012-03-04 14:20:24
It needs to be MPEG-4 Simple Profile, you're using 'high'. Try using the automatic settings in avidemux for apple ipod, just change the size (if you can, it's playing up for me).
Yeah i was going to say it's because of the high profile, you beat me to it There should be an option in handbrake to use iPhone/iPod profile I've never used it myself or avidemux. I know you can set the profile in MeGUI but it's a little complicated.
Ok, one step closer, but how to set "MPEG-4 Simple Profile" in HandBrake? There seems to be no one-click option, but there is an Advanced Tab, which I just made a screenshot of.
I hope to get it done in HandBrake, because I am not comfortable with Avidemux, which always gives some strange error messages when processing Matroska containers.
I've just installed Handbrake on windows tho so it's probably different. On the right hand side there is a presets window is that the same?
It should be the same on Windows & Linux. There is a preset window on the right, where I created my own for the ZTE Blade since non of the presets had the correct resolution settings.
My guess is, that those presets do not do anything different what one can configure by hand in the various tabs, so now I am puzzled because there is no MPEG4 profile option, but I think there has to be a way to set it.
I can't find anyway to change it to simple or baseline, do you have android high and mid presets? Try either of those, you can set the width and height on the picture tab.
edit: Ok go to the advanced tab, on the CLI at the bottom add this to the end.
:x264-profile=baseline
Click to expand...
Click to collapse
See if that sets it. I should think tho that using the android preset should work out fine.
Ok, I now have deleted my "ZTE Blade" preset, and created a new one based on "Android Mid". The settings in the Advanced Tab are different now, and I don't think the "x264-profile" option has to be set manually, because the used profile seems to be the result of the various settings in the Advanced Tab.
A new re-encode is already running, and I'll check with MediaInfo again, once it's finished.
This file plays fine in the stock video player, just so you know it works.
dl.dropbox.com/u/26323604/Box%20for%20Android%20Intro.mp4
Problem solved!
Here is the MediaInfo of the new re-encode based on the "Android Mid" preset:
Code:
General
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 256 MiB
Duration : 21mn 28s
Overall bit rate mode : Variable
Overall bit rate : 1 664 Kbps
Encoded date : UTC 2012-03-05 20:28:55
Tagged date : UTC 2012-03-05 20:58:38
Writing application : HandBrake 0.9.6 2012030200
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 21mn 28s
Bit rate mode : Variable
Bit rate : 1 500 Kbps
Width : 800 pixels
Height : 448 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 23.810 fps
Maximum frame rate : 24.390 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.175
Stream size : 230 MiB (90%)
Writing library : x264 core 120
Encoding settings : cabac=0 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=umh / subme=6 / psy=1 / psy_rd=1,00:0,00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1500 / ratetol=1,0 / qcomp=0,60 / qpmin=3 / qpmax=69 / qpstep=4 / cplxblur=20,0 / qblur=0,5 / ip_ratio=1,40 / aq=1:1,00
Encoded date : UTC 2012-03-05 20:28:56
Tagged date : UTC 2012-03-05 20:58:38
Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 21mn 28s
Bit rate mode : Variable
Bit rate : 160 Kbps
Maximum bit rate : 293 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 24.6 MiB (10%)
Language : English
Encoded date : UTC 2012-03-05 20:28:56
Tagged date : UTC 2012-03-05 20:58:38
It's playing in the Android stock video player and MoboPlayer confirms it's Hard-Decoding (can be checked by touching the screen during playback and then the three dots on the right side, then the media and playback info is shown).
So this is really cool, stunning picture quality with full resolution, completely smooth playback with no chopping, and audio/video perfectly in sync.

Categories

Resources