Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th November 2011, 21:11   #561  |  Link
lib3rty1
Registered User
 
Join Date: Oct 2009
Posts: 22
I have ubununtu 11.10 server edition.

When I am runing h264enc I got

Code:
Checking for utility 'bc'... FAILED!
I have restartec cfg file but still I got that issue.
any idea how to fix it ?
lib3rty1 is offline   Reply With Quote
Old 28th November 2011, 21:14   #562  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
did you reset the config file with h264enc -r ?

if that still doesn't work, then open the config and add the path to bc manually. The config is in $HOME/.h264enc/config
froggy1 is offline   Reply With Quote
Old 28th November 2011, 21:26   #563  |  Link
lib3rty1
Registered User
 
Join Date: Oct 2009
Posts: 22
yes I did

where I can find that bc ?
lib3rty1 is offline   Reply With Quote
Old 28th November 2011, 21:29   #564  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
If you have installed bc, then type "which bc" in a terminal (no quotes). Then add the line in the BC variable of the config file
froggy1 is offline   Reply With Quote
Old 28th November 2011, 21:34   #565  |  Link
lib3rty1
Registered User
 
Join Date: Oct 2009
Posts: 22
ok got it working
great thx

love ya and your work

ok, last question, where to put nero acc codes to run it under your scrip ?

Last edited by lib3rty1; 28th November 2011 at 21:51.
lib3rty1 is offline   Reply With Quote
Old 3rd December 2011, 17:03   #566  |  Link
Goga777
Registered User
 
Join Date: Jul 2010
Posts: 14
why h264enc didn't finish succesfully audio encoding ?

Quote:
h264enc -crf -p fast

+=============================================================+
|<<<<<<< h264enc - the interactive shell script ripper >>>>>>>|
|-------------------------------------------------------------|
|<<<<<< version: 9.4.1 - (C) 2006-2011, Grozdan Nikolov >>>>>>|
+=============================================================+


Select the Input type [file/dir/dvd/vcd]: dir
Provide one Input Video File from the directory: dvgrab-2011.11.29_15-12-34.dv
Where to store the encodings? [default is /root/h264enc_21787]:
Would you like to use Pre/Postprocessing video filters? [y/N]:
Would you like to Crop the Video files? [y/N]:
Would you like to include/rip a Subtitle? [y/N]:

-> Detecting FPS value...
-> Detected 25.000 FPS
-> Number of frames: 148

Would you like to set/force the Output Frame Rate (FPS)? [y/N]:
Would you like to do Frame Rate Conversion? [y/N]:

-> Detecting original resolution...
-> Original resolution: 720x576

-> Detected Aspect Ratio (AR): 1.7778:1
-> Storage Aspect Ratio (SAR): 1.2500:1
-> Pixel Aspect Ratio (PAR): 1.4222:1
-> Total pixels: 414720

Specify the desired Resolution [default is 720x576]:
Specify the Expand filter parameters [press 'Enter' to skip]:
Would you like to set/force the input Video Aspect Ratio? [y/N]:

+=============================+
| H.264 Encoder Configuration |
+=============================+

Specify the desired CRF value [0-51.0 - default is 20.0]:

-> Using "x264 fast" preset

+=====================+
| Audio Configuration |
+=====================+


Available Audio Codecs
~~~~~~~~~~~~~~~~~~~~~~
MP3 -----> Container support: AVI, MKV, MP4, OGM, TS
AC3 -----> Container support: AVI, MKV, MP4, OGM, TS
AAC -----> Container support: MKV, MP4, TS
AAC+ ----> Container support: MP4, MKV
neroAAC -> Container support: MP4, MKV
VORBIS --> Container support: MP4, MKV, OGM
FLAC ----> Container support: MKV
PCM -----> Container support: AVI, MKV, OGM
COPY ----> Container support: Depends on audio codec
NOSOUND -> Container support: AVI, MKV, MP4, OGM, TS

Track 1: Select the Audio Codec [default is AAC]: neroAAC
Track 1: Which AAC Profile to use? [LC/HE/HEv2 - default is LC]:
Track 1: Specify the AAC Encoding Mode [ABR/CBR/VBR - default is ABR]:
Track 1: Specify the AAC Average Bitrate in kbps [default is 96]:
Track 1: Use 2-pass AAC encoding instead of 1-pass? [y/N]:
Track 1: Would you like to decode/output more than 2 Audio Channels? [y/N]:
Track 1: Would you like to use Audio filters? [y/N]:

