Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO conveniently convert videos using mencoder, x264
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Aug 17, 2010 5:05 pm    Post subject: Reply with quote

New versions of blu2mkv, menc and riptoh264 are available that are now finally able to pass
language selections given on the command line to avi2mkv.

I should start testing promised functionality more thoroughly. ;-)

Have fun,

fangorn
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
Korhul
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2005
Posts: 75
Location: Czech Republic

PostPosted: Fri Sep 10, 2010 12:09 pm    Post subject: Reply with quote

Code:
 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.


Too many audio packets in buffer? What is the cause for this and how to get rid of it, please?
Back to top
View user's profile Send private message
ktsaou
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jul 2003
Posts: 80

PostPosted: Sat Oct 02, 2010 4:48 pm    Post subject: Reply with quote

Hi,

I am trying to use these scripts, but I get this error:

Code:
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.


The offending line is this:

Code:
use feature 'switch';


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?

Regards,

Costa
[/quote]
Back to top
View user's profile Send private message
ExElNeT
n00b
n00b


Joined: 11 Feb 2003
Posts: 37

PostPosted: Sat Oct 23, 2010 5:13 pm    Post subject: Reply with quote

I am trying to use your recent version of avi2mkv and get the following error:

Code:
mencoder not available in path unknown_path. Please correct this.


whereis mencoder gives:

Code:
mencoder: /usr/bin/mencoder /usr/local/bin/mencoder /usr/share/man/man1/mencoder.1.gz


greetings
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Mon Nov 22, 2010 1:50 am    Post subject: Reply with quote

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.

Code:
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.


Running the script with perl -d shows me that my first error is here:
Code:
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;


The script does not locate my mplayer, although like 370 is "$progs->{mplayer} = "/usr/bin/mplayer";" which is the correct path.

Are these scripts still maintained?
Back to top
View user's profile Send private message
angry_vincent
n00b
n00b


Joined: 21 Feb 2010
Posts: 30

PostPosted: Wed Dec 22, 2010 8:34 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sat Dec 25, 2010 12:46 am    Post subject: Reply with quote

avi2mkv script doesn't seem to like whitespace in file name. There are some quoting issues.
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 8:13 am    Post subject: Reply with quote

devsk wrote:
avi2mkv script doesn't seem to like whitespace in file name. There are some quoting issues.


Yes, this is the case for most of my scripts. Whitespace and other crude characters are not officially supported :twisted:

Sorry for the long time out. I somehow lost track of this thread. :roll:

I will now start develop the scripts again after just using them for quarter of a year.
_________________
Video Encoding scripts collection | Project page


Last edited by fangorn on Tue Feb 15, 2011 4:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 4:15 pm    Post subject: Reply with quote

I don't know if this is still relevant, but hey :roll:

Korhul wrote:
Code:
 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.


Too many audio packets in buffer? What is the cause for this and how to get rid of it, please?


This is only a following error. Either your input file has some strange settings or your mplayer/ffmpeg does not recognize its special format.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 4:19 pm    Post subject: Reply with quote

ktsaou wrote:
Hi,

I am trying to use these scripts, but I get this error:

Code:
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.


The offending line is this:

Code:
use feature 'switch';


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?

Regards,

Costa
[/quote]

Sorry, but yes. I originally intended to make this compatible to perl 5.8, but in the end it did not work.

Perl 5.10 is marked unstable because perl is a major core package. Many many scripts depend on it. I decided to use 5.10, but you always can install a 5.10 version in /usr/local in parallel and use this if you don't want to make it system wide.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 4:23 pm    Post subject: Reply with quote

ExElNeT wrote:
I am trying to use your recent version of avi2mkv and get the following error:

Code:
mencoder not available in path unknown_path. Please correct this.


whereis mencoder gives:

Code:
mencoder: /usr/bin/mencoder /usr/local/bin/mencoder /usr/share/man/man1/mencoder.1.gz


greetings


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".

Code:

>grep mencoder ~/.fangorn/config
mencoder                = /usr/local/bin/mencoder

_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 4:33 pm    Post subject: Reply with quote

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.

Code:
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.


Running the script with perl -d shows me that my first error is here:
Code:
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;


The script does not locate my mplayer, although like 370 is "$progs->{mplayer} = "/usr/bin/mplayer";" which is the correct path.

Are these scripts still maintained?


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.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 4:41 pm    Post subject: Reply with quote

angry_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


