summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
Commit message (Collapse)AuthorAgeFilesLines
* CLI: Add support for naming audio tracks to the HandBrakeCLI, thanks to ↵eddyg2008-10-101-1/+2
| | | | | | LePetomane for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't display a mixdown in the job settings for passthrough audio tracks.jbrjake2008-09-291-4/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Now that the interfaces don't set job->vfr to 1 unless detelecine is ↵jbrjake2008-09-261-28/+8
| | | | | | | | enabled, libhb doesn't have to make sure the filter is on. Also adds a sanity check to make sure frames aren't dropped in the AVI container, for those masochstic enough to use the format. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1774 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Spit out the average encoding speed in the verbose log at the end of a job.jbrjake2008-09-191-0/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1727 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't obey maxWidth and maxHeight settings when using strict anamorphic.jbrjake2008-08-061-18/+17
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1612 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Splits the display of job settings off from the actual work of beginning of ↵jbrjake2008-08-011-73/+227
| | | | | | | | a job, and reorganizes/elaborates the display's layout. Adds new title variables to provide more description of sources: video_codec_name, video_bitrate (currently only used by DVD sources), and container_name and data_rate (currently only used by ffmpeg input sources). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1599 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix two problems that would cause HB to hang in the muxer whenever the input ↵van2008-07-301-30/+10
| | | | | | | | | | content's video finished before audio: - sync has to keep processing until all its input fifos report eof otherwise it won't send an eof on all its output fifos. - do_job has to wait for muxer to finish. Waiting for anything earlier in the pipeline (we were waiting for the video encoder) can cause other parts of the pipeline to get terminated early which will result in lost data & no eofs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1597 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix subtitle scan to work with new stream eof logic.van2008-07-261-5/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1584 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - in encx264, if an video frame is larger than init_delay split it into ↵van2008-07-261-4/+7
| | | | | | | | | | | | 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
* Enable subtitle-scan to work when using Xvid as the encoder. Also checks ↵eddyg2008-07-011-10/+21
| | | | | | return values from the work Init functions to enable Work threads to abort the encode should they not initialise properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1547 b64f7644-9d1e-0410-96f1-a4d463321fa5
* No need to check the mixdown settings if pass-through is requested.saintdev2008-06-171-119/+122
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1519 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - support blu-ray, avchd & dvb x264van2008-05-311-184/+167
| | | | | | | - support video files handled by ffmpeg (avi, mkv, mp4, etc.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1480 b64f7644-9d1e-0410-96f1-a4d463321fa5
* When encoding anamorphic with lavc, ensure PAR values are 8-bit. Thanks, j45!jbrjake2008-05-291-1/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1470 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Re-allow constant frame rates. The MacGui should probably be updated to ↵jbrjake2008-05-171-1/+3
| | | | | | always use title fps for VFR instead of "Same as Source" which might be 23.976, but it's taken care of in work.c now so it's purely a cosmetic thing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1464 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Avoid a divide by 0 in encfaac.c caused by the mixdown not being specifiededdyg2008-04-171-0/+9
| | | | | | | | for AAC tracks (due toi a bug in HandBrake.app). Ensure that a mixdown is always specified if not doing passthrough. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1423 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
* Fix the automatic subtitle scan that I broke with r1412.van2008-04-141-5/+21
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1413 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixes for different number of frames between pass 1 & 2, missing frames at ↵van2008-04-131-5/+7
| | | | | | | | | | | | end, and an deadlock with pcm audio. - since the SCR clock recovery is done in reader.c we can't currently skip audio frames during pass 1 or we miss clock changes signaled by those frames & end up dropping more video frames in pass 1 than pass 2. - since many modules buffer frames we can't tell if we're done just by looking for empty fifos. Send an empty buffer to mark end-of-stream all the way along the processing pipeline & use it to flush internally buffered data. - in a processing pipeline you're done when the end of the pipe says your done. add a thread status variable so we can tell when individual threads are finished then make do_job wait until the encoder thread is done so that we're sure all the frames have been processed and sent to the muxer. - since the muxer alternates between reading video & audio packets we have to have enough buffer in the audio pipeline to handle a video-frame's worth of audio packets (33ms). Since pcm packets are <1ms we need >60 slots in the audio fifos or we'll deadlock. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1412 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor chapter cleanups.van2008-04-041-2/+3
| | | | | | | | | | - 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-110/+110
| | | | | | | | 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
* Theora.saintdev2008-03-201-0/+4
| | | | | | | | This adds the theora encoder to the Xcode project as well. It does not enable anything in the Mac GUI, just allows it to build. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1350 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-45/+45
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Sanity check the input codec is AC3 when selecting AC3 pass through to avoid ↵eddyg2008-02-181-0/+9
| | | | | | crash when it is mpega or lpcm etc. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1290 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Only show a line in the log for filters if there are any, only show a line ↵jbrjake2008-02-161-2/+2
| | | | | | for dynamic range compression if it's enabled. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1274 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds another safeguard to ensure AC3 pass-thru uses a 48khz sample rate.jbrjake2008-02-161-0/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1270 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow mac gui to select AC-3 + AAC at the same time, still needs CLI work ↵eddyg2008-02-161-4/+22
| | | | | | for the same. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1267 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Always use a sample rate of 48000hz for AC3.jbrjake2008-02-141-0/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1265 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Variable frame rate improvements.jbrjake2008-02-041-9/+15
| | | | | | | | | - Makes it work better with the source's time stamps and avoids discontinuities, by removing its lazy assumption that all frames are 3003 ticks long. - Handles more than 1 frame being dropped out of 5. - Preserves chapter markers from being dropped along with frames they're attached to (thanks van!). - Also, since VFR no longer requires input at 29.97 fps, removes the hard-coding of that frame rate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1249 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Maintains separate filter settings for each job. This prevents the MacGui ↵jbrjake2008-01-221-1/+23
| | | | | | from using the same filter settings for every job in the queue. Patch from travistex. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1228 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't bother informing the user when grayscale is off, since that's the case ↵jbrjake2008-01-141-1/+3
| | | | | | 99% of the time anyway. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1193 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix for duplicate chapters when encoding with ffmpeg.van2008-01-061-3/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1169 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Extends hb_set_anamorphic_size() to make it possible to do "dry-runs"...this ↵jbrjake2007-12-281-1/+1
| | | | | | way the MacGui can calculate loose anamorphic values for displaying preview images, before the job variables are directly set in work.c. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1153 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds extra, user-selectable dynamic range compression to the liba52 ↵jbrjake2007-12-081-0/+3
| | | | | | | | interface, making softer sounds louder. Based on code from liba52's A52Decoder, used in Perian's preferences pane. Set with a job->dynamic_range_compression float, with valid values being 1.0 - 4.0. Controlled from the CLI with --dynamic-range-compression or -D. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1108 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Moves the readout of applied x264 options from test.c to work.c, so the ↵jbrjake2007-11-161-0/+2
| | | | | | MacGui can see it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1064 b64f7644-9d1e-0410-96f1-a4d463321fa5
* First attempt at variable frame rate detelecining for NTSC video sources.jbrjake2007-11-101-0/+21
| | | | | | | 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
* "Loose" anamorphic:jbrjake2007-10-161-3/+13
| | | | | | | | - Scales the storage frame size to arbitrary widths, like 640 for the iPod. - Uses dimensions that divide cleanly by an arbitrary number (default: 16) and adjusts the SAR to match - Uses ITU PAR values when the video is meant to be overscanned ( 7+ pixels cropped on left+right) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change the fifo size from being statically tuned for a Mac Pro with 4 CPUs ↵eddyg2007-10-131-10/+10
| | | | | | to dynamically adjust according to how many processors are available. 8 extra buffers in the fifo per CPU available. Hopefully this will make the single CPU systems run at pretty much the same speed as before (although they may still be slower if they are low on memory and start thrashing the pager). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1023 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't drop subtitles when crossing PTS discontinuities by using buffer ↵eddyg2007-10-081-2/+5
| | | | | | sequence numbers to determine where in the stream the buffer came from. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1011 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Two changes, one ensure zero size buffers are zero size, second change the ↵eddyg2007-10-041-2/+2
| | | | | | buffer cleanup to be later. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@999 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Re-enable 6ch vorbis audio.saintdev2007-09-161-2/+2
| | | | | | | Vorbis won't allow bitrates < 168kbps with 6ch audio, so anything less is reset to 168kbps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@966 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Reverts an errant checking for from rev 960dynaflash2007-09-131-70/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@961 b64f7644-9d1e-0410-96f1-a4d463321fa5
* jbrjake's loose pixel ratio patch.saintdev2007-09-131-0/+70
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@960 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added buffer management and changed fifo sizes. Changed job->subtitle_scan ↵eddyg2007-09-111-16/+21
| | | | | | to job->indepth_scan, and fixed memory init bug in denoise.c. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@945 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Die, non-standard printf logging, die!jbrjake2007-08-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@895 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add Subtitle scanning for forced subtitles and normal subtitles from the CLIeddyg2007-08-211-14/+69
| | | | | | | and the MacOS GUI. See the new subtitle language options in the GUI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Prettier logging display for filters.jbrjake2007-08-141-4/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@814 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Moves the filters' logging info to work.c, adds parameter info. I also ↵jbrjake2007-08-141-1/+14
| | | | | | changed the deinterlace filter name to include its default method (ffmpeg) and removed the logging line from work.c that said if job->deinterlace was true or not, as it's now superfluous. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@812 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Native language subtitle scan improvements. Thanks, eddyg!jbrjake2007-07-261-41/+48
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@741 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixes to the CLI for forced subtitles, and Turbo.saintdev2007-07-061-2/+3
| | | | | | | | | -Fixes a bug in the HB CLI whereby you can't use the native-language switch to enable subtitles when doing single pass. -Changes the threshold for enabling subtitles automatically during a subtitle scan from 20% to 10%. -Changes the turbo options to match what the GUI is doing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@650 b64f7644-9d1e-0410-96f1-a4d463321fa5
* A big batch of patches from eddyg.jbrjake2007-06-061-12/+107
| | | | | | | | | | | | | Adds following options to the CLI: --subtitle-scan for auto-selecting subtitles for foreign language segments in native language audio tracks --native-language for auto-selecting subtitles for foreign language audio without knowing the track number --longest for auto-selecting the longest title like in the MacGui --turbo for improving speed on the first pass of a two pass encode with x264 (based on superdump's turbo x264 options in mencoder). Thanks, eddyg! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@600 b64f7644-9d1e-0410-96f1-a4d463321fa5