+=============================+
| Miscellaneous Configuration |
+=============================+

Would you like to convert the final encode from AVI to MKV? [y/N]: y
Would you like to convert the final encode from AVI to MP4? [y/N]:
Delete the AVI file after remuxing? [y/N]: y

-> Starting to batch encode Video files in '.'
-> Using "x264 fast" preset
-> Using '/root/h264enc_21787' as output directory for all Video files
-> Using constant rate factor mode for all Video files
-> Batch file located in '/root/.h264enc/batch21787'

Starting to encode in: 5 4 3 2 1

-> Processing file './dvgrab-2011.11.29_15-12-34.dv'

MPlayer SVN-r34245 (C) 2000-2010 MPlayer Team
success: format: 0 data: 0x0 - 0x1453200
libavformat file format detected.
[dv @ 0x89e7da0]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (dvvideo), -vid 0
[lavf] stream 1: audio (pcm_s16le), -aid 0
VIDEO: [dvsd] 720x576 0bpp 25.000 fps 28800.0 kbps (3515.6 kbyte/s)
[V] filefmt:35 fourcc:0x64737664 size:720x576 fps:25.000 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [softskip]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV)
==========================================================================
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x89d8d60]using unscaled yuv420p -> yuv420p special converter
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2 SSE3 Cache64
x264 [info]: profile High, level 3.0
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
Pos: 1.4s 36f (34%) 0.00fps Trem: 0min 0mb A-V:0.049 [0:1536]
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.080s.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.080s.
Pos: 5.9s 148f (100%) 6.36fps Trem: 0min 5mb A-V:0.041 [5640:1535]
File not found: 'n'
Failed to open n.
Cannot open file/device.

Exiting...
*************************************************************
* *
* Nero AAC Encoder *
* Copyright 2009 Nero AG *
* All Rights Reserved Worldwide *
* *
* Package build date: Feb 18 2010 *
* Package version: 1.5.4.0 *
* *
* See -help for a complete list of available parameters. *
* *
*************************************************************

mplayer: could not connect to socket
mplayer: No such file or directory
Processed 4 seconds...
Quote:
cat batch21787
#!/bin/bash
# Automatically generated batch file by h264enc 9.4.1 on Сбт Дек 3 19:57:55 SAMT 2011

################### START OF COMMANDS ###################

cd "."
test -d "/root/h264enc_21787" || mkdir -p "/root/h264enc_21787"

for i in *; do

if [ -f "$i" ]; then

test -d "/root/.h264enc/job21787" || mkdir -p "/root/.h264enc/job21787"

echo
echo -e "\e[1;32m-> Processing file './$i'\e[0;39;49m"
echo
sleep 3

nice -n 10 /usr/bin/mencoder "$i" -o "/root/h264enc_21787/${i%.*}.avi" -nosub -vf softskip,harddup -oac pcm -ovc x264 -x264encopts crf=20:nointerlacedreset=fast:keyint=250:keyint_min=25:force_cfr n

test -p "/root/.h264enc/job21787/audio.wav" || mkfifo "/root/.h264enc/job21787/audio.wav"
/usr/local/bin/neroAacEnc -ignorelength -br 96000 -lc -if "/root/.h264enc/job21787/audio.wav" -of "/root/.h264enc/job21787/audio.aac" &
/usr/bin/mplayer "/root/h264enc_21787/${i%.*}.avi" -noconfig all -loop 1 -really-quiet -vc null -vo null -nocache -ao pcm:fast:file="/root/.h264enc/job21787/audio.wav"
sleep 2

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE Tags SYSTEM \"matroskatags.dtd\">