See the project page for a brief introduction. Use

Code:
riptoh264 <directoryname>

for standard encoding options for the main movie (way good enough for normal dvds if you ask me).

use -b <bitrate> to set a higher bitrate and -p uhq to change default x264 preset.

or use
Code:
--override_video_encoder "-ovc copy"
to skip video transcoding completely and use the original dvd MPEG2 video stream. Audio is copied by default anyway.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Feb 15, 2011 4:47 pm    Post subject: Reply with quote

By the way:

I am looking for a more or less helpfull project to train my QT programming skills.

An idea was a GUI tool for batch encoding with all my encoding scripts.

This means in a first step: Select the application and pull the files/directories to encode
into the program window. Encoding happens with the default settings from ~/.fangorn/config.

In a second step there could be a possibility to configure command line options from the GUI.

As I prefer the command line, this project would be completely for you. So please, raise a hand
if you are interested in having such a tool.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
bobspencer123
Guru
Guru


Joined: 19 Dec 2005
Posts: 544

PostPosted: Tue Feb 15, 2011 6:27 pm    Post subject: Reply with quote

I would definitely be interested in this ... would love it to be GTK but beggars can't be choosers :)
_________________
Increasingly becoming a 2 channel audio nut!
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Sun May 08, 2011 12:10 pm    Post subject: Reply with quote

I just uploaded a new version of riptoh264.

As I just had to encode some DVDs recently I discovered there is a problem with audio sync
when copying audio streams while encoding video with recent mplayer/mencoder.

riptoh264 now uses a workaround of encoding a fake MP3 audio stream while encoding the video
portion and later throw the MP3 stream away and replace it with the original streams.

While at it, I also uploaded new versions of avi2mkv and toolbox_fangorn.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
HolgerB
n00b
n00b


Joined: 07 Sep 2011
Posts: 49

PostPosted: Wed Sep 07, 2011 5:34 pm    Post subject: Shouldn't the fangorn encoding script also work under Debian Reply with quote

Hi there,

I have been trying to get the fangorn toolbox running on a Debian-based distrib. Linux Mint 10 x64 (which is based on Ubuntu 10.04 LTS more precisely).
I grabbed all the scripts from http://fangornsrealm.eu, made them executable and copied them to /usr/lib/

Just for experimenting I was trying to convert a 720p MP4 file (game test review) into an MKV container with MP3 audio. Unfortunately avi2mkv bombs out with this error messages:
Code:
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


The error in the mencoder commandline comes from a -1 as parameter.
I am really no perl expert but the error messages seem to be related to some audio related stuff,

Any ideas on this ?

TIA,
Holger
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Wed Sep 07, 2011 7:32 pm    Post subject: Reply with quote

@HolgerB
Welcome to the forum.

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.

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.

It should work without problems when you repackage the video with menc first.

If you don't want to degrade the video quality or invest the trancoding time, you can disable the
reencoding process with the menc option
Code:
--override_video_encoder "-ovc copy"
.

I hope you get a better user experience that way. :roll:

Have fun,
fangorn

Edit: I just recognize:

According to the help function options (-a3 for example) have to be placed between the program name and
the input filename. I don't have an idea what happens if the option is put after the filename. I have some
options that expect and use parameters that come after the inputfile. This is not good style, I know that,
but it was not doable in another way when the scripts were still shell scripts.

Best guess is, the behaviour of the script is undefined. Please, try the same command line with the -a3 before
the filename.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Wed Sep 07, 2011 7:44 pm    Post subject: Reply with quote

For the other users a quick information.

I am in the process of testing all scripts under Windows and have removed some errors that also
affect Linux systems. I will release the best tested versions of all times (TM) :twisted: soon.

Stay tuned.

fangorn
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
HolgerB
n00b
n00b


Joined: 07 Sep 2011
Posts: 49

PostPosted: Thu Sep 08, 2011 7:33 am    Post subject: Reply with quote

Hello fangorn,

thanks for your quick replies both to my e-mail and here in the forum.

Quote:

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.

No big issue here. I could hack together a quick script for mencoder / ffmpeg myself for converting mp4 source to mkv.
It was just a quick experiment and I had the MP4 laying around in my download folder but no AVI available.

Quote:

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.

As the name avi2mkv implies avi should give the best user experience *ggg*

Quote:

I hope you get a better user experience that way. :roll:

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 happy :)

Quote:

Have fun,
fangorn

I already have. Thanks for your toolkit !

