language selections given on the command line to avi2mkv.
I should start testing promised functionality more thoroughly.
Have fun,
fangorn

Code: Select all
blu2mkv title01.mkv
Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/local/bin/toolbox_fangorn, line 43.
Source file is of Type Matroska
Width = 1920
Height = 1080
Aspect = 1.77777777777778
Aspect should be 1.77777777777778
Source Framerate: 23.976
Input Framerate used: 23.976
Output Framerate used: 23.976
No audio stream specified. Trying to use specified languages if available in source file.
If not, default stream will be used.
extracting audio stream for later usage
MPlayer 32128-4.4.3 (C) 2000-2010 MPlayer Team
Playing title01.mkv.
Cache fill: 0.00% (0 bytes)
libavformat file format detected.
[matroska,webm @ 0x1deade0] Unknown EBML doctype '(none)'
[matroska,webm @ 0x1deade0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (dca), -aid 0, -alang ger
VIDEO: [H264] 1920x1080 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Core dumped ;)
Exiting... (End of file)
Resolution = 1920:1080
Do not scale is yes
video is interlaced: no,
dynamic noise reduction is active:
calling external program choose_video_parameters
unknown_path -f 23.976 -o tmpdir_title01/title01_x264_encoding_parameters.txt -p nq -w 1920 -h 1080 -W 1920 -H 1080 -B 6000
external call failed
unknown_path -f 23.976 -o tmpdir_title01/title01_x264_encoding_parameters.txt -p nq -w 1920 -h 1080 -W 1920 -H 1080 -B 6000
video filters used for first pass: -vf hqdn3d=2:1:2
AUDIO channel used -aid 0
MEncoder 32128-4.4.3 (C) 2000-2010 MPlayer Team
Option x264encopts: turbo option is deprecated; use slow_firstpass to disable turbo
success: format: 0 data: 0x0 - 0x2f370a0a
libavformat file format detected.
[matroska,webm @ 0x2860b30] Unknown EBML doctype '(none)'
[matroska,webm @ 0x2860b30] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (dca), -aid 0, -alang ger
VIDEO: [H264] 1920x1080 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:1920x1080 fps:23.976 ftime:=0.0417
Input fps will be interpreted as 23.976 instead.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [hqdn3d=2:1:2]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
audiocodec: framecopy (format=2001 chans=6 rate=48000 bits=0 B/s=0 sample-0)
Pos: 0.0s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V: -nan [0:0]
1 duplicate frame(s)!
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.0s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V: -nan [0:0]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [info]: profile Main, level 4.0
1 duplicate frame(s)!
Writing header...
ODML: vprp aspect is 16:9.
Pos: 0.1s 16f ( 0%) 0.00fps Trem: 0min 0mb A-V: -nan [0:0]
Writing header...
ODML: vprp aspect is 16:9.
Pos: 43.1s 1047f ( 1%) 22.33fps Trem: 77min 3320mb A-V: -nan [6464:0]
Too many audio packets in the buffer: (4096 in 21222288 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.Code: Select all
tux fangorn # ./avi2mkv
Can't locate feature.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl .) at ./avi2mkv line 220.
BEGIN failed--compilation aborted at ./avi2mkv line 220.
Code: Select all
use feature 'switch';Code: Select all
mencoder not available in path unknown_path. Please correct this.Code: Select all
mencoder: /usr/bin/mencoder /usr/local/bin/mencoder /usr/share/man/man1/mencoder.1.gzCode: Select all
menc ./foo.mp4
Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/local/bin/toolbox_fangorn, line 43.
File Type: MP4/3GP/3G2 ISO Media
FPS: 59.750
width: 384
height: 288
aspect: 1.33333333333333
calling external program choose_video_parameters
-> Using "Normal Quality" preset
nice: unknown_path: No such file or directory
Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/local/bin/toolbox_fangorn, line 43.
movie title is foo
mplayer not available in path unknown_path. Please correct this.
Code: Select all
my $command = sprintf "%s -identify -frames 0 -vc null -vo null -ao null %s 2>&1", $progs->{mplayer}, $opt->{file};
print $command . "\n" if $opt->{debug};
@mplayer_info = `$command`;
chomp @mplayer_info;
Yes, this is the case for most of my scripts. Whitespace and other crude characters are not officially supporteddevsk wrote:avi2mkv script doesn't seem to like whitespace in file name. There are some quoting issues.
This is only a following error. Either your input file has some strange settings or your mplayer/ffmpeg does not recognize its special format.Korhul wrote:Too many audio packets in buffer? What is the cause for this and how to get rid of it, please?Code: Select all
blu2mkv title01.mkv ... Playing title01.mkv. Cache fill: 0.00% (0 bytes) libavformat file format detected. [matroska,webm @ 0x1deade0] Unknown EBML doctype '(none)' [matroska,webm @ 0x1deade0] Estimating duration from bitrate, this may be inaccurate [lavf] stream 0: video (h264), -vid 0 [lavf] stream 1: audio (dca), -aid 0, -alang ger VIDEO: [H264] 1920x1080 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s) Core dumped ;) Exiting... (End of file) ... Too many audio packets in the buffer: (4096 in 21222288 bytes). Maybe you are playing a non-interleaved stream/file or the codec failed? For AVI files, try to force non-interleaved mode with the -ni option.
[/quote]ktsaou wrote:Hi,
I am trying to use these scripts, but I get this error:
The offending line is this:Code: Select all
tux fangorn # ./avi2mkv Can't locate feature.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl .) at ./avi2mkv line 220. BEGIN failed--compilation aborted at ./avi2mkv line 220.
I read this is a feature of perl 5.10 but I have perl 5.8.8 installed. Is this right? We should install an unstable version of perl for these to work?Code: Select all
use feature 'switch';
Regards,
Costa
Is any of the two executables /usr/bin/mencoder /usr/local/bin/mencoder referenced in your ~/.fangorn/config file? You have to give the full path in there, not just "mencoder".ExElNeT wrote:I am trying to use your recent version of avi2mkv and get the following error:
whereis mencoder gives:Code: Select all
mencoder not available in path unknown_path. Please correct this.
greetingsCode: Select all
mencoder: /usr/bin/mencoder /usr/local/bin/mencoder /usr/share/man/man1/mencoder.1.gz
Code: Select all
>grep mencoder ~/.fangorn/config
mencoder = /usr/local/bin/mencoder
I did not run into a problem like this ever. Something seems to be wrong with your environment. Please check your perl installation (perl 5.10 or higher) and the ~/.fangorn/config file. Maybe move ~/.fangorn/config somewhere else and let it generate a new one.msalerno wrote:I'm also having issues with these scripts. I have a bunch of small clips with different bitrates, some SD and some HD. I was and still am hoping that menc is the best way for me to batch encode these, but I'm getting too many errors.
Running the script with perl -d shows me that my first error is here:Code: Select all
menc ./foo.mp4 Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/local/bin/toolbox_fangorn, line 43. File Type: MP4/3GP/3G2 ISO Media FPS: 59.750 width: 384 height: 288 aspect: 1.33333333333333 calling external program choose_video_parameters -> Using "Normal Quality" preset nice: unknown_path: No such file or directory Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/local/bin/toolbox_fangorn, line 43. movie title is foo mplayer not available in path unknown_path. Please correct this.The script does not locate my mplayer, although like 370 is "$progs->{mplayer} = "/usr/bin/mplayer";" which is the correct path.Code: Select all
my $command = sprintf "%s -identify -frames 0 -vc null -vo null -ao null %s 2>&1", $progs->{mplayer}, $opt->{file}; print $command . "\n" if $opt->{debug}; @mplayer_info = `$command`; chomp @mplayer_info;
Are these scripts still maintained?
See the project page for a brief introduction. Useangry_vincent wrote:Hi!
How to work with scripts? , i have DVD copied to harddrive, for example, ~/video/eraserhead with audio_ts and video_ts subdirectories. I want to create a single eraserhead.mkv with highest quality possible. I can't find any documentation and examples for those scripts. Thx in advance
Code: Select all
riptoh264 <directoryname>Code: Select all
--override_video_encoder "-ovc copy"
Code: Select all
avi2mkv deusexhrtest-hd.mp4 -a3
Use of uninitialized value in scalar chomp at /usr/bin/avi2mkv line 526.
Movie deusexhrtest-hd.mp4 with title deusexhrtest-hd has a geometry of 1280 x 720 and a framerate of 30.000
Video stream is 0, audio stream(s) are 1
muxing to Matroska container
file type is AVI
language not found. trying to match languages with list of known translations
file type is AVI
Use of uninitialized value in split at /usr/bin/avi2mkv line 1043.
Use of uninitialized value in substitution (s///) at /usr/bin/avi2mkv line 1045.
Use of uninitialized value in string eq at /usr/bin/avi2mkv line 1308.
Use of uninitialized value in string eq at /usr/bin/avi2mkv line 1315.
Use of uninitialized value in string eq at /usr/bin/avi2mkv line 1335.
Argument "-aid 1" isn't numeric in subtraction (-) at /usr/bin/avi2mkv line 1342.
MEncoder SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
-1 is not an MEncoder option
Exiting... (error parsing command line)
joining internal and external audio streams
Use of uninitialized value in sprintf at /usr/bin/avi2mkv line 1661.
Use of uninitialized value in sprintf at /usr/bin/avi2mkv line 1782.
sh: unknown_path: not found
cleaning up temporary files
Code: Select all
--override_video_encoder "-ovc copy"No big issue here. I could hack together a quick script for mencoder / ffmpeg myself for converting mp4 source to mkv.I am sorry, but MP4 is not well tested as input for avi2mkv. Especially when not all optional parameters
are set (language codes for audio, video parameters, ...) or some non standard conformant formats
are used.
As the name avi2mkv implies avi should give the best user experience *ggg*The script is mainly designed as a helper script for the encoding scripts to convert the mencoder output -
which is best done as AVI - to other containers. It also works well with AVI containers from other sources,
containing MPEG4 video and of some kind.
If your toolset helps me to shrink the roughly 30 DVDs which sit on my external HDD to MKV files with h264 / AC3 in then, I am more than happyI hope you get a better user experience that way.![]()
I already have. Thanks for your toolkit !Have fun,
fangorn
Code: Select all
MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
Option x264encopts: turbo option is deprecated; use slow_firstpass to disable turbo
Line 1283 seems to process the subtitle streams:Can't use an undefined value as an ARRAY reference at /usr/local/bin/riptoh264 line 1283.
Code: Select all
[b]for (my $iter = 0; $iter < @{$opt->{SUB_LANGUAGE}}; $iter++) { [/b]
foreach my $twodigit (keys %usedlangs) {
print STDERR "2-digit code is $twodigit\n" if $opt->{debug};
print STDERR "stream language is " . @{$opt->{SUB_LANGUAGE}}[$iter] . "\n" if $opt->{debug};
if (@{$opt->{SUB_LANGUAGE}}[$iter] eq $twodigit) {
print STDERR "found matching sub stream for language $twodigit with sub stream id " . @{$opt->{SUB_SID}}[$iter] . "\n" if $opt->{debug};
push @subids, $iter;
$substreams++;
}
}
Code: Select all
/usr/bin/mplayer -dvd-device ZOMBIES_ANONYMOUS dvd://1 -aid 128 -dumpaudio -dumpfile tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_128.ac3
/usr/bin/mplayer -dvd-device ZOMBIES_ANONYMOUS dvd://1 -aid 130 -dumpaudio -dumpfile tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_130.ac3
skip telecining detection, using preset Method: 25p telecined to 25i
Detecting crop window:
704:576:10:0
/usr/local/bin/choose_video_parameters -f 25.000 -p nq -w 720 -h 576 -W 720 -H 576 -c 704:576:10:0 -B 1200 "tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_x264_encoding_parameters.txt"
using seleted preset nq
geometryfilteroptions
Using filterset:
common filters: crop=704:576:10:0
first pass: -vf crop=704:576:10:0
second pass: -vf crop=704:576:10:0
nice -n 10 /usr/bin/mencoder -dvd-device ZOMBIES_ANONYMOUS dvd://1 -vf crop=704:576:10:0 -nosub -ovc x264 -x264encopts mixed_refs:nombtree:partitions=p8x8,b8x8,i4x4:deblock:no8x8dct:bframes=10:weightp=1:me=hex:aq_mode=2:weight_b:cabac:keyint=250:chroma_me:b_pyramid=normal:bitrate=1200:direct_pred=spatial:subq=5:nodct_decimate:frameref=3:nofast_pskip:trellis=1:level_idc=41:b_adapt=1:threads=auto:ssim:psnr:pass=1:turbo=2 -passlogfile tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_2pass.log -oac mp3lame -lameopts vbr=0:br=128:mode=0 -o "tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_tmp.avi"
First encoding pass done
nice -n 10 /usr/bin/mencoder -dvd-device ZOMBIES_ANONYMOUS dvd://1 -vf crop=704:576:10:0 -nosub -ovc x264 -x264encopts mixed_refs:nombtree:partitions=p8x8,b8x8,i4x4:deblock:no8x8dct:bframes=10:weightp=1:me=hex:aq_mode=2:weight_b:cabac:keyint=250:chroma_me:b_pyramid=normal:bitrate=1200:direct_pred=spatial:subq=5:nodct_decimate:frameref=3:nofast_pskip:trellis=1:level_idc=41:b_adapt=1:threads=auto:ssim:psnr:pass=2 -passlogfile tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_2pass.log -oac mp3lame -lameopts vbr=0:br=128:mode=0 -o "tmpdir_ZOMBIES_ANONYMOUS/ZOMBIES_ANONYMOUS_tmp.avi"
Second encoding pass done
Now muxing Output file
Ripping subtitles
Code: Select all
eems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (50/2)
Input #0, mpeg, from 'VTS_01_0.VOB':
Duration: 00:00:29.96, start: 0.280000, bitrate: 10914 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 9000 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2[0x20]: Subtitle: dvdsub
Stream #0.3[0x21]: Subtitle: dvdsub
Stream #0.4[0x22]: Subtitle: dvdsub
Code: Select all
Title Matches....
DVD Episode - 01 [Xvid-AC3][11ADD24D].avi Title => DVD Episode - 01
DVD Episode - 02 [Xvid-AC3][F56EE4DD].avi Title => DVD Episode - 02
DVD Episode - 03 [Xvid-AC3][7C19F70C].avi Title => DVD Episode - 03
Process files with these matches? (y/n/q) y