summaryrefslogtreecommitdiffstats
path: root/libhb/muxmp4.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Use PTS, not DTS, in encx264 output frames so we don't have to special-case ↵van2008-07-261-33/+38
| | | | | | its output in every muxer. Confine code that deals with Apple's mistakes in handling video with b-frames to muxmp4. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1582 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - in encx264, if an video frame is larger than init_delay split it into ↵van2008-07-261-33/+19
| | | | | | | | | | | | pieces so we don't get jerky output caused by out-of-order frames. - add an explicit EOF for all streams, not just video. - don't generate extra audio silence at the end of an encode (don't need it with explicit eof). - get rid of 80ms initial delay in AAC encode & flush final four frames buffered in encoder. - put mp4 'chap' atom on first track (usually video) rather than first audio track since we can now do video without audio (atom just needs to go on an enabled media track & video is always enabled). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1581 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a crash when using mp4 and no audio tracks.saintdev2008-06-261-4/+10
| | | | | | | | Because there were no audio structs on list_audio, audio->config was attempting to dereference a NULL pointer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1540 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Add COLR atom support to mpeg4ipvan2008-06-181-0/+18
| | | | | | | | - Add COLR atom to mp4 video tracks - Add colorspace info to h.264 VUI header git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1528 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Don't allow chapter durations to go negative (since durations are ↵van2008-04-251-2/+21
| | | | | | | | | unsigned the result will be interpreted as a huge positive number). - Revert the change to sync that pushed out the final frame of video -- on many DVDs this frame seems to be junk that's not intended to be displayed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1438 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Saearch & Replace domain names to move from .m0k.org to handbrake.fr. Only ↵jbrjake2008-04-151-1/+1
| | | | | | covers trunk files, libhb, and test. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1418 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor chapter cleanups.van2008-04-041-7/+15
| | | | | | | | | | - put chapter number in buf rather than a 'new chapter' flag. - use that chapter number to index chapter text in muxers so a dropped chapter doesn't make all subsequent chapter labeling wrong. - get rid of most of the chapter logging & just output one line giving the chapter text, number, frame & time. - fix a bug in sync that could cause chapter marks to be lost. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1377 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New internal audio handling.saintdev2008-04-011-20/+28
| | | | | | | | Each audio track contains it's own settings for codec, bitrate, samplerate, etc. This allows for very complex combinations of audio tracks if desired. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1365 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't allow negative durations. These shouldn't happen but occasionally do ↵van2008-02-251-1/+18
| | | | | | due to upstream bugs. Replace them with a small positive duration so the mp4 file will be playable. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1316 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-72/+72
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove the transformation matrix, and use the width field of the tkhd atom ↵ritsuka2008-02-171-53/+2
| | | | | | to do anamorphic in quicktime based players and devices. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1280 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Signal anamorphic in the MP4 container though the pixel aspect atom as well ↵jbrjake2008-02-171-2/+13
| | | | | | as the transformation matrix. This allows anamorphic on the iPhone and iPod Touch. One day, if Apple fixes a QuickTime Player bug, the only way to get it to display right in QuickTime might be to remove the transformation matrix the AppleTV still depends upon. It's a gamble. Oh well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1278 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow mac gui to select AC-3 + AAC at the same time, still needs CLI work ↵eddyg2008-02-161-1/+2
| | | | | | for the same. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1267 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Reverts 1262, since, duh, sample size != sample duration.jbrjake2008-02-141-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1263 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Calculate AC3-in-M4V frame sizes based on channel count instead of always ↵jbrjake2008-02-141-1/+1
| | | | | | using 1536. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1262 b64f7644-9d1e-0410-96f1-a4d463321fa5
* AC3 from DVD via HB converted to M4V for viewing on ATVeddyg2008-02-141-7/+26
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1261 b64f7644-9d1e-0410-96f1-a4d463321fa5
* account for quantization bias when computing durations for vfr.van2008-01-221-8/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1224 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Set the alternate group for the audio tracks. Does only work when building ↵ritsuka2008-01-191-0/+3
| | | | | | with jam, contrib pack is not updated yet. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1214 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Apply same edit to chapter track as to video track so chapters will stay invan2008-01-061-0/+7
| | | | | | | sync with the video (otherwise they end up 2-4 frames late). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1168 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fill in the "Encoded By:" tag in MP4 files with "HandBrake" followed by the ↵jbrjake2008-01-041-0/+7
| | | | | | version number and build date. Thanks for making me aware that libmp4v2 had an MP4SetMetadataTool() function, realityking. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1164 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixes a typo in MP4 chapter marker durations. Thanks, van!jbrjake2007-12-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1154 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Better b-frame muxing. Instead of using an arbitrarily long offset and then ↵jbrjake2007-12-281-36/+16
| | | | | | | | later walking the file to find the smallest one, now x264 uses the smallest delay it can from the start. This significantly cuts down muxing time. As a side effect, it also makes fixing chapter markers + b-frames easy, so that's included too in muxmp4 (thanks, van!). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1152 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Gives the CLI a separate option for adding the iPod UUID atom to mp4 files, ↵jbrjake2007-11-281-1/+1
| | | | | | instead of it just being a side-effect of using the x264b30 encoder. It's called with -I or --ipod-atom . git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1084 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Optimize MP4 files for HTTP streaming (on the CLI it's -O or --optimize).jbrjake2007-11-211-12/+12
| | | | | | | | Has mpeg4ip run a second pass after muxing is complete, to move the MOOV atom to the beginning of the file. To get this to work, I had to replace a patch from Perian, which has written the avc1 "Compressor Name" in the Pascal string style QuickTime expects. Unfortunately, that patch left mpeg4ip unable to parse its own output, when muxing x264 video. Instead, now the Compressor Name is a blank string, and QuickTime substitutes "H.264" for it. NOTE: This is *not* hinting for RTP streaming, just shuffling the container around so it starts playing faster over the web. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1074 b64f7644-9d1e-0410-96f1-a4d463321fa5
* First attempt at variable frame rate detelecining for NTSC video sources.jbrjake2007-11-101-1/+8
| | | | | | | This check-in includes the library code as well as the CLI implementation. Only works with MP4 and MKV, untested with high profile, results may vary with mixed content, consult a physician if condition persists for longer than four hours. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1051 b64f7644-9d1e-0410-96f1-a4d463321fa5
* This patch from superdump lets muxmp4.c set a Height Ratio for the QuickTime ↵jbrjake2007-10-161-7/+20
| | | | | | transformation matrix. This makes it possible to scale up 4:3 material to 720*540 on playback, instead of displaying it scaled down to 640*480. In other words: true anamorphic 4:3. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1027 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added rudimentory error handling to HB. Instead of using hb_log() use ↵eddyg2007-08-271-15/+43
| | | | | | hb_error(). Also causes us to stop muxing when we get a write error in MP4 and MKV containers. Still requires macosx dialog box by dynaflash (see main.mm for stub to use). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@869 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Switch buf->key to buf->frametype which is a bitmask telling us what type of ↵saintdev2007-06-171-2/+2
| | | | | | | | | frame we are dealing with. This doesn't change any functionality, but I need to be able to distinguish between x264 IDR and I frames for the upcoming matroska muxer. This also has the side effect of making the code a little easier to read and maintain. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@623 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Finally recommitting clee's patch from r518 to allow 64-bit mp4 files that ↵jbrjake2007-06-131-1/+12
| | | | | | | | can hold more than 4 gigs... controlled by a boolean called job->largeFileSize and enabled from the cli with -4 or --large-file. Note that this breaks compatibility with stuff like the iPod, AppleTV, PS3 (I think), etc...so it is off by default. Also converted a few stray hard tabs into soft tabs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@618 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Disables extra audio tracks so they don't all play over the main audio track ↵jbrjake2007-06-121-6/+21
| | | | | | in QuickTime. They can be re-enabled from the Properties menu in QT Pro or with Dumpster. Shouldn't have any affect on people who use sane video players. Props to eddyg for reporting the issue, identifying the atom in question, and castigating me for my lazy and unkempt coding ways. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@606 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Various fixes:saintdev2007-04-261-5/+49
| | | | | | | | | - Include parsecsv.c in the Jamfile so we can compile the CLI with Jam - Quiet some compiler warnings in parsecsv.{c,h} - Check some return values in muxmp4.c and encfaac.c and die gracefully if there is a problem. - Correctly set the number of audio channels in the stsd atom. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@552 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix Previous Bad commit for Cyanders Chapter Markersdynaflash2007-04-251-28/+119
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@548 b64f7644-9d1e-0410-96f1-a4d463321fa5
* 64-bit data atoms break some consumer devices. We need to figure out a ↵clee2007-04-171-1/+1
| | | | | | smarter way of doing this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@520 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Successfully create MP4 files bigger than 4GBclee2007-04-161-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@518 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Prevents a bus error at the end of muxing when b-frames are enabled.jbrjake2007-04-161-0/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@517 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Much better B-frame muxing frame-reordering. This will preserve the sps/pps ↵jbrjake2007-04-161-27/+30
| | | | | | | | info, properly offset the first frame, and flush any remaining frames at the end of the encode. Patch by: Nyx git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@513 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cleaning up some compiler warnings.clee2007-04-151-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@508 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Ooops. Restores xvid-in-mp4 functionality, which I broke with b-frame ↵jbrjake2007-04-041-3/+3
| | | | | | muxing. (Thanks for the bug report, superdump, and thanks for pointing out where the problem was, saintdev.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@476 b64f7644-9d1e-0410-96f1-a4d463321fa5
* H.264 B-frame muxing for MP4, including B-pyramids. The latter are QuickTime ↵jbrjake2007-03-301-3/+35
| | | | | | | | incompatible. "Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves." -- Alan Kay git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@464 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Keep the language id for each audio track when using MP4.saintdev2007-03-261-0/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@454 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added chapter markers in a chapter text track in mp4 files.maurj2007-03-231-2/+45
| | | | | | | | | This option is turned off by default. It can be turned on in the CLI by specifying a "-m" or "--markers" option. it is not yet enabled as an option in the Mac GUI. These chapter tracks are only detected by QuickTime if the file extension is .m4v. If the extension is .mp4, the chapter text track is ignored. To this end, I have made test.c detect .m4v as a file extension for mp4 too. This change has required a substantial change to the mp4v2 library patch. Until the precompiled contrib binaries are updated by Prigaux, try doing "./configure" and then "./jam" (which will build the native contribs, but fail to build UB versions of the apps), and then try "make internal" to compile a native version of the apps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@440 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge the 5.1 branch into the trunk.prigaux2007-03-061-0/+224
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@422 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge the 0.8.0_mpeg4ip branch into the trunkprigaux2007-02-111-198/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@285 b64f7644-9d1e-0410-96f1-a4d463321fa5
* RapidSVN commited changes to files I did not want commited. This commit ↵johnallen2007-01-061-5/+0
| | | | | | revert those files back to rev 92. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@94 b64f7644-9d1e-0410-96f1-a4d463321fa5
* added Doxyfile, config file for doxygenjohnallen2007-01-061-0/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@93 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HandBrake 0.7.1a1rhester2006-09-301-35/+43
| | | | | | | | | | | | | | | | Made H.264 baseline levels more generic Added iPod 640x480 support to libhb, HBTest and MacOS X GUI Added proper iPod 640x480 muxing Modified rate control for more accurate ending video bitrates Updated ffmpeg and x264 base sources to more current levels Removed inlined ff_get_fourcc (now in ffmpeg) Updated patches for xvidcore, libdvdread, x264, and ffmpeg Relocated contrib files to local web server and updated version files to new site Renamed contrib files and patches to consistent naming standard Updated contrib Jamfile to support new patches and naming standard git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@70 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge from avformat branchtiter2006-04-171-82/+114
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@60 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Structural changes, in order to eventually be able to compile HBtiter2006-03-161-11/+7
| | | | | | | without certain encoders git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@34 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Preparing 0.7.1titer2006-02-241-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@31 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HandBrake 0.7.0handbrake2006-01-141-0/+160
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@16 b64f7644-9d1e-0410-96f1-a4d463321fa5