Best regards,
Holger
Back to top
View user's profile Send private message
HolgerB
n00b
n00b


Joined: 07 Sep 2011
Posts: 49

PostPosted: Thu Sep 08, 2011 11:05 am    Post subject: Reply with quote

Just some short note about using ripttoh264:

As it seems ripttoh264 uses the turbo option for the first pass of mencoder.

My mencoder version complains about this:
Code:

MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
Option x264encopts: turbo option is deprecated; use slow_firstpass to disable turbo


I have no clue if my Mencoder version (1.0rc4) is the most recent one. I am running my encoding job on an x64 Ubuntu 10.04-based mint system.
Back to top
View user's profile Send private message
HolgerB
n00b
n00b


Joined: 07 Sep 2011
Posts: 49

PostPosted: Fri Sep 09, 2011 6:36 am    Post subject: Reply with quote

Just another question / bug report:

After successfull encoding of a DVD riptoh264 died with the following message:
Quote:

Can't use an undefined value as an ARRAY reference at /usr/local/bin/riptoh264 line 1283.


Line 1283 seems to process the subtitle streams:
Code:

   [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++;
      }
       }


From the processing log I would say that riptoh264 died during ripping the subtitles:
Code:

/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

I manually muxed the AC3 track plus the video track with fake MP3 via Matroska Mux Gui and the resulting file played back nicely.

Edit: OK, I cross-checked the source files. The DVD has subtitles:
Code:

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
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Sat Sep 17, 2011 1:04 pm    Post subject: Reply with quote

There are some news:

  • blu2mkv gets it’s last service release. It is disontinued. menc can do all it does and more.
  • There is a new download page at http://blog.fangornsrealm.eu/downloads that
    is a central point to get the programs.
  • All other programs are now installable a lot more comfortable.

  • Biggest change: The programs are now also working under Windows! Windows users find a
    compressed archive at http://progs.fangornsrealm.eu/fangorn.zip containing the
    scripts and installation instructions.
  • In the process of testing the scripts on Windows a number of bugs was corrected that also
    affect the linux usage.


I hope the new installation helpers make it more easy for normal users to take advantage of
these scripts.

Also welcome to the completely new users group working on Windows. The installtion process
is a little complicated due to the missing central package manager and the sub-optimal support
for command lines. You have to do many things by hand on Windows. I hope the installation
instructions are clear enough. If you have comments to the documentation or any bug reports,
et me know on progs@fangornsrealm.eu.

Have fun,

fangorn
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
HolgerB
n00b
n00b


Joined: 07 Sep 2011
Posts: 49

PostPosted: Sat Sep 17, 2011 9:06 pm    Post subject: Reply with quote

Great to hear ! I just grabbed your package and will do a few test encodes on my machine from TV recordings.
Back to top
View user's profile Send private message
Akovia
n00b
n00b


Joined: 20 Mar 2012
Posts: 6

PostPosted: Tue Mar 20, 2012 4:35 pm    Post subject: Reply with quote

Hi,
First off, I just found your scripts yesterday and I think they are brilliant! Thanks for all the hard work.

If there is one thing I think your avi2mkv script could use, it would be a way to regex parse the filename to extract metadata. I realize that you can set the "title" via command line option, but if you could use a regex instead, it could batch apply titles with the correct episode number etc..

I have a large collection of files that formats the filenames with a lot of [Bracketed] information that is great to keep in the filename, but is distracting and not needed in the title displayed from a player. I realize that there are a good many considerations to implement this, but it really would be a very useful and outstanding feature.

As far as usage, I can foresee a few things.

1. a seperate command like..
--title_regex|-tr <perl-regex>
a perl compatible regular expression that will parse the filename for a match and set the title from match
user will be prompted with results before processing files or use the "--title_regex_fail|-trf" switch to fallback to filename as title if no match

(Command fails if no match, prompting user to correct the regex:
Possibly return a prompt with the matches it finds for the user to accept before processing?)
ie..
Code:
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


Preferably bringing up just the faulty regex for editing if user presses n


2. maybe a separate command or a way to format the above command to accept a file or setting from the .fanghorn.config for regex presets.
You could even include a couple useful regex that would remove any brackets and their contents, underscores to spaces, etc...

Anyway, I already have a Bash script that does this for me using mkvpropedit, so it's no big deal to call it after I run your script. I just think it would be a nice addition to your very thorough script.

Cheers
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 6 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum