Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th December 2009, 15:33   #1  |  Link
bsti
Registered User
 
Join Date: Nov 2009
Posts: 2
Append h264

Hi guys!

I'm trying to join two mp4 files. The first video is encoded using x264 CLI, the second video is encoded with Apple Compressor 3.0.5 (Apple h264 codec).
If I encode the first video with the same settings used for the second video in Apple Compressor, it works flawless, but with x264, I can't get it to work....

My goal is to duplicate the settings used in Compressor, so I can join the videos.

I already searched the forum for this issue. I found something about the SPS-ID. Some say they have to match, others say they have to be different. What is correct?


I used following commands to encode the first video:
Code:
x264.exe --profile main --level 13 --bitrate 320 --fps 30 --keyint 24 --bframes 1 --no-cabac --no-b-adapt --ref 2 --me hex --sps-id 0 -o output.mp4 input.avi
Here are the infos (avinaptic):

file 1:

Code:
[ About file ]

Name: 1_out.mp4
Date: 4/12/2009 15:16:11
Size: 107,864 bytes (0.103 MB)

[ Generic infos ]

Play duration: 00:00:03 (2.538333 s)
Container type: MP4/MOV
Major brand: ISO Base Media version 1
Compatible brands: JVT AVC
Creation time: 3/12/2009 14:16:11 UTC
Modification time: 3/12/2009 14:16:11 UTC
Number of streams: 2
Type of stream nr. 1: video (avc1) {GPAC ISO Video Handler}
Type of stream nr. 2: audio (AAC Low complexity) {GPAC ISO Audio Handler}
Audio streams: 1

[ Relevant data ]

Resolution: 320 x 240
Width: multiple of 32
Height: multiple of 16
Average DRF: 31.881578
Standard deviation: 2.089869
Std. dev. weighted mean: 2.083990

[ Video track ]

Codec: avc1
Resolution: 320 x 240
Frame aspect ratio: 4:3 = 1.333333
Pixel aspect ratio: 1:1 = 1
Display aspect ratio: 4:3 = 1.333333
Framerate: 29.970029 fps
Number of frames: 76
Bitrate: 268.200220 kbps

[ Audio track ]

Codec: AAC Low complexity
Bitrate: 64.389705 kbps
Channels: 2
Sample rate: 48000 Hz

[ About H.264 encoding ]

User data: x264
User data: core 70 r1206 9a54c48
User data: H.264/MPEG-4 AVC codec
User data: Copyleft 2003-2009
User data: http://www.videolan.org/x264.html
User data: cabac=0
User data: ref=3
User data: deblock=0:0:0
User data: analyse=0x1:0
User data: me=hex
User data: subme=7
User data: psy=1
User data: psy_rd=1.0:0.0
User data: mixed_ref=0
User data: me_range=16
User data: chroma_me=0
User data: trellis=0
User data: 8x8dct=0
User data: cqm=0
User data: deadzone=21,11
User data: chroma_qp_offset=-2
User data: threads=12
User data: nr=0
User data: decimate=0
User data: mbaff=0
User data: bframes=3
User data: b_pyramid=0
User data: b_adapt=1
User data: b_bias=0
User data: direct=0
User data: wpredb=0
User data: keyint=250
User data: keyint_min=25
User data: scenecut=40
User data: rc_lookahead=40
User data: rc=abr
User data: mbtree=1
User data: bitrate=320
User data: ratetol=1.0
User data: qcomp=0.60
User data: qpmin=10
User data: qpmax=51
User data: qpstep=4
User data: ip_ratio=1.40
User data: aq=1:0.00
SPS id: 0
  Profile: Main@L1.3
  Num ref frames: 3
  Aspect ratio: Square pixels
  Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
  Entropy coding type: CAVLC
  Weighted prediction: No
  Weighted bipred idc: No
  8x8dct: No
Number of frames: 76
Drop/delay frames: 0
Corrupted frames: 0

P-slices: 34 ( 44.737 %) ###########              
B-slices: 40 ( 52.632 %) #############            
I-slices:  2 (  2.632 %) #                        
SP-slices:  0 (  0.000 %)                          
SI-slices:  0 (  0.000 %)                          

[ DRF analysis ]

Average DRF: 31.881578
Standard deviation: 2.089869
Max DRF: 36

DRF<27:  0 (  0.000 %)                          
DRF=27:  1 (  1.316 %)                          
DRF=28:  6 (  7.895 %) ##                       
DRF=29:  2 (  2.632 %) #                        
DRF=30: 14 ( 18.421 %) #####                    
DRF=31:  9 ( 11.842 %) ###                      
DRF=32:  8 ( 10.526 %) ###                      
DRF=33: 14 ( 18.421 %) #####                    
DRF=34: 18 ( 23.684 %) ######                   
DRF=35:  3 (  3.947 %) #                        
DRF=36:  1 (  1.316 %)                          
DRF>36:  0 (  0.000 %)                          

P-slices average DRF: 31.970588
P-slices std. deviation: 2.229287
P-slices max DRF: 36

B-slices average DRF: 31.8
B-slices std. deviation: 1.964688
B-slices max DRF: 35

I-slices average DRF: 32
I-slices std. deviation: 2
I-slices max DRF: 34

[ Profile compliancy ]

Profile to check: MTK PAL 6000
Resolution: Ok
Framerate: Ok
Min buffer fill: 80%

This report was created by AVInaptic (18-11-2007) on  4 dic 2009, h 15:18:07
file 2:

Code:
[ About file ]

Name: 2.mp4
Date: 4/12/2009 13:25:33
Size: 54,847,699 bytes (52.307 MB)

[ Generic infos ]

Play duration: 00:18:09 (1089.489 s)
Container type: MP4/MOV
Major brand: ISO Base Media version 512
Compatible brands: JVT AVC
Creation time: 1/01/1970 00:00:00 UTC
Modification time: 1/01/1970 00:00:00 UTC
Number of streams: 2
Type of stream nr. 1: video (avc1) {VideoHandler}
Type of stream nr. 2: audio (AAC Low complexity) {SoundHandler}
Audio streams: 1

[ Relevant data ]

Resolution: 320 x 240
Width: multiple of 32
Height: multiple of 16
Average DRF: 27.715913
Standard deviation: 3.863691
Std. dev. weighted mean: 3.695927

[ Video track ]

Codec: avc1
Resolution: 320 x 240
Frame aspect ratio: 4:3 = 1.333333
Pixel aspect ratio: 1:1 = 1
Display aspect ratio: 4:3 = 1.333333
Framerate: 29.970029 fps
Number of frames: 32652
Bitrate: 330.080503 kbps

[ Audio track ]

Codec: AAC Low complexity
Bitrate: 64.042701 kbps
Channels: 2
Sample rate: 48000 Hz

[ About H.264 encoding ]

SPS id: 0
  Profile: Main@L1.3
  Num ref frames: 2
  Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
  Entropy coding type: CAVLC
  Weighted prediction: No
  Weighted bipred idc: No
  8x8dct: No
Number of frames: 32652
Drop/delay frames: 0
Corrupted frames: 0

P-slices: 16322 ( 49.988 %) ############             
B-slices: 16098 ( 49.302 %) ############             
I-slices:   232 (  0.711 %)                          
SP-slices:     0 (  0.000 %)                          
SI-slices:     0 (  0.000 %)                          

[ DRF analysis ]

Average DRF: 27.715913
Standard deviation: 3.863691
Max DRF: 45

DRF<12:    0 (  0.000 %)                          
DRF=12:   47 (  0.144 %)                          
DRF=13:    2 (  0.006 %)                          
DRF=14:   28 (  0.086 %)                          
DRF=15:    1 (  0.003 %)                          
DRF=16:   15 (  0.046 %)                          
DRF=17:   28 (  0.086 %)                          
DRF=18:   61 (  0.187 %)                          
DRF=19:  194 (  0.594 %)                          
DRF=20:  349 (  1.069 %)                          
DRF=21:  775 (  2.374 %) #                        
DRF=22: 1214 (  3.718 %) #                        
DRF=23: 1822 (  5.580 %) #                        
DRF=24: 1920 (  5.880 %) #                        
DRF=25: 2757 (  8.444 %) ##                       
DRF=26: 3176 (  9.727 %) ##                       
DRF=27: 3543 ( 10.851 %) ###                      
DRF=28: 3541 ( 10.845 %) ###                      
DRF=29: 2705 (  8.284 %) ##                       
DRF=30: 2960 (  9.065 %) ##                       
DRF=31: 2350 (  7.197 %) ##                       
DRF=32: 1694 (  5.188 %) #                        
DRF=33: 1305 (  3.997 %) #                        
DRF=34:  731 (  2.239 %) #                        
DRF=35:  606 (  1.856 %)                          
DRF=36:  346 (  1.060 %)                          
DRF=37:  248 (  0.760 %)                          
DRF=38:  105 (  0.322 %)                          
DRF=39:   63 (  0.193 %)                          
DRF>39:   66 (  0.202 %)                          

P-slices average DRF: 26.675775
P-slices std. deviation: 3.693520
P-slices max DRF: 44

B-slices average DRF: 28.828922
B-slices std. deviation: 3.698834
B-slices max DRF: 45

I-slices average DRF: 23.663793
I-slices std. deviation: 3.663529
I-slices max DRF: 39

[ Profile compliancy ]

Profile to check: MTK PAL 6000
Resolution: Ok
Framerate: Ok
Min buffer fill: 78%

This report was created by AVInaptic (18-11-2007) on  4 dic 2009, h 15:19:04
Many thanks in advance!
bsti is offline   Reply With Quote
Old 4th December 2009, 16:02   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Just a guess, but avinaptic reports 3 ref frames for 1st video, 2 for 2nd . Even though your command line says --ref 2 for 1st video

Also, what program are you using to join?
poisondeathray is offline   Reply With Quote
Old 7th December 2009, 13:05   #3  |  Link
bsti
Registered User
 
Join Date: Nov 2009
Posts: 2
Thanks for your reply. That ref-thingy is really weird, in the cli I define "--ref 2" but it seems that x264 encodes using 3 refs.... To program I use to join the files is avidemux 2.5.1 (r5378) on Mac OS X 10.5.5.

-EDIT-

I made a mistake... I uploaded the wrong infos.
So here are the right ones:

x264 CLI (direct264):
Code:
x264.exe --profile main --level 13 --bitrate 320 --fps 30 --keyint 24 --bframes 1 --no-cabac --no-b-adapt --ref 2 --me hex --sps-id 0 -o output.mp4 input.avi
File 1
Code:
[ About file ]

Name: 1_out.mp4
Date: 7/12/2009 13:51:56
Size: 87,631 bytes (0.084 MB)

[ Generic infos ]

Play duration: 00:00:03 (3.04 s)
Container type: MP4/MOV
Major brand: ISO Base Media version 1
Compatible brands: JVT AVC
Creation time: 6/12/2009 12:51:56 UTC
Modification time: 6/12/2009 12:51:56 UTC
Number of streams: 1
Type of stream nr. 1: video (avc1) {GPAC ISO Video Handler}
Audio streams: 0

[ Relevant data ]

Resolution: 320 x 240
Width: multiple of 32
Height: multiple of 16
Average DRF: 29.868421
Standard deviation: 2.066920
Std. dev. weighted mean: 1.964793

[ Video track ]

Codec: avc1
Resolution: 320 x 240
Frame aspect ratio: 4:3 = 1.333333
Pixel aspect ratio: 1:1 = 1
Display aspect ratio: 4:3 = 1.333333
Framerate: 25 fps
Number of frames: 76
Bitrate: 226.039473 kbps

[ About H.264 encoding ]

SPS id: 0
  Profile: Main@L1.3
  Num ref frames: 2
  Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
  Entropy coding type: CAVLC
  Weighted prediction: No
  Weighted bipred idc: B slices - implicit weighted prediction
  8x8dct: No
Number of frames: 76
Drop/delay frames: 0
Corrupted frames: 0

P-slices: 37 ( 48.684 %) ############             
B-slices: 34 ( 44.737 %) ###########              
I-slices:  5 (  6.579 %) ##                       
SP-slices:  0 (  0.000 %)                          
SI-slices:  0 (  0.000 %)                          

[ DRF analysis ]

Average DRF: 29.868421
Standard deviation: 2.066920
Max DRF: 37

DRF<26:  0 (  0.000 %)                          
DRF=26:  1 (  1.316 %)                          
DRF=27:  8 ( 10.526 %) ###                      
DRF=28: 14 ( 18.421 %) #####                    
DRF=29: 13 ( 17.105 %) ####                     
DRF=30: 10 ( 13.158 %) ###                      
DRF=31: 14 ( 18.421 %) #####                    
DRF=32: 10 ( 13.158 %) ###                      
DRF=33:  2 (  2.632 %) #                        
DRF=34:  3 (  3.947 %) #                        
DRF=35:  0 (  0.000 %)                          
DRF=36:  0 (  0.000 %)                          
DRF=37:  1 (  1.316 %)                          
DRF>37:  0 (  0.000 %)                          

P-slices average DRF: 29.702702
P-slices std. deviation: 1.843393
P-slices max DRF: 34

B-slices average DRF: 29.941176
B-slices std. deviation: 1.764705
B-slices max DRF: 34

I-slices average DRF: 30.6
I-slices std. deviation: 4.223742
I-slices max DRF: 37

[ Profile compliancy ]

Profile to check: MTK PAL 6000
Resolution: Ok
Framerate: Ok
Min buffer fill: 81%

This report was created by AVInaptic (18-11-2007) on  7 dic 2009, h 14:00:03
File 2:

Code:
[ About file ]

Name: 2_out.mp4
Date: 7/12/2009 13:52:06
Size: 45,355,006 bytes (43.254 MB)

[ Generic infos ]

Play duration: 00:21:46 (1306.08 s)
Container type: MP4/MOV
Major brand: ISO Base Media version 1
Compatible brands: JVT AVC
Creation time: 6/12/2009 12:52:03 UTC
Modification time: 6/12/2009 12:52:03 UTC
Number of streams: 1
Type of stream nr. 1: video (avc1) {GPAC ISO Video Handler}
Audio streams: 0

[ Relevant data ]

Resolution: 320 x 240
Width: multiple of 32
Height: multiple of 16
Average DRF: 27.715913
Standard deviation: 3.863691
Std. dev. weighted mean: 3.695927

[ Video track ]

Codec: avc1
Resolution: 320 x 240
Frame aspect ratio: 4:3 = 1.333333
Pixel aspect ratio: 1:1 = 1
Display aspect ratio: 4:3 = 1.333333
Framerate: 25 fps
Number of frames: 32652
Bitrate: 275.342153 kbps

[ About H.264 encoding ]

SPS id: 0
  Profile: Main@L1.3
  Num ref frames: 2
  Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
  Entropy coding type: CAVLC
  Weighted prediction: No
  Weighted bipred idc: No
  8x8dct: No
Number of frames: 32652
Drop/delay frames: 0
Corrupted frames: 0

P-slices: 16322 ( 49.988 %) ############             
B-slices: 16098 ( 49.302 %) ############             
I-slices:   232 (  0.711 %)                          
SP-slices:     0 (  0.000 %)                          
SI-slices:     0 (  0.000 %)                          

[ DRF analysis ]

Average DRF: 27.715913
Standard deviation: 3.863691
Max DRF: 45

DRF<12:    0 (  0.000 %)                          
DRF=12:   47 (  0.144 %)                          
DRF=13:    2 (  0.006 %)                          
DRF=14:   28 (  0.086 %)                          
DRF=15:    1 (  0.003 %)                          
DRF=16:   15 (  0.046 %)                          
DRF=17:   28 (  0.086 %)                          
DRF=18:   61 (  0.187 %)                          
DRF=19:  194 (  0.594 %)                          
DRF=20:  349 (  1.069 %)                          
DRF=21:  775 (  2.374 %) #                        
DRF=22: 1214 (  3.718 %) #                        
DRF=23: 1822 (  5.580 %) #                        
DRF=24: 1920 (  5.880 %) #                        
DRF=25: 2757 (  8.444 %) ##                       
DRF=26: 3176 (  9.727 %) ##                       
DRF=27: 3543 ( 10.851 %) ###                      
DRF=28: 3541 ( 10.845 %) ###                      
DRF=29: 2705 (  8.284 %) ##                       
DRF=30: 2960 (  9.065 %) ##                       
DRF=31: 2350 (  7.197 %) ##                       
DRF=32: 1694 (  5.188 %) #                        
DRF=33: 1305 (  3.997 %) #                        
DRF=34:  731 (  2.239 %) #                        
DRF=35:  606 (  1.856 %)                          
DRF=36:  346 (  1.060 %)                          
DRF=37:  248 (  0.760 %)                          
DRF=38:  105 (  0.322 %)                          
DRF=39:   63 (  0.193 %)                          
DRF>39:   66 (  0.202 %)                          

P-slices average DRF: 26.675775
P-slices std. deviation: 3.693520
P-slices max DRF: 44

B-slices average DRF: 28.828922
B-slices std. deviation: 3.698834
B-slices max DRF: 45

I-slices average DRF: 23.663793
I-slices std. deviation: 3.663529
I-slices max DRF: 39

[ Profile compliancy ]

Profile to check: MTK PAL 6000
Resolution: Ok
Framerate: Ok
Min buffer fill: 79%

This report was created by AVInaptic (18-11-2007) on  7 dic 2009, h 13:59:46
Output: (DRF Analysis NOT possible)
Code:
[ About file ]

Name: avidemux_out.mp4
Date: 7/12/2009 14:01:59
Size: 45,561,943 bytes (43.451 MB)

[ Generic infos ]

Play duration: 00:21:49 (1309.12 s)
Container type: MP4/MOV
Major brand: ISO Base Media version 512
Compatible brands: JVT AVC
Creation time: 1/01/1970 00:00:00 UTC
Modification time: 1/01/1970 00:00:00 UTC
Number of streams: 1
Type of stream nr. 1: video (avc1) {VideoHandler}
Audio streams: 0

[ Relevant data ]

Resolution: 320 x 240
Width: multiple of 32
Height: multiple of 16

[ Video track ]

Codec: avc1
Resolution: 320 x 240
Frame aspect ratio: 4:3 = 1.333333
Pixel aspect ratio: 1:1 = 1
Display aspect ratio: 4:3 = 1.333333
Framerate: 25 fps
Number of frames: 32728
Bitrate: 275.227664 kbps

[ About H.264 encoding ]

SPS id: 0
  Profile: Main@L1.3
  Num ref frames: 2
  Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
  Entropy coding type: CAVLC
  Weighted prediction: No
  Weighted bipred idc: B slices - implicit weighted prediction
  8x8dct: No

[ Profile compliancy ]

Profile to check: MTK PAL 6000
Resolution: Ok
Framerate: Ok
Warning: If you need a more complete report, then click on "DRF analysis"

This report was created by AVInaptic (18-11-2007) on  7 dic 2009, h 14:04:59
Maybe it's this info that is causing the trouble:

In the 1st file it says:
Code:
Weighted bipred idc: B slices - implicit weighted prediction

Last edited by bsti; 7th December 2009 at 14:10.
bsti is offline   Reply With Quote
Reply

Tags
append, concatenate, h264, join

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.