There are many threads asking how to append two mp4 files without re encoding, but I'm looking to do something slightly different and couldn't find an answer anywhere.
I have two mp4 files - file A is a 720p file, and file B is a dvdrip. I would like to join them together without re encoding file A. I can do anything to file B in order to get this to work. I am on a mac, but have access to windows and linux, so the solution does not need to be OS dependent.
Here's what I've tried:
To start, I fed file B through MPEG Streamclip to resize it. I exported it as 1280x720. After having done that, here is the information under "codec details" in VLC (that is how I have been comparing them):
File A
Stream 0
Type: Audio
Codec: MPEG AAC Audio (mp4a)
Language: English
Channels: Stereo
Sample Rate: 48000 Hz
Stream 1
Type: Video
Codec: H264 - MPEG-4 AVC (part 10)(avc 1)
Language: English
Resolution: 1280x720
Frame Rate: 23.976026
Decoded Format: Planar 4:2:0 YUV
File B
Stream 0
Type: Audio
Codec: MPEG AAC Audio (mp4a)
Language: English
Channels: Stereo
Sample Rate: 48000 Hz
Stream 1
Type: Video
Codec: H264 - MPEG-4 AVC (part 10)(avc 1)
Language: English
Resolution: 1280x720
Frame Rate: 23.897000
Decoded Format: Planar 4:2:0 YUV
I was hoping this would be enough, and that I could simply append them at this point. Here's what I've tried:
-Using mp4joiner to join them. This simply crashes without an error message.
-Using quicktime to join them. Quicktime freezes when I attempt this.
-Using MPEG Streamclip to join them. Even though they are both mp4, when I join them and then attempt to "save as" mp4, it tells me "ERROR: The movie can't be saved in this format." If I "save as" mov, it saves, but the resulting file has 2 audio streams and 2 video streams, which is not what I want.
-Using avidemux to join them. The file saves, and the file A portion of the new file plays fine, but the file B portion of the new file is just a grey screen.
-Re encoding file B in several of the above programs to try to append it. No such luck.
So, my question is, what do I need to do to file B in order to append it to file A without re encoding file A? The only difference I can see is the frame rate, but even manually setting that so they match doesn't fix it. Any suggestions would be appreciated.
+ Reply to Thread
Results 1 to 6 of 6
-
-
@poisondeathray:
Needs to be the same framerate
@PartyMummy:
I have two mp4 files - file A is a 720p file, and file B is a dvdrip.File A
...
Resolution: 1280x720
File B
...
Resolution: 1280x720
=> try mp4box -
You're right. In theory you can join them. In my experience - you increase the likelihood of a sucessful join by having 2 identical FPS CFR files dramatically
-> confused, since when do dvds have a 1280x720 resolution?
To start, I fed file B through MPEG Streamclip to resize it. -
Thanks for the quick replies. Selur, as poisondeathray pointed out, I started out with a dvdrip, and resized it so it would be the same resolution.
poisondeathray, here are the results of mediainfo:
File A:
General
Complete name : /Users/mac/Desktop/fileA.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 320 MiB
Duration : 11mn 18s
Overall bit rate mode : Variable
Overall bit rate : 3 964 Kbps
Encoded date : UTC 2012-12-03 05:59:45
Tagged date : UTC 2012-12-03 06:00:31
Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 11mn 18s
Bit rate : 3 801 Kbps
Width : 1 280 pixels
Height : 720 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.172
Stream size : 307 MiB (96%)
Language : English
Encoded date : UTC 2012-12-03 05:59:43
Tagged date : UTC 2012-12-03 06:00:31
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 11mn 18s
Bit rate mode : Variable
Bit rate : 156 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 12.6 MiB (4%)
Language : English
Encoded date : UTC 2012-12-03 05:59:43
Tagged date : UTC 2012-12-03 06:00:31
File B
General
Complete name : /Users/mac/Desktop/fileB.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 3.33 MiB
Duration : 33s 877ms
Overall bit rate mode : Variable
Overall bit rate : 824 Kbps
Encoded date : UTC 2012-12-05 22:47:30
Tagged date : UTC 2012-12-05 22:47:30
Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Format settings, GOP : M=3, N=33
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 33s 867ms
Bit rate : 695 Kbps
Maximum bit rate : 1 849 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.031
Stream size : 2.80 MiB (84%)
Language : English
Encoded date : UTC 2012-12-06 22:17:03
Tagged date : UTC 2012-12-05 22:47:30
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 33s 877ms
Bit rate mode : Variable
Bit rate : 125 Kbps
Maximum bit rate : 132 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 518 KiB (15%)
Language : English
Encoded date : UTC 2012-12-05 22:47:30
Tagged date : UTC 2012-12-05 22:47:30 -
It wouldn't hurt to try mp4box as selur suggested ; you can also try appending with mkvtoolnix (into mkv), then re-wrap into mp4 if desired
You will increase your chances of a successful join in the encoding settings were the same
e.g.
High @ L3.1 vs. High @ L5.1
No Cabac vs. Cabac
2ref frames vs. 3 ref frames
etc....
The container format can sometimes make a difference depending on what appending software you are using . e.g. mp4: mp42 vs. isom
When everything matches, you usually have a higher chance of success
I doubt file "A" is really VFR - it was probably muxed that way. You can probably mux timecodes with CFR 24000/1001 . Many software will have problems joining a "VFR" file with a "CFR" file
Similar Threads
-
Hauppauge 1212 .MP4 - Video resolution is confusing me
By BoneKin in forum Capturing and VCRReplies: 5Last Post: 25th Oct 2012, 19:13 -
Batch xvid avi's to h264 mp4, keep resolution & file size
By marioval in forum Video ConversionReplies: 4Last Post: 10th Sep 2012, 18:13 -
trouble with audio after appending a .jpg turned .mp4 to another .mp4
By canadianjameson in forum Newbie / General discussionsReplies: 7Last Post: 26th Jun 2011, 09:55 -
How do I join MP4 clips while retaining 1080 30P resolution ??
By nate.d in forum Newbie / General discussionsReplies: 8Last Post: 25th Dec 2009, 13:34 -
Converting Avi To MP4 Ipod with custom resolution
By zander20 in forum Video ConversionReplies: 2Last Post: 28th Nov 2008, 13:59