Skip to content

Instantly share code, notes, and snippets.

@cduruk
Created January 5, 2012 19:58
Show Gist options
  • Save cduruk/1566942 to your computer and use it in GitHub Desktop.
Save cduruk/1566942 to your computer and use it in GitHub Desktop.
Media Infos for
Hi,
I am trying to encode some videos that were recorded with different iPhones into MP4 formats to make them playable on mobile web browsers like iPhone 3GS, iPhone 4 and Android.
Based on our testing, we found out that the videos Transloadit encodes are using the High video profile which makes them unplayable on the iPhone 3GS mobile web browser.
I have tried several things to lower the profile to Normal but I unfortunately couldn't get it to work. Some things I tried:
Based on:
http://avp.stackexchange.com/questions/2634/how-do-i-specify-baseline-h264-profile-using-ffmbc
I tried putting an vprofile baseline argument in the ffmpeg settings but it resulted in an error:
https://transloadit.com/assemblies/view/2cc8df28902a851d8e67f8df74ca0751
Also based on:
http://wiki.maemo.org/Manual_video_encoding
I tried putting a coder=0 in the ffmpeg settings in the iphone-high preset but again, it didn't seem to help.
So my question is how can I use baseline profile encoding for my videos so that they play fine on iPhone 3GS Safari?
Note:
You can see some of the mediainfo outputs in this gist:
https://gist.github.com/1566942
Install mediainfo using `brew install mediainfo`.
youtube.txt is the one that iPHone 3GS can play.
transloadit.txt is the one generated using iphone-high preset on Transloadit.
General
Complete name : test.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 2.46 MiB
Duration : 26s 539ms
Overall bit rate mode : Variable
Overall bit rate : 777 Kbps
Recorded date : 2011-12-18T13:32:23-0800
Writing application : Lavf52.99.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 26s 520ms
Bit rate : 700 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.030
Stream size : 2.18 MiB (89%)
Writing library : x264 core 114 r1913 5fd3dce
Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=4 / psy=1 / psy_rd=0.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=20 / rc=cbr / mbtree=1 / bitrate=700 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=700 / vbv_bufsize=700 / nal_hrd=none / ip_ratio=1.41 / aq=1:1.00
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 26s 539ms
Bit rate mode : Variable
Bit rate : 82.8 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 268 KiB (11%)
General
Complete name : youtube.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 8.00 MiB
Duration : 2mn 3s
Overall bit rate mode : Variable
Overall bit rate : 543 Kbps
Encoded date : UTC 2012-01-02 21:51:41
Tagged date : UTC 2012-01-02 21:51:41
gsst : 0
gstd : 123645
gssd : BCEA991CAHH1325730935739848
gshh : o-o.preferred.twtelecom-oak1.v23.lscache3.c.youtube.com
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2mn 3s
Bit rate : 446 Kbps
Maximum bit rate : 2 509 Kbps
Width : 640 pixels
Height : 360 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.081
Stream size : 6.57 MiB (82%)
Tagged date : UTC 2012-01-02 21:51:41
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2mn 3s
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Maximum bit rate : 141 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 1.39 MiB (17%)
Title : IsoMedia File Produced by Google, 5-11-2011
Encoded date : UTC 2012-01-02 21:51:41
Tagged date : UTC 2012-01-02 21:51:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment