video_transcoding 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29eebc020f0cc27788a421b97f279470c878e921
4
- data.tar.gz: 9be1bbc36a975368fe8728a90e5f48bb07867ddc
3
+ metadata.gz: d2a3ee4c7111881f0ca85d612bbb715fc401c3a7
4
+ data.tar.gz: a7d271b0bea0631b4160a782579f2795cd679e27
5
5
  SHA512:
6
- metadata.gz: 766b708eed7dce151ced3d97608559d220c184aa190430821338e58732b7d9e246017642e750e2446a2a78127478899c98b5760e048151b767d08bf272b0e260
7
- data.tar.gz: 176e9563911cdeddf3ece35049ed91b418317f61fe8287a4c70af476a031afdcd6ef005d01dd2b4f9d6ea4d6ad20e345eadbc28c05a9a82b5198004fd81ea897
6
+ metadata.gz: deda8c3414b1589cee0b5e4043e50029aae011810ef340b4bdb562b9fd9205295241c009d64a7fb112aaea33964833c8017a31a5fbc15d0be00528524bb9f6b0
7
+ data.tar.gz: 19e5084afb13b889de1ebb8cc868180184990ad42ff95a412dd3c819ceee711f1c0d4f3b12576dba41954d4b8f969bf878156d793085e15794fbd74b188eea63
data/README.md CHANGED
@@ -259,17 +259,23 @@ However, be aware that `detect` can fail if HandBrake and MPlayer disagree about
259
259
 
260
260
  By default, the `transcode-video` tool selects the first audio track in the input as the main audio track. This is the first track in the output and the default track for playback.
261
261
 
262
- But you can select any audio track as the main track. In this case, track number 3:
262
+ But you can select any input audio track as the main track. In this case, track number 3:
263
263
 
264
264
  transcode-video --main-audio 3 "/path/to/Movie.mkv"
265
265
 
266
+ Or you can select the first input audio track in a specific language using a three-letter code instead of a track index number. This command selects the first Spanish language track:
267
+
268
+ transcode-video --main-audio spa "/path/to/Movie.mkv"
269
+
270
+ If no track in the target language is found, then selection defaults to the first audio track in the input.
271
+
266
272
  You can also give the main audio track a custom name:
267
273
 
268
274
  transcode-video --main-audio 3="Original Stereo" "/path/to/Movie.mkv"
269
275
 
270
276
  Unlike `HandBrakeCLI`, custom track names are allowed to contain commas.
271
277
 
272
- By default, only one audio track is selected. But you can add additional tracks, also with custom names:
278
+ By default, only one track is selected as the main audio or default track. But you can add additional tracks, also with custom names:
273
279
 
274
280
  transcode-video --add-audio 4 --add-audio 5="Director Commentary" "/path/to/Movie.mkv"
275
281
 
@@ -277,11 +283,9 @@ Or you can add all audio tracks with a single option and argument:
277
283
 
278
284
  transcode-video --add-audio all "/path/to/Movie.mkv"
279
285
 
280
- You can even add audio tracks selected by their three-letter language code. This command adds all French and Spanish language tracks:
281
-
282
- transcode-video --add-audio language=fre,spa "/path/to/Movie.mkv"
286
+ You can also add audio tracks selected by their three-letter language code. This command adds all French and Spanish language tracks in the same order they're found in the input:
283
287
 
284
- If no main audio track has been selected before adding tracks by language code, the first track added becomes the main audio track.
288
+ transcode-video --add-audio fra,spa "/path/to/Movie.mkv"
285
289
 
286
290
  By default, the main audio track is transcoded in AAC format and, if the original is multi-channel surround sound, in Dolby Digital AC-3 format. Meaning the output can contain two tracks from the same source in different formats. So, main audio output is "wide" enough for "double" tracks.
287
291
 
@@ -289,23 +293,23 @@ Also by default, any added audio tracks are only transcoded in AAC format. Meani
289
293
 
290
294
  However, you can change the "width" of main audio or additional audio output using the `--audio-width` option. There are three possible widths: `double`, `surround` and `stereo`.
291
295
 
292
- Use this command to treat any additional audio tracks just like the main audio track:
296
+ Use this command to treat any other additional audio tracks just like the main audio track:
293
297
 
294
- transcode-video --audio-width all=double "/path/to/Movie.mkv"
298
+ transcode-video --audio-width other=double "/path/to/Movie.mkv"
295
299
 
296
300
  Or use this command to make main audio output as a single track but still allow it in surround format:
297
301
 
298
- transcode-video --audio-width 1=surround "/path/to/Movie.mkv"
302
+ transcode-video --audio-width main=surround "/path/to/Movie.mkv"
299
303
 
300
304
  If possible, audio is first passed through in its original format, providing that format is either AC-3 or AAC. This hardly ever works for Blu-ray Discs but it often will for DVDs and other random videos.
301
305
 
302
- However, you can copy the original audio track, provided HandBrake and your selected file format support it:
306
+ However, you can still copy audio tracks and maintain their original format, provided HandBrake and your selected file format support it:
303
307
 
304
- transcode-video --copy-audio 1 "/path/to/Movie.mkv"
308
+ transcode-video --copy-audio all "/path/to/Movie.mkv"
305
309
 
306
- The `--copy-audio` option doesn't implicitly add the audio track to be copied. The previous command works because `1` identifies the main audio track and it's included by default. To copy a different track, you must first add it:
310
+ The `--copy-audio` option doesn't implicitly add audio tracks to be copied. Since only the main audio track is included by default, the previous command only tries to copy that track. To also copy another track, you must first add it:
307
311
 
308
- transcode-video --add-audio 4 --copy-audio 4 "/path/to/Movie.mkv"
312
+ transcode-video --add-audio 4 --copy-audio all "/path/to/Movie.mkv"
309
313
 
310
314
  Be aware that copying audio tracks in their original format will likely defeat two very important goals of transcoding: portability and compression.
311
315
 
@@ -637,39 +641,59 @@ For a few problematic videos, I have to apply options like `--force-rate 23.976
637
641
 
638
642
  ## History
639
643
 
640
- ### 0.8.1
644
+ ### [0.9.0](https://github.com/donmelton/video_transcoding/releases/tag/0.9.0)
645
+
646
+ Monday, May 2, 2016
647
+
648
+ * Revise the syntax and behavior of the `--main-audio`, `--add-audio` and `--audio-width` options in `transcode-video`:
649
+ * Allow selecting the main audio output track by finding the first input track in a specific language. For example, `--main-audio spa` can now use a language code to select the first Spanish track. Previously, only track numbers were allowed as main audio selection arguments. Via [ #8](https://github.com/donmelton/video_transcoding/issues/8) from [@JMoVS](https://github.com/JMoVS).
650
+ * Allow assignment of an optional name to the main audio track when using a language code. For example, `--main-audio spa="Other Dialogue"` sets the track name in the same manner as using a track number.
651
+ * Restrict the default main audio track to the first track, i.e. track number `1`, if the `--main-audio` option is not used. Previously, the default main audio track could be the first track selected by the `--add-audio` option when a language code argument was used. This was a hack because, at that time, the `--main-audio` option itself couldn't select by language.
652
+ * No longer require or even allow `language=` to prefix a language code argument when using the `--add-audio` option. For example, use `--add-audio fra` to add all the French language tracks. This is much easier to type.
653
+ * Add argument shortcuts to select the `main` track or `other` non-main tracks when using the `--audio-width` option. Previously, tracks were selected only by track number or `all` at once. The `main` shortcut is useful when the main audio track number is unknown because it was selected using a language code. The `other` shortcut is useful when `all` would also modify the main audio track.
654
+ * Revise the syntax of the `--add-subtitle` option in `transcode-video` to match the change to the `--add-audio` option which no longer requires or even allows `language=` to prefix a language code argument.
655
+ * Add a `--tabular` option to `query-handbrake-log` in order to better format its output report for later import into a spreadsheet application. This uses a tab character instead of a single space as the field delimiter and suppresses the `fps` and `kbps` labels. Via [ #64](https://github.com/donmelton/video_transcoding/issues/64).
656
+ * Fix a bug where `query-handbrake-log time` reported the wrong result when parsing .log files from output using a forced frame rate. It's possible this was a regression due to a change in HandBrake.
657
+ * Remove a stray "TODO" comment line in `query-handbrake-log`.
658
+ * Update the "README" document to:
659
+ * Revise the "Understanding audio" section to reflect new syntax and behavior in `transcode-video`.
660
+ * Add links to the "History" section for release numbers, pull requests, issues and contributors.
661
+ * Correct the release date for version 0.4.0 in the "History" section.
662
+ * Insert a missing "Via" and period in the 0.8.1 release information.
663
+
664
+ ### [0.8.1](https://github.com/donmelton/video_transcoding/releases/tag/0.8.1)
641
665
 
642
666
  Thursday, April 28, 2016
643
667
 
644
- * Fix a bug where `query-handbrake-log` reported the wrong `time` or `speed` when parsing .log files containing output from HandBrake subtitle scan mode, i.e. when using `--burn-subtitle scan` or `--force-subtitle scan` from `transcode-video`. Via #46 from @martinpickett.
645
- * Fix a bug where `query-handbrake-log ratefactor` failed if the number it was searching for was less than 10. This was due to HandBrake unexpectedly inserting a space before that number. Honestly, I doubt this ever happend before the new ratecontrol system debuted in 0.6.0. That's how good the new ratecontrol system is. #61 from @bmhayward
668
+ * Fix a bug where `query-handbrake-log` reported the wrong `time` or `speed` when parsing .log files containing output from HandBrake subtitle scan mode, i.e. when using `--burn-subtitle scan` or `--force-subtitle scan` from `transcode-video`. Via [ #46](https://github.com/donmelton/video_transcoding/issues/46) from [@martinpickett](https://github.com/martinpickett).
669
+ * Fix a bug where `query-handbrake-log ratefactor` failed if the number it was searching for was less than 10. This was due to HandBrake unexpectedly inserting a space before that number. Honestly, I doubt this ever happend before the new ratecontrol system debuted in 0.6.0. That's how good the new ratecontrol system is. Via [ #61](https://github.com/donmelton/video_transcoding/issues/61) from [@bmhayward](https://github.com/bmhayward).
646
670
 
647
- ### 0.8.0
671
+ ### [0.8.0](https://github.com/donmelton/video_transcoding/releases/tag/0.8.0)
648
672
 
649
673
  Sunday, April 24, 2016
650
674
 
651
675
  * Add a `--no-constrain-crop` option to `transcode-video`. This changes the behavior of `--crop detect` to mimic the `--no-constrain` option in the `detect-crop` tool.
652
- * Add a `--fallback-crop` option to `transcode-video`. This selects fallback crop values, from HandBrake, MPlayer or no crop at all, if `--crop detect` fails. This makes the new `--no-constrain-crop` option more useful since failure is more likely without constraints. Via #56 from @cameronks.
653
- * Add a `--aac-encoder` option to `transcode-video`. This gives Windows and Linux users access to the Fraunhofer FDK AAC encoder if it's compiled into their version of `HandBrakeCLI`. Via #35 from @cnrd.
654
- * Allow a colon (":") instead of a just period (".") to separate the two numerical components of a stream identifier when parsing scan output from `HandBrakeCLI`. This ensures compatibility with different versions of libavcodec and should fix several mysterious bugs on some Linux configurations. Via #30 and #41 from @dgibbs64.
676
+ * Add a `--fallback-crop` option to `transcode-video`. This selects fallback crop values, from HandBrake, MPlayer or no crop at all, if `--crop detect` fails. This makes the new `--no-constrain-crop` option more useful since failure is more likely without constraints. Via [ #56](https://github.com/donmelton/video_transcoding/issues/56) from [@cameronks](https://github.com/cameronks).
677
+ * Add a `--aac-encoder` option to `transcode-video`. This gives Windows and Linux users access to the Fraunhofer FDK AAC encoder if it's compiled into their version of `HandBrakeCLI`. Via [ #35](https://github.com/donmelton/video_transcoding/pull/35) from [@cnrd](https://github.com/cnrd).
678
+ * Allow a colon (":") instead of a just period (".") to separate the two numerical components of a stream identifier when parsing scan output from `HandBrakeCLI`. This ensures compatibility with different versions of libavcodec and should fix several mysterious bugs on some Linux configurations. Via [ #30](https://github.com/donmelton/video_transcoding/issues/30) and [ #41](https://github.com/donmelton/video_transcoding/issues/41) from [@dgibbs64](https://github.com/dgibbs64).
655
679
  * Maintain 480p video bitrate targets in `transcode-video` when scaling down to 480p using `--max-width 854 --max-height 480`. Via #58 from @mschout.
656
680
  * Remove the deprecated `--old-behavior` option in `transcode-video`.
657
681
  * Clarify the purpose of `--abr` and `--vbr` in the `--help` output of `transcode-video`.
658
682
  * Update the "README" document to:
659
- * Add "FAQ" section. Via #26 from @reiesu and #59 from @dgibbs64.
683
+ * Add "FAQ" section. Via [ #26](https://github.com/donmelton/video_transcoding/issues/26) from [@reiesu](https://github.com/reiesu) and [ #59](https://github.com/donmelton/video_transcoding/issues/59) from [@dgibbs64](https://github.com/dgibbs64).
660
684
  * Add this "History" section.
661
685
  * Spell "rate control" as one word, like a real transcoding geek.
662
686
  * Insert a missing "you" in the first paragraph of the "Installation" section.
663
687
  * Mention and link to Linuxbrew in the "Requirements" section.
664
688
  * Describe the default ratecontrol system as a "modified constrained variable bitrate (CVBR) mode."
665
- * Add example output when HandBrake and MPlayer disagree to the "Using `detect-crop`" section. Via #18 from @alanwsmith.
689
+ * Add example output when HandBrake and MPlayer disagree to the "Using `detect-crop`" section. Via [ #18](https://github.com/donmelton/video_transcoding/issues/18) from [@alanwsmith](https://github.com/alanwsmith).
666
690
  * Update the status of DTS-HD decoding for HandBrake and MakeMKV in the "Why convert lossless audio?" section.
667
691
 
668
- ### 0.7.0
692
+ ### [0.7.0](https://github.com/donmelton/video_transcoding/releases/tag/0.7.0)
669
693
 
670
694
  Thursday, April 7, 2016
671
695
 
672
- * Once again, lower the video bitrate targets for 480p and 720p output in `transcode-video`. Note that 1080p and 2160p targets still remain unchanged.
696
+ * Once again, lower the video bitrate targets for 480p and 720p output in `transcode-video`. Note that 1080p and 2160p targets still remain unchanged. Via [ #55](https://github.com/donmelton/video_transcoding/issues/55).
673
697
  * Update the "README" document to:
674
698
  * Reflect changes to the 480p and 720p video bitrate targets.
675
699
  * Revise description of and recommendation for the `--quick` option.
@@ -679,7 +703,7 @@ Thursday, April 7, 2016
679
703
  * Remove the deprecated `--big` option in `transcode-video`.
680
704
  * Separate `--small` and `--small-video` in the `--help` output of `transcode-video`.
681
705
 
682
- ### 0.6.0
706
+ ### [0.6.0](https://github.com/donmelton/video_transcoding/releases/tag/0.6.0)
683
707
 
684
708
  Sunday, April 3, 2016
685
709
 
@@ -689,46 +713,46 @@ Sunday, April 3, 2016
689
713
  * Lower the video bitrate targets for 480p and 720p output to keep bitrates and file sizes closer to that produced by the old ratecontrol system. Note that 1080p and 2160p targets remain unchanged.
690
714
  * Add an `--old-behavior` option to restore the old ratecontrol system and video bitrate targets for users not yet wanting to change over. This option is only temporary and will soon be deprecated and then removed.
691
715
  * Update the "README" document to reflect changes to the 480p and 720p video bitrate targets.
692
- * Remove an obsolete `brew install caskroom/cask/brew-cask` line from the "README" document. Via #54 from @timsutton.
716
+ * Remove an obsolete `brew install caskroom/cask/brew-cask` line from the "README" document. Via [ #54](https://github.com/donmelton/video_transcoding/pull/54) from [@timsutton](https://github.com/timsutton).
693
717
 
694
- ### 0.5.1
718
+ ### [0.5.1](https://github.com/donmelton/video_transcoding/releases/tag/0.5.1)
695
719
 
696
720
  Thursday, February 25, 2016
697
721
 
698
- * Don't fail if the `ffmpeg` version string can't be parsed. Via #43 from @rementis, @Lambdafive and @kford.
722
+ * Don't fail if the `ffmpeg` version string can't be parsed. Via [ #43](https://github.com/donmelton/video_transcoding/issues/43) from [@rementis](https://github.com/rementis), [@Lambdafive](https://github.com/Lambdafive) and [@kford](https://github.com/kford).
699
723
  * Remove the deprecated `--cvbr` option in `transcode-video`.
700
724
 
701
- ### 0.5.0
725
+ ### [0.5.0](https://github.com/donmelton/video_transcoding/releases/tag/0.5.0)
702
726
 
703
727
  Thursday, January 14, 2016
704
728
 
705
729
  * Raise the default video bitrate targets and AC-3 audio bitrate limits in `transcode-video`:
706
730
  * Deprecate the `--big` option since its behavior is now the default. An informal survey via Twitter and Facebook showed that about 90% of users (including myself) responding were always using the `--big` option anyway to get higher quality.
707
731
  * Add a `--small` option to restore the old video bitrate targets and AC-3 audio bitrate limits.
708
- * Add a `--small-video` option to restore only the old video bitrate targets. Via Facebook from @DaveHamilton.
732
+ * Add a `--small-video` option to restore only the old video bitrate targets. Via Facebook from [@DaveHamilton](https://github.com/DaveHamilton).
709
733
  * Update the "README" document to reflect all these changes.
710
734
  * Move `--abr` and `--vbr` to the advanced options section in the `--help` output of `transcode-video`.
711
735
  * Deprecate the experimental `--cvbr` option in `transcode-video`.
712
736
 
713
- ### 0.4.0
737
+ ### [0.4.0](https://github.com/donmelton/video_transcoding/releases/tag/0.4.0)
714
738
 
715
- Monday, January 1, 2016
739
+ Monday, January 11, 2016
716
740
 
717
741
  * Add a `--cvbr` option to `transcode-video`. This implements a very experimental variation of the default ratecontrol system with a target bitrate as its single argument. Use it for evaluation purposes only.
718
742
 
719
- ### 0.3.1
743
+ ### [0.3.1](https://github.com/donmelton/video_transcoding/releases/tag/0.3.1)
720
744
 
721
745
  Friday, January 8, 2016
722
746
 
723
747
  * Fix compatibility with development/nightly builds of `HandBrakeCL` in `transcode-video`:
724
- * Always force the x264 `medium` preset to override the new `veryfast` default value. Via #36 from @cnrd.
748
+ * Always force the x264 `medium` preset to override the new `veryfast` default value. Via [ #36](https://github.com/donmelton/video_transcoding/pull/36) from [@cnrd](https://github.com/cnrd).
725
749
  * Explicitly set the encoder profile to `high` to override the new `main` default value.
726
750
  * Explicitly (and dynamically) set the encoder level to override the new `4.0` default value.
727
- * Fix a stupid regression from version 0.2.8 caused by a typo in the patch for the SubRip-format text file offset fix to `transcode-video`. Via #37 from @bpharriss.
751
+ * Fix a stupid regression from version 0.2.8 caused by a typo in the patch for the SubRip-format text file offset fix to `transcode-video`. Via [ #37](https://github.com/donmelton/video_transcoding/issues/37) from [@bpharriss](https://github.com/bpharriss).
728
752
  * Be more lenient about `--encoder-option` arguments in `transcode-video` so `8x8dct` is allowed.
729
753
  * Always print the `HandBrakeCLI` version string to diagnostic output even if it can't be parsed.
730
754
 
731
- ### 0.3.0
755
+ ### [0.3.0](https://github.com/donmelton/video_transcoding/releases/tag/0.3.0)
732
756
 
733
757
  Tuesday, January 5, 2016
734
758
 
@@ -736,58 +760,58 @@ Tuesday, January 5, 2016
736
760
  * Add a `--vbr` option to `transcode-video`. This implements a true VBR ratecontrol system with a constant ratefactor as its single argument, much like HandBrake's default behavior when using its `--quality` option. It's useful mostly for comparison testing against the default ratecontrol system.
737
761
  * Update all copyright notices to the year 2016.
738
762
 
739
- ### 0.2.8
763
+ ### [0.2.8](https://github.com/donmelton/video_transcoding/releases/tag/0.2.8)
740
764
 
741
765
  Tuesday, January 5, 2016
742
766
 
743
- * Prevent the `--bind-srt-language` option in `transcode-video` from also setting the SubRip-format text file offset to the same value. This was a stupid copy and paste error since the initial project version. Via #25 from @arikalish.
744
- * Don't fail if the `HandBrakeCLI` version string can't be parsed. Via #29 from @paulbailey.
745
- * Don't fail if the `mp4track` version string can't be parsed. Via #27 from @dgibbs64.
746
- * Add a missing preposition to the last bullet point of the "Why MakeMKV?" section in the "README" document. Via #32 from @eventualbuddha.
767
+ * Prevent the `--bind-srt-language` option in `transcode-video` from also setting the SubRip-format text file offset to the same value. This was a stupid copy and paste error since the initial project version. Via [ #25](https://github.com/donmelton/video_transcoding/pull/25) from [@arikalish](https://github.com/arikalish).
768
+ * Don't fail if the `HandBrakeCLI` version string can't be parsed. Via [ #29](https://github.com/donmelton/video_transcoding/issues/29) from [@paulbailey](https://github.com/paulbailey).
769
+ * Don't fail if the `mp4track` version string can't be parsed. Via [ #27](https://github.com/donmelton/video_transcoding/issues/27) from [@dgibbs64](https://github.com/dgibbs64).
770
+ * Add a missing preposition to the last bullet point of the "Why MakeMKV?" section in the "README" document. Via [ #32](https://github.com/donmelton/video_transcoding/pull/32) from [@eventualbuddha](https://github.com/eventualbuddha).
747
771
 
748
- ### 0.2.7
772
+ ### [0.2.7](https://github.com/donmelton/video_transcoding/releases/tag/0.2.7)
749
773
 
750
774
  Tuesday, July 7, 2015
751
775
 
752
- * Apply the `--subtitle-forced` option when scanning subtitles in `transcode-video`. Via #20 from @rhapsodians.
776
+ * Apply the `--subtitle-forced` option when scanning subtitles in `transcode-video`. Via [ #20](https://github.com/donmelton/video_transcoding/issues/20) from [@rhapsodians](https://github.com/rhapsodians).
753
777
 
754
- ### 0.2.6
778
+ ### [0.2.6](https://github.com/donmelton/video_transcoding/releases/tag/0.2.6)
755
779
 
756
780
  Wednesday, May 20, 2015
757
781
 
758
- * Prevent the user's file format choice from corrupting the output path in `transcode-video` and `convert-video`. Via #5 from @arikalish.
782
+ * Prevent the user's file format choice from corrupting the output path in `transcode-video` and `convert-video`. Via [ #5](https://github.com/donmelton/video_transcoding/issues/5) from [@arikalish](https://github.com/arikalish).
759
783
 
760
- ### 0.2.5
784
+ ### [0.2.5](https://github.com/donmelton/video_transcoding/releases/tag/0.2.5)
761
785
 
762
786
  Sunday, May 17, 2015
763
787
 
764
788
  * Simplify the calculation of `vbv-bufsize` in `transcode-video`.
765
789
 
766
- ### 0.2.4
790
+ ### [0.2.4](https://github.com/donmelton/video_transcoding/releases/tag/0.2.4)
767
791
 
768
792
  Friday, May 15, 2015
769
793
 
770
- * Prevent an undefined method error if `HandBrakeCLI` removes tracks during scan. Via #15 from @blackoctopus.
794
+ * Prevent an undefined method error if `HandBrakeCLI` removes tracks during scan. Via [ #15](https://github.com/donmelton/video_transcoding/issues/15) from [@blackoctopus](https://github.com/blackoctopus).
771
795
 
772
- ### 0.2.3
796
+ ### [0.2.3](https://github.com/donmelton/video_transcoding/releases/tag/0.2.3)
773
797
 
774
798
  Tuesday, May 12, 2015
775
799
 
776
- * No longer fail on invalid audio and subtitle track information when parsing scan output from `HandBrakeCLI`. Via #11 from @eltito51 and #13 from @tchjunky.
800
+ * No longer fail on invalid audio and subtitle track information when parsing scan output from `HandBrakeCLI`. Via [ #11](https://github.com/donmelton/video_transcoding/issues/11) from [@eltito51](https://github.com/eltito51) and [ #13](https://github.com/donmelton/video_transcoding/issues/13) from [@tchjunky](https://github.com/tchjunky).
777
801
 
778
- ### 0.2.2
802
+ ### [0.2.2](https://github.com/donmelton/video_transcoding/releases/tag/0.2.2)
779
803
 
780
804
  Monday, May 11, 2015
781
805
 
782
806
  * Ensure the AC-3 passthru bitrate in `transcode-video` is never below the AC-3 encoding bitrate.
783
807
 
784
- ### 0.2.1
808
+ ### [0.2.1](https://github.com/donmelton/video_transcoding/releases/tag/0.2.1)
785
809
 
786
810
  Sunday, May 10, 2015
787
811
 
788
- * Fix the `--main-audio` option in `transcode-video` by ensuring the `resolve_main_audio` method actually returns a result. Via #9 from @JMoVS.
812
+ * Fix the `--main-audio` option in `transcode-video` by ensuring the `resolve_main_audio` method actually returns a result. Via [ #9](https://github.com/donmelton/video_transcoding/issues/9) from [@JMoVS](https://github.com/JMoVS).
789
813
 
790
- ### 0.2.0
814
+ ### [0.2.0](https://github.com/donmelton/video_transcoding/releases/tag/0.2.0)
791
815
 
792
816
  Saturday, May 9, 2015
793
817
 
@@ -796,34 +820,34 @@ Saturday, May 9, 2015
796
820
  * Ignore the sometimes missing patch version when checking MPlayer.
797
821
  * Mention in the "README" document that custom track names and external subtitle file names are allowed to contain commas.
798
822
 
799
- ### 0.1.4
823
+ ### [0.1.4](https://github.com/donmelton/video_transcoding/releases/tag/0.1.4)
800
824
 
801
825
  Friday, May 8, 2015
802
826
 
803
- * Fix a stupid regression from version 0.1.2 caused by the line endings fix on Windows. Via #7 from @brandonedling.
827
+ * Fix a stupid regression from version 0.1.2 caused by the line endings fix on Windows. Via [ #7](https://github.com/donmelton/video_transcoding/issues/7) from [@brandonedling](https://github.com/brandonedling).
804
828
 
805
- ### 0.1.3
829
+ ### [0.1.3](https://github.com/donmelton/video_transcoding/releases/tag/0.1.3)
806
830
 
807
831
  Friday, May 8, 2015
808
832
 
809
- * Check the extra version number for MPlayer to accept all builds. Via #6 from @CallumKerrEdwards.
833
+ * Check the extra version number for MPlayer to accept all builds. Via [ #6](https://github.com/donmelton/video_transcoding/issues/6) from [@CallumKerrEdwards](https://github.com/CallumKerrEdwards).
810
834
 
811
- ### 0.1.2
835
+ ### [0.1.2](https://github.com/donmelton/video_transcoding/releases/tag/0.1.2)
812
836
 
813
837
  Thursday, May 7, 2015
814
838
 
815
- * Fix handling of DOS-style line endings when parsing scan output from `HandBrakeCLI` on Windows. Via #4 from @CallumKerrEdwards and @commandtab.
839
+ * Fix handling of DOS-style line endings when parsing scan output from `HandBrakeCLI` on Windows. Via [ #4](https://github.com/donmelton/video_transcoding/issues/4) from [@CallumKerrEdwards](https://github.com/CallumKerrEdwards) and [@commandtab](https://github.com/commandtab).
816
840
  * Disable automatic subtitle burning in `transcode-video` when input is MP4 format.
817
- * Clarify usage of `--copy-audio` option in the "README" document.
818
- * Fix some section links in the "README" document. Via #3 from @vitorgalvao.
841
+ * Clarify usage of `--copy-audio` option in the "README" document. Via [ #5](https://github.com/donmelton/video_transcoding/issues/5) from [@arikalish](https://github.com/arikalish).
842
+ * Fix some section links in the "README" document. Via [ #3](https://github.com/donmelton/video_transcoding/pull/3) from [@vitorgalvao](https://github.com/vitorgalvao).
819
843
 
820
- ### 0.1.1
844
+ ### [0.1.1](https://github.com/donmelton/video_transcoding/releases/tag/0.1.1)
821
845
 
822
846
  Wednesday, May 6, 2015
823
847
 
824
- * Add a workaround in the `Media` class `initialize` method for no required keyword arguments in Ruby 2.0. Via #1 from @cadonau and #2 from @CallumKerrEdwards.
848
+ * Add a workaround in the `Media` class `initialize` method for no required keyword arguments in Ruby 2.0. Via [ #1](https://github.com/donmelton/video_transcoding/pull/1) from [@cadonau](https://github.com/cadonau) and [ #2](https://github.com/donmelton/video_transcoding/issues/2) from [@CallumKerrEdwards](https://github.com/CallumKerrEdwards).
825
849
 
826
- ### 0.1.0
850
+ ### [0.1.0](https://github.com/donmelton/video_transcoding/releases/tag/0.1.0)
827
851
 
828
852
  Tuesday, May 5, 2015
829
853
 
@@ -39,6 +39,7 @@ r, ratefactor average P-frame quantizer for transcoding
39
39
 
40
40
  Options:
41
41
  --reverse reverse direction of sort
42
+ --tabular use tab character as field delimiter and surpress labels
42
43
 
43
44
  -v, --verbose increase diagnostic information
44
45
  -q, --quiet decrease " "
@@ -51,6 +52,7 @@ HERE
51
52
  def initialize
52
53
  super
53
54
  @reverse = false
55
+ @tabular = false
54
56
  @info = nil
55
57
  @logs = []
56
58
  @paths = []
@@ -58,6 +60,7 @@ HERE
58
60
 
59
61
  def define_options(opts)
60
62
  opts.on('--reverse') { @reverse = true }
63
+ opts.on('--tabular') { @tabular = true }
61
64
  end
62
65
 
63
66
  def configure
@@ -105,6 +108,16 @@ HERE
105
108
  prefix = ''
106
109
  end
107
110
 
111
+ if @tabular
112
+ delimiter = "\t"
113
+ fps_label = ''
114
+ kbps_label = ''
115
+ else
116
+ delimiter = ' '
117
+ fps_label = ' fps'
118
+ kbps_label = ' kbps'
119
+ end
120
+
108
121
  report = []
109
122
 
110
123
  @logs.each do |log|
@@ -153,9 +166,9 @@ HERE
153
166
  when :time, :speed
154
167
  if fps_line.nil?
155
168
  if @info == :time
156
- report << "00:00:00 #{video}"
169
+ report << "00:00:00#{delimiter}#{video}"
157
170
  else
158
- report << "00.000000 fps #{video}"
171
+ report << "00.000000#{fps_label}#{delimiter}#{video}"
159
172
  end
160
173
  else
161
174
  Console.debug fps_line
@@ -185,40 +198,39 @@ HERE
185
198
  duration = ($1.to_i * 60 * 60) + ($2.to_i * 60) + $3.to_i
186
199
  fail "frame rate not found: #{log}" if rate_line.nil?
187
200
  Console.debug rate_line
188
- rate = rate_line.sub(/^.*: /, '').sub(/^.*constant /, '').sub(/ fps.*$/, '').to_f
201
+ rate = rate_line.sub(/^.*: [^0-9]*/, '').sub(/ fps.*$/, '').to_f
189
202
  seconds = ((duration * rate) / fps.to_f).to_i
190
203
  hours = seconds / (60 * 60)
191
204
  minutes = (seconds / 60) % 60
192
205
  seconds = seconds % 60
193
- report << format("%02d:%02d:%02d %s", hours, minutes, seconds, video)
206
+ report << format("%02d:%02d:%02d%s%s", hours, minutes, seconds, delimiter, video)
194
207
  else
195
208
  fail "duration not found: #{log}"
196
209
  end
197
- # TODO
198
210
  else
199
- report << "#{fps} fps #{video}"
211
+ report << "#{fps}#{fps_label}#{delimiter}#{video}"
200
212
  end
201
213
  end
202
214
  when :bitrate
203
215
  if bitrate_line.nil?
204
- report << "0000.00 kbps #{video}"
216
+ report << "0000.00#{kbps_label}#{delimiter}#{video}"
205
217
  else
206
218
  Console.debug bitrate_line
207
219
 
208
- if bitrate_line =~ /[0-9.]+ kbps/
209
- report << "#{$MATCH} #{video}"
220
+ if bitrate_line =~ /([0-9.]+) kbps/
221
+ report << "#{$1}#{kbps_label}#{delimiter}#{video}"
210
222
  else
211
223
  fail "bitrate not found: #{log}"
212
224
  end
213
225
  end
214
226
  when :ratefactor
215
227
  if ratefactor_line.nil?
216
- report << "00.00 #{video}"
228
+ report << "00.00#{delimiter}#{video}"
217
229
  else
218
230
  Console.debug ratefactor_line
219
231
 
220
232
  if ratefactor_line =~ /Avg QP: ?([0-9.]+)/
221
- report << "#{$1} #{video}"
233
+ report << "#{$1}#{delimiter}#{video}"
222
234
  else
223
235
  fail "ratefactor not found: #{log}"
224
236
  end
data/bin/transcode-video CHANGED
@@ -95,22 +95,25 @@ Video options:
95
95
  (can be used multiple times)
96
96
 
97
97
  Audio options:
98
- --main-audio TRACK[=NAME]
99
- select main audio track with optional name
100
- (default: 1 or first in selected language)
98
+ --main-audio TRACK[=NAME]|LANGUAGE[=NAME]
99
+ select main track by number or first with language code
100
+ assigning it an optional name
101
+ (default: first track, i.e. 1)
102
+ (language code must be ISO 639-2 format, e.g.: `eng`)
101
103
  (default output can be two audio tracks,
102
104
  both surround and stereo, i.e. "width" is `double`)
103
- --add-audio TRACK[=NAME]|language[=CODE[,...]]|all
105
+ --add-audio TRACK[=NAME]|LANGUAGE[,LANGUAGE,...]|all
104
106
  add track selected by number assigning it an optional name
105
- or add tracks selected by one or more languages
107
+ or add tracks selected with one or more language codes
106
108
  or add all tracks
107
- (language is indicated by ISO 639-2 code, e.g.: `eng`)
109
+ (language code must be ISO 639-2 format, e.g.: `eng`)
108
110
  (multiple languages are separated by commas)
109
111
  (default output is single AAC audio track,
110
112
  i.e. "width" is `stereo`)
111
113
  (can be used multiple times)
112
- --audio-width TRACK|all=double|surround|stereo
113
- set audio output "width" for specific track or all tracks
114
+ --audio-width TRACK|main|other|all=double|surround|stereo
115
+ set audio output "width" for specific track by number
116
+ or main track or other non-main tracks or all tracks
114
117
  with `double` to allow room for two output tracks
115
118
  with `surround` to allow single surround or stereo track
116
119
  with `stereo` to allow only single stereo track
@@ -142,11 +145,11 @@ Subtitle options:
142
145
  --force-subtitle TRACK|scan
143
146
  add track selected by number and set forced flag
144
147
  or scan for forced track in same language as main audio
145
- --add-subtitle TRACK|language[=CODE[,...]]|all
148
+ --add-subtitle TRACK|LANGUAGE[,LANGUAGE,...]|all
146
149
  add track selected by number
147
- or add tracks selected by one or more languages
150
+ or add tracks selected with one or more language codes
148
151
  or add all tracks
149
- (language is indicated by ISO 639-2 code, e.g.: `eng`)
152
+ (language code must be ISO 639-2 format, e.g.: `eng`)
150
153
  (multiple languages are separated by commas)
151
154
  (can be used multiple times)
152
155
  --no-auto-burn don't automatically burn first forced subtitle
@@ -224,6 +227,7 @@ HERE
224
227
  @fallback_crop = nil
225
228
  @target_bitrate = nil
226
229
  @main_audio = nil
230
+ @main_audio_language = nil
227
231
  @extra_audio = []
228
232
  @audio_name = {}
229
233
  @audio_language = []
@@ -432,29 +436,34 @@ HERE
432
436
  end
433
437
 
434
438
  opts.on '--main-audio ARG' do |arg|
435
- if arg =~ /^([1-9][0-9]*)(?:=(.+))?$/
436
- track = $1.to_i
437
- @main_audio = track
438
- @audio_name[track] = $2 unless $2.nil?
439
+ if arg =~ /^(?:([1-9][0-9]*)(?:=(.+))?|([a-z]{3})(?:=(.+))?)$/
440
+ if $3.nil?
441
+ track = $1.to_i
442
+ @main_audio = track
443
+ @audio_name[track] = $2 unless $2.nil?
444
+ @main_audio_language = nil
445
+ else
446
+ @main_audio_language = $3
447
+ @audio_name[:main] = $4 unless $4.nil?
448
+ @main_audio = nil
449
+ end
439
450
  else
440
451
  fail UsageError, "invalid main audio argument: #{arg}"
441
452
  end
442
453
  end
443
454
 
444
455
  opts.on '--add-audio ARG' do |arg|
445
- if arg =~ /^(?:([1-9][0-9]*)(?:=(.+))?|lang(?:uage)?=([a-z]{3}(?:,[a-z]{3})*)|(all))$/
446
- if $4.nil?
447
- if $3.nil?
448
- track = $1.to_i
449
- @extra_audio << track unless @extra_audio.first.is_a? Symbol
450
- @audio_name[track] = $2 unless $2.nil?
451
- elsif @extra_audio.first != :all
452
- @extra_audio = [:language]
453
- @audio_language = $3.split(',')
454
- end
455
- else
456
+ if arg =~ /^(?:([1-9][0-9]*)(?:=(.+))?|([a-z]{3}(?:,[a-z]{3})*))$/
457
+ if $3.nil?
458
+ track = $1.to_i
459
+ @extra_audio << track unless @extra_audio.first.is_a? Symbol
460
+ @audio_name[track] = $2 unless $2.nil?
461
+ elsif $3 == 'all'
456
462
  @extra_audio = [:all]
457
463
  @audio_language = []
464
+ elsif @extra_audio.first != :all
465
+ @extra_audio = [:language]
466
+ @audio_language = $3.split(',')
458
467
  end
459
468
  else
460
469
  fail UsageError, "invalid add audio argument: #{arg}"
@@ -462,10 +471,15 @@ HERE
462
471
  end
463
472
 
464
473
  opts.on '--audio-width ARG' do |arg|
465
- if arg =~ /^([1-9][0-9]*|all)=(double|surround|stereo)$/
474
+ if arg =~ /^([1-9][0-9]*|main|other|all)=(double|surround|stereo)$/
466
475
  width = $2.to_sym
467
476
 
468
- if $1 == 'all'
477
+ case $1
478
+ when 'main'
479
+ @audio_width[:main] = width
480
+ when 'other'
481
+ @audio_width[:other] = width
482
+ when 'all'
469
483
  @audio_width[:main] = width
470
484
  @audio_width[:other] = width
471
485
  else
@@ -563,19 +577,15 @@ HERE
563
577
  end
564
578
 
565
579
  opts.on '--add-subtitle ARG' do |arg|
566
- if arg =~ /^(?:([1-9][0-9]*)|lang(?:uage)?=([a-z]{3}(?:,[a-z]{3})*)|(all))$/
567
- if $3.nil?
568
- if $2.nil?
569
- unless @extra_subtitle.first.is_a? Symbol
570
- @extra_subtitle << $1.to_i
571
- end
572
- elsif @extra_subtitle.first != :all
573
- @extra_subtitle = [:language]
574
- @subtitle_language = $2.split(',')
575
- end
576
- else
580
+ if arg =~ /^(?:([1-9][0-9]*)|([a-z]{3}(?:,[a-z]{3})*))$/
581
+ if $2.nil?
582
+ @extra_subtitle << $1.to_i unless @extra_subtitle.first.is_a? Symbol
583
+ elsif $2 == 'all'
577
584
  @extra_subtitle = [:all]
578
585
  @subtitle_language = []
586
+ elsif @extra_subtitle.first != :all
587
+ @extra_subtitle = [:language]
588
+ @subtitle_language = $2.split(',')
579
589
  end
580
590
  else
581
591
  fail UsageError, "invalid add subtitle argument: #{arg}"
@@ -1059,9 +1069,13 @@ HERE
1059
1069
  track = @main_audio
1060
1070
 
1061
1071
  if track.nil?
1062
- unless @audio_language.empty?
1072
+ unless @main_audio_language.nil?
1063
1073
  track, _ = media.info[:audio].find do |_, info|
1064
- @audio_language.include? info[:language]
1074
+ @main_audio_language == info[:language]
1075
+ end
1076
+
1077
+ unless track.nil?
1078
+ @audio_name[track] = @audio_name[:main] if @audio_name.include? :main
1065
1079
  end
1066
1080
  end
1067
1081
 
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.8.1'
8
+ VERSION = '0.9.0'
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video_transcoding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Melton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Video Transcoding is a package of tools to transcode, inspect