trevorjharris
29th December 2007, 11:15
I am having aspect ratio problems displaying a 1440x1080i h264 video using the JEROENWIJERING flash player with the Adobe Flash Player 9.0
r115 plugin. The file displays correctly with VLC and Windows Media Player but Flash Player displays it as 4:3. I used megui to encode the
video with x264 setting the DAR to 16:9. I have also tried setting the PAR to 4:3 with MP4box and the resulting MP4box -info is shown below.
I Have also tried mpeg4info and this shows that the DAR is 4:3 which disagrees with the results from mp4box. Please can someone tell me where
Flash Player gets its DAR values from.
Flash Player treats the file as 4:3 in both normal and full screen modes.
Please can anyone tell me how to fix this.
This is my avs file:
global MeGUI_darx = 16
global MeGUI_dary = 9
DGDecode_mpeg2source("K:\hd\balloons.d2v")
trim(51538,52000)
This is the log from MeGui:
Log for job job11
Job commandline: "C:\Program Files\megui\tools\x264\x264.exe" --bitrate 2000 --ref 3 --bframes 3 --b-pyramid --b-rdo --bime --weightb
--subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --threads auto --thread-input --sar 3333:2500 --progress --no-psnr
--no-ssim --interlaced --output "D:\jw_flv_player\ducks.mp4" "D:\jw_flv_player\ducks.avs"
avis [info]: 1440x1080 @ 25.00 fps (463 frames)
x264 [info]: using SAR=3333/2500
x264 [info]: using cpu capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 Cache64
mp4 [info]: initial delay 2 (scale 25)
x264 [info]: slice I:2 Avg QP:33.50 size: 82407
x264 [info]: slice P:231 Avg QP:32.95 size: 14607
x264 [info]: slice B:230 Avg QP:35.03 size: 4706
x264 [info]: mb I I16..4: 19.5% 70.3% 10.2%
x264 [info]: mb P I16..4: 0.4% 1.1% 0.3% P16..4: 46.1% 4.3% 1.1% 0.0% 0.0% skip:46.7%
x264 [info]: mb B I16..4: 0.0% 0.1% 0.0% B16..8: 30.1% 0.4% 0.7% direct: 0.4% skip:68.2%
x264 [info]: final ratefactor: 29.39
x264 [info]: 8x8 transform intra:65.0% inter:77.3%
x264 [info]: ref P 48.0% 33.9% 7.1% 4.7% 3.1% 3.2%
x264 [info]: ref B 45.4% 46.9% 3.2% 2.3% 1.1% 1.1%
x264 [info]: kb/s:1996.4
encoded 463 frames, 4.02 fps, 1996.66 kb/s
desired video bitrate of this job: 2000 kbit/s - obtained video bitrate (approximate): 1999 kbit/s
------------------------------------------------------
Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Postprocessing finished!
End of log for job11
------------------------------------------------------
This is the html to display the file:
<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s1 = new SWFObject("flvplayer.swf","single","800","400","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","ducks.mp4");
s1.addVariable("overstretch","false");
s1.write("player1");
</script>
This is the output of mp4box before changing the PAR
D:\jw_flv_player>mp4box -info ducks.mp4
* Movie Info *
Timescale 600 - Duration 00:00:18.520
Fragmented File no - 1 track(s)
File Brand avc1 - version 0
Created: GMT Fri Dec 28 16:16:15 2007
File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: No audio capability required (0xff)
No streams included in root OD
Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:18.520
Media Info: Language "Undetermined" - Type "vide:avc1" - 463 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1440 x 1080 - Profile High @ Level 5.1
NAL Unit length bits: 32
Pixel Aspect Ratio 3333:2500 - Indicated track size 1440 x 1080
Self-synchronized
This is the command for setting the PAR:
D:\jw_flv_player>mp4box -par 1=4:3 ducks.mp4
Saving ducks.mp4: 0.500 secs Interleaving
This is the info after setting the PAR
D:\jw_flv_player>mp4box -info ducks.mp4
* Movie Info *
Timescale 600 - Duration 00:00:18.520
Fragmented File no - 1 track(s)
File Brand avc1 - version 0
Created: GMT Fri Dec 28 16:16:15 2007
File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: No audio capability required (0xff)
No streams included in root OD
Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:18.520
Media Info: Language "Undetermined" - Type "vide:avc1" - 463 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1440 x 1080 - Profile High @ Level 5.1
NAL Unit length bits: 32
Pixel Aspect Ratio 4:3 - Indicated track size 1920 x 1080
Self-synchronized
Regards Trevor Harris
r115 plugin. The file displays correctly with VLC and Windows Media Player but Flash Player displays it as 4:3. I used megui to encode the
video with x264 setting the DAR to 16:9. I have also tried setting the PAR to 4:3 with MP4box and the resulting MP4box -info is shown below.
I Have also tried mpeg4info and this shows that the DAR is 4:3 which disagrees with the results from mp4box. Please can someone tell me where
Flash Player gets its DAR values from.
Flash Player treats the file as 4:3 in both normal and full screen modes.
Please can anyone tell me how to fix this.
This is my avs file:
global MeGUI_darx = 16
global MeGUI_dary = 9
DGDecode_mpeg2source("K:\hd\balloons.d2v")
trim(51538,52000)
This is the log from MeGui:
Log for job job11
Job commandline: "C:\Program Files\megui\tools\x264\x264.exe" --bitrate 2000 --ref 3 --bframes 3 --b-pyramid --b-rdo --bime --weightb
--subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --threads auto --thread-input --sar 3333:2500 --progress --no-psnr
--no-ssim --interlaced --output "D:\jw_flv_player\ducks.mp4" "D:\jw_flv_player\ducks.avs"
avis [info]: 1440x1080 @ 25.00 fps (463 frames)
x264 [info]: using SAR=3333/2500
x264 [info]: using cpu capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 Cache64
mp4 [info]: initial delay 2 (scale 25)
x264 [info]: slice I:2 Avg QP:33.50 size: 82407
x264 [info]: slice P:231 Avg QP:32.95 size: 14607
x264 [info]: slice B:230 Avg QP:35.03 size: 4706
x264 [info]: mb I I16..4: 19.5% 70.3% 10.2%
x264 [info]: mb P I16..4: 0.4% 1.1% 0.3% P16..4: 46.1% 4.3% 1.1% 0.0% 0.0% skip:46.7%
x264 [info]: mb B I16..4: 0.0% 0.1% 0.0% B16..8: 30.1% 0.4% 0.7% direct: 0.4% skip:68.2%
x264 [info]: final ratefactor: 29.39
x264 [info]: 8x8 transform intra:65.0% inter:77.3%
x264 [info]: ref P 48.0% 33.9% 7.1% 4.7% 3.1% 3.2%
x264 [info]: ref B 45.4% 46.9% 3.2% 2.3% 1.1% 1.1%
x264 [info]: kb/s:1996.4
encoded 463 frames, 4.02 fps, 1996.66 kb/s
desired video bitrate of this job: 2000 kbit/s - obtained video bitrate (approximate): 1999 kbit/s
------------------------------------------------------
Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Postprocessing finished!
End of log for job11
------------------------------------------------------
This is the html to display the file:
<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s1 = new SWFObject("flvplayer.swf","single","800","400","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","ducks.mp4");
s1.addVariable("overstretch","false");
s1.write("player1");
</script>
This is the output of mp4box before changing the PAR
D:\jw_flv_player>mp4box -info ducks.mp4
* Movie Info *
Timescale 600 - Duration 00:00:18.520
Fragmented File no - 1 track(s)
File Brand avc1 - version 0
Created: GMT Fri Dec 28 16:16:15 2007
File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: No audio capability required (0xff)
No streams included in root OD
Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:18.520
Media Info: Language "Undetermined" - Type "vide:avc1" - 463 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1440 x 1080 - Profile High @ Level 5.1
NAL Unit length bits: 32
Pixel Aspect Ratio 3333:2500 - Indicated track size 1440 x 1080
Self-synchronized
This is the command for setting the PAR:
D:\jw_flv_player>mp4box -par 1=4:3 ducks.mp4
Saving ducks.mp4: 0.500 secs Interleaving
This is the info after setting the PAR
D:\jw_flv_player>mp4box -info ducks.mp4
* Movie Info *
Timescale 600 - Duration 00:00:18.520
Fragmented File no - 1 track(s)
File Brand avc1 - version 0
Created: GMT Fri Dec 28 16:16:15 2007
File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: No audio capability required (0xff)
No streams included in root OD
Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:18.520
Media Info: Language "Undetermined" - Type "vide:avc1" - 463 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 1440 x 1080 - Profile High @ Level 5.1
NAL Unit length bits: 32
Pixel Aspect Ratio 4:3 - Indicated track size 1920 x 1080
Self-synchronized
Regards Trevor Harris