<Tags>
<Tag>
<Simple>
<Name>Source</Name>
<String>Video file</String>
</Simple>
<Simple>
<Name>Title</Name>
<String>${i%.*}</String>
</Simple>
<Simple>
<Name>Video Filters</Name>
<String>softskip,harddup</String>
</Simple>
<Simple>
<Name>Audio Codec (Track 1)</Name>
<String>LC-AAC Stereo</String>
</Simple>
<Simple>
<Name>Encoder</Name>
<String>MPlayer SVN-r34245 (C) 2000-2010 MPlayer Team</String>
</Simple>
<Simple>
<Name>x264 parameters</Name>
<String>crf=20:nointerlacedreset=fast:keyint=250:keyint_min=25:force_cfrn</String>
</Simple>
<Simple>
<Name>x264 version</Name>
<String>0.104.1677</String>
</Simple>
<Simple>
<Name>mkvmerge version</Name>
<String>5.1.0</String>
</Simple>
<Simple>
<Name>h264enc parameters</Name>
<String>h264enc -crf -p fast</String>
</Simple>
<Simple>
<Name>Comment</Name>
<String>Tagged by h264enc 9.4.1 on 2011/12/03</String>
</Simple>
</Tag>
</Tags>" > "/root/.h264enc/job21787/mkvtags.xml"
test -e "/root/h264enc_21787/${i%.*}.mkv" && mv -f "/root/h264enc_21787/${i%.*}.mkv" "/root/h264enc_21787/${i%.*}.mkv.old"
/usr/bin/mkvmerge --global-tags "/root/.h264enc/job21787/mkvtags.xml" -A --title "${i%.*}" --track-name 0:"${i%.*}" "/root/h264enc_21787/${i%.*}.avi" --track-name 1:"LC-AAC Stereo" --no-chapters "/root/.h264enc/job21787/audio.aac" -o "/root/h264enc_21787/${i%.*}.mkv"
sleep 2

rm -f "/root/h264enc_21787/${i%.*}.avi"
rm -rf "/root/.h264enc/job21787"

fi

done

#################### END OF COMMANDS ####################

Quote:
ffmpeg -i dvgrab-2011.11.29_15-12-34.dv
FFmpeg version git-6a7e074, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 8 2011 10:38:12 with gcc 4.5.2
configuration: --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis
libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.113. 2 / 52.113. 2
libavformat 52.102. 0 / 52.102. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[dv @ 0x8468dc0] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'dvgrab-2011.11.29_15-12-34.dv':
Duration: 00:00:05.92, start: 0.000000, bitrate: 28800 kb/s
Stream #0.0: Video: dvvideo, yuv420p, 720x576, 28800 kb/s, PAR 64:45 DAR 16:9, 25 tbr, 25 tbn, 25 tbc
Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
At least one output file must be specified

Last edited by Goga777; 3rd December 2011 at 17:06.
Goga777 is offline   Reply With Quote
Old 3rd December 2011, 17:51   #567  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
Quote:
Originally Posted by lib3rty1 View Post
ok got it working
great thx

love ya and your work

ok, last question, where to put nero acc codes to run it under your scrip ?
you can put them in /usr/local/bin

make sure you run h264enc -r after that
froggy1 is offline   Reply With Quote
Old 3rd December 2011, 18:03   #568  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
@Goga777

you have somehow introduced an illegal character. There's mentioning of an 'n' in the settings and the mkv global tags. I don't know how you introduced that character since I can't replicate here and I followed the exact steps you took
froggy1 is offline   Reply With Quote
Old 4th December 2011, 14:44   #569  |  Link
Goga777
Registered User
 
Join Date: Jul 2010
Posts: 14
yes, with terminal emulator as konsole, gnome-terminal and Yakuake I have the problem with additional 'n'

but with native terminal (ctrl-alt-f1) I don't have the problems with this issue
Goga777 is offline   Reply With Quote
Old 14th December 2011, 10:56   #570  |  Link
andara
Registered User
 
Join Date: Dec 2011
Posts: 5
a/v sync problems

I used h264enc about a year ago and was really amazed. It just worked out of the box and produced great results. Since then I've updated from Fedora 14 to Fedora 16 and when I tried to use h264enc on my current system, it unfortunately didn't work at all.
First mencoder crashed all the time and I couldn't get anything encoded. Obviously the h264enc version and the mencoder version provided for Fedora 16 on http://rpmfusion.org/ are not compatible. I downloaded the 9.4.1 release of h264enc from sourceforge and manually compiled a current svn version of mencoder. This fixed most of the problems and h264enc almost works as expected now. The only remaining --- but unfortunately huge issue --- is a completely messed up a/v sync.
I get lots of warnings about duplicate frames while encoding and the audio stream is several seconds off compared to the video stream in the resulting file.
If I manually add "-mc 0 -noskip" to all mencoder calls in the created batchfile I don't see any of the duplicate frames warnings and a/v sync seems ok.

Am I the only one seeing this kind of a/v sync problems with the default settings of h264enc, or is this a common problem (with a known fix)?

By the way: I use the h264enc options "-crf -p ehq" to convert a PAL DVD and "COPY" for the audio stream which is an AC-3 stream.

nevertheless: thanks for this great little helper tool!
andara is offline   Reply With Quote
Old 14th December 2011, 11:39   #571  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
Unfortunately, this can happen at any time. MEncoder is unmaintained and each time it works, we're a bit lucky. I've also had my share of problems with it and am currently using a somewhat older version to bypass some issues in current ones. I don't think there's much I can do about your problem. My only two questions are: 1) does this also happen with other audio codecs? and 2) does this always happen, regardless of the DVD you use?
froggy1 is offline   Reply With Quote
Old 19th December 2011, 03:06   #572  |  Link
andara
Registered User
 
Join Date: Dec 2011
Posts: 5
sorry for the late response
I'm new to the forum and messed up my mail notification settings...

I see the problem with lots of different DVDs

I just checked one DVD with different audio codecs and the problem seems to be restricted to COPY. AAC, VORBIS and even reencoding to AC3 seems to work fine, but when selecting COPY for the AC3 input I get lots of duplicate frames and a/v sync issues in the output file.

Adding "-mc 0 -noskip" to the mencoder calls fixes the a/v issues and I didn't find other artifacts in the output files, but I didn't run exhaustive tests and I'm definitely not an mencoder expert, so I'm not sure if it's a good idea to add it to the COPY preset.
andara is offline   Reply With Quote
Old 19th December 2011, 11:35   #573  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
yeah, this definitely sounds like a mencoder issue. Unfortunately i can't add -mc 0 -noskip as default for copy as it couldn mess up things in other mencoder versions where this doesn't happen so i think you'll just need to keep adding these options
froggy1 is offline   Reply With Quote
Old 19th December 2011, 13:44   #574  |  Link
andara
Registered User
 
Join Date: Dec 2011
Posts: 5
Thanks for the prompt reply!

Do you think I should report an mencoder bug for this issue?

I know you have considered ffmpeg as alternative to mencoder

Quote:
Originally Posted by froggy1 View Post
Yes, I know about the state of mencoder

No, I don't plan in supporting ffmpeg within h264enc as it will require a major rewrite in a lot of parts in the script... Maybe I'll write a new script at some point which uses ffmpeg instead. My main problem with ffmpeg is that it can't directly read from DVDs while mencoder easily can
have you thought about using VLC? Should be no problem to read DVDs, ISO images or VIDEO_TS folders with VLC and there are quite some command line switches for tanscoding.
There might be less compatibility issues which might lead to less maintenance work on your side
andara is offline   Reply With Quote
Old 19th December 2011, 13:58   #575  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
Even if you report it, I don't think anyone will fix the issue as no one works on mencoder anymore. The main dev of mplayer doesn't care much for mencoder and it's the same with the other handful devs. If you're up to it, report, but don't expect this to get fixed (anytime soon, if at all). I can add an option to the script so the user can pass "additional options" to mencoder... We'll see

No, I haven't considered VLC. It's not really a flexible encoding tool
froggy1 is offline   Reply With Quote
Old 19th December 2011, 15:03   #576  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
btw, I just tried using COPY on a few DVDs. It all works fine on my side. No duplicate or frame skipping issues. Though like I mentioned, I use a somewhat older SVN version of MEncoder - MEncoder SVN-r32792
froggy1 is offline   Reply With Quote
Old 19th December 2011, 15:28   #577  |  Link
andara
Registered User
 
Join Date: Dec 2011
Posts: 5
I use MEncoder SVN-r34401-4.6.2, so it's probably a recently introduced bug...
andara is offline   Reply With Quote
Old 19th December 2011, 15:38   #578  |  Link
froggy1
ffx264/ffhevc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: Belgium
Posts: 1,379
you're right. I just compiled r34450 and I also get duplicates while doing COPY. Definitely something wrong with mencoder
froggy1 is offline   Reply With Quote
Old 19th December 2011, 15:44   #579  |  Link
andara
Registered User
 
Join Date: Dec 2011
Posts: 5
I found a related MEncoder bug and added a reference to this thread
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1958
andara is offline   Reply With Quote
Old 21st December 2011, 16:47   #580  |  Link
Rasi
Registered User
 
Join Date: Nov 2001
Posts: 121
As much as i love mplayer - mencoder really needs to die. ffmpeg may have its own flaws, but in general its much better suited for encoding nowadays.
Rasi is offline   Reply With Quote
Reply

Tags
h264enc, ipod, mencoder, ps3, xbox360

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.