| Author |
Message |
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
post edited May 05, 2008
Okay I've been working for a couple of months on a linux build. I've finally finished 14.4 beta for linux. I've completely started from scratch using wxwidgets/gtk. The ide I used for building this is codeblocks. As this was started from scratch there may (but hopefully not) be bugs. If any bugs are found please post them here.
Wine is still needed for hcenc ,dgpulldown, avisynth, and wavi but the rest of the program is all nix (ffmpeg , aften, hcbatchgui).
The program itself requires no installation. Just download and extract the .gz file. You will need to install some support programs yourself though. You will need to install aften (I have included a deb package and the source code for your benefit), ffmpeg , and sox. There are links to ffmpeg and sox in the help file included in the download.
Function wise the gtk version works pretty much the same as the windows version. I did add a few new things reguarding avisynth. You can now customize your avisynth scripts by adding other plugins and commands different from the three (convolution3d, msharpen, reinterpolate) included with hcbatchgui.
Also you can now batch create your avisynth scripts using HCbatchGUI linux instead of creating them one at a time using the wine version.
The only function not working right now is the log box. You will have to follow the apps progress from the terminal boxes that pop up.
Click here to get a look at the new linux version
Download 14.5 GTK here
Download updated hcbatchgui for above package
Download source
Edit= If you have problems with hcenc not starting then right click HCenc_022.exe and select permissions and check the box that says allow executing as a program.
original post Jan 03, 2008
OS used Ubuntu 7.10
Okay I've done some more testing and found that HCbatchGUI is sort of working in Wine. The "avisynth script generator" doesn't work so you have to write your own avisynth scripts (this is easily accomplished through wine with fitcd) fixed now. HCenc batch video encoding does work as long as you have the right codecs installed. Most avi's I've come across have decoded okay with xvid however I did have to download and install ffdshow to get a few working. So far ac3 encoding and wav extraction isn't workingbuggy so I deleted the audio functions. DGpulldown does seem to be working okay though.
So you might go to the download page
HCbatchGUI for linux wine
and grab version 14.2 and install it with wine to give it a try.
You'll have to create your own avs scripts and process your audio seperatly until I can reconfigure the app to get those working. avisynth scripts fixed now but audio still not working This app was written primarily for windows but I'm hoping to get it fully working in linux via wine. For now it's nice to at least have HCenc batch capabilities in linux!
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
Last edited by freebird73717 on May 30, 2008 13:33, edited 15 times in total
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
I finally got around to installing avisynth in ubuntu and trying this out. when I hit the open avi button nothing happens. Do need something else installed?
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
Hello,
Other than installing avisynth and whatever codecs you need there isn't any other software you need to install. The problem really is poor documentation on my part. You need to select all of your avisynth options (overscan, frame size, any filters) before hitting the Open Avi button.
Also I've noticed on a few of my encodes that the audio sometimes cuts out somewhere near the end (only happens in linux though... no problems with audio in windows). It doesn't seem to happen on all encodes but I have noticed it on a few so you might check the audio that hcbatchgui outputs and make sure that it encodes it correctly all the way to the end before you delete your source files. It may be neccessary to encode your audio separatly. I'm still trying to figure out if it was an issue with certain source files or with wine. I may have to use another audio program to extract the wav for ac3 encoding. Video encoding is still rock solid though.
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
Thanks got it working
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
Uploaded HCbatchGUI 14.2 today
Added some new features in the template and a new avisynth filter. I completely removed audio functionality in this (linux wine) version as it is still buggy. Sometimes audio encodes would cut out toward the end of the files. I am hopping to figure out a fix for this but until I do audio is gone. You can encode your audio to ac3 with native linux avidemux or through the use of shell scripts.
Here is a shell script that I use to encode audio from avi files. Make sure you have ffmpeg and aften installed.
| Code: |
#! /bin/bash
for i in *.avi
do
BASEFILENAME=$(basename "$i")
ffmpeg -i "$i" -ar 48000 "$BASEFILENAME.wav" && \
aften "$BASEFILENAME.wav" -acmod 2 -readtoeof 1 -b 192 "$BASEFILENAME.ac3" && \
rm "$BASEFILENAME.wav"
done
|
New in version 14.2 linux wine
Added new avisynth filter Reinterpolste411 that helps keep dv colorspace correct.
Added VBR bias to the template
Added LastIframe to the template.
Added Lumgain to the template
Added Avsreload to the template to help with source mismatch errors.
Removed Audio functions from the linux wine version. Audio was buggy and sometimes would not encode whole file. Hopefully will fix in a future release.
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
Thanks for the new version.
Not to sound stupid, but how do I use the script for audio , do I just enter it in the terminal? or do i use something else. I'm a complete noob at scripting and linux.
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
Well first you need to download and install ffmpeg and aften from synaptic.
Now you can go about this a couple of different ways. You can save the above code text as a file in your /usr/bin directory. Then you just open a terminal to your directory containing the avi's. Type whatever you name that text file and your audio encodes should start.
Or you could just open terminal and change directory to where your avi's are and copy/paste the code text directly into terminal.
Or you can save the code as a nautilus script and run it from nautilus which is what i do.
Check this thread for more info on nautilus scripts. The bottom code in my post on that page is what you will need. It's probably the easiest way to do this. Just save that code in a text editor. Then right click on the file you just saved and click properties, permissions, make file executable. Then when you are in your avi file directory just right click go to scripts and select the file you just saved.
nautilus script
| Code: |
#! /bin/bash
for i in *.avi
do
BASEFILENAME=$(basename "$i")
ffmpeg -i "$i" -ar 48000 "$BASEFILENAME.wav" && \
aften "$BASEFILENAME.wav" -acmod 2 -readtoeof 1 -b 192 "$BASEFILENAME.ac3" && \
rm "$BASEFILENAME.wav"
done
zenity --info --text="Finished Encoding AC3 Files"
|
I know it may seem daunting at first but once you do a couple it gets easier. Post back if you need any help with it.
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
Ok I think I got how to add scripts to .gnome2/nautilus(do the files still have a .txt after you make them executable), I couldnt find aften in synaptic
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
Thanks for the aften deb I redid the scripts using the text editor in applications and its working great now. I never could figure out the right repositories to add to my source list.
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
Also thanks to forum member GMaq I have learned that you can import presets in winff. This way you can use a the simple gui in winff to encode your ac3 audio. Just download winff and winff_ac3_presets.tar.gz. Open winff and click file->Import Presets-> Select the ac3 presets and click open.
If you are more comfortable with a gui this can help.
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
Last edited by freebird73717 on Feb 28, 2008 14:45, edited 1 time in total
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
Cool thanks , I'll get this too, cant have too many apps ya know. I'm actually starting to get the hang of using the scripts you posted, so much easier to use I found a problem with ac3192channel2 and fixed it. it was missing the <presets> at the beginning.
Last edited by DKruskie on Feb 28, 2008 14:01, edited 1 time in total
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
DKruskie Member
Joined: 16 Mar 2003 Location: somewhere in time
|
|
I posted a problem I found in the post above yours heres all the presets with the
fixed ac3192channel2 preset.
winff_ac3_presets.tar.gz
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
I am still woking on a full rewrite of HCbatchGUI to be a completely linux based app but in the meantime I have thrown together a nautilus script that can be used to batch encode video and audio using HCenc for video and native linux ffmpeg and aften for audio.
| Quote: |
#! /bin/bash
###############################################################################
#
#
#
# AUTHOR: freebird73717
#
# DESCRIPTION: This script encodes avs video files with HCenc and avi audio files
# with FFmpeg and Aften.
#
# REQUIREMENTS: Nautilus file manager
# feh (see http://www.linuxbrit.co.uk)
# zenity/gdialog, which is usually included in the gnome-utils package
# FFmpeg
# Aften
# HCenc
#
# INSTALLATION: GNOME 1.4.x: copy this script to the ~/Nautilus/scripts directory
# GNOME 2.x: copy to the ~/.gnome2/nautilus-scripts directory
# Copy your HCenc ini-template files to any directory other than a wine directory.
# Zenity can't read into the wine directory.
#
# USAGE: Make sure your avs and avi files are in the same directory.
# Right click in your video files directory, go to Scripts, and then select this script.
# You will then be asked to select an Output Directory for your video and audio files.
# Next you will be asked to select your HCenc ini-template file.
# Then you will enter the Average Video Bitrate and AC3 Audio bitrate.
# HCenc will then encode your avs files and ffmpeg and aften will encode your avi to ac3 audio.
#
#
#
# WHAT WORKS: Everything but the cancel buttons
#
# WHAT DOSENT
# WORK : The aforementioned cancel buttons
#
# VERSION INFO:
# 0.1 (20080311) - Initial public release
#
#
#
# LICENSE: GNU GPL
#
###############################################################################
location=$(zenity --file-selection --directory --title="Select Audio & Video Output Directory")
HCini=$(zenity --file-selection --title="Select HCenc ini-template file")
BITRATE=$(zenity --title="Video AVG Bitrate" --entry)
AUDIOBITRATE=$(zenity --title="Audio Bitrate" --entry)
for i in *.avs
do
BASEFILENAME=$(basename "$i")
"/home/yourusername/.wine/drive_c/Program Files/HCbatchGUI/HCenc_022.exe" -i "$i" -o "$location/$BASEFILENAME.m2v" -b $BITRATE -maxbitrate 8500 -ini "$HCini"
done
for j in *.avi
do
ffmpeg -i "$j" -ar 48000 "$j.wav" && \
aften "$j.wav" -acmod 2 -readtoeof 1 -b $AUDIOBITRATE "$location/$j.ac3" && \
rm "$j.wav"
done
zenity --info --text="Finished Encoding Video & Audio Files With HCenc and Aften!"
|
Make sure to change the text in bold blue to the path of your HCenc executable. Also make sure to copy your HCenc ini/template files from your wine directory to some other directory because zenity can't look into the wine directory.
The maxbitrate for the video is set to 8500 but you can change that by changing the scripts text.
Hopfully this will help some until I get the rewrite of the gui done (which will probably take some time.)
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
|
|
disturbed1 Member
Joined: 22 Apr 2001 Location: init 4
|
|
If you're going to split out to a sperate wav file, might as well normalize it. Ubuntu/Debian use normalize-audio, other distros use normalize(-mp3-ogg)
And....And... while were at it , add an option for direct stream copy (-acodec copy) or down mixing, up mixing (-ac 2/6). Or....you could just encode directly to ac3 with ffmpeg. Aften is actually ffmpeg's a52 encoder, so the results should be the same with recent builds. Even though aften will use 2 threads if possible, there wouldn't be much speed gained because of the output to wav first. Don't forget, with ffmpeg the -ab is in bits, so 192000 or 192k
ffmpeg -i input.blah -vn -ac 2 -ar 48000 -ab 192k out.ac3
Which toolkit you looking to write the gui with? PYGTK, wxWidgets, GLADE..............
Let me know if you want to implement a pure Linux native encoding solution. I can pass on some scripts that pipe mplayer output to mpeg2enc (and yuvfilters if mplayer's don't cut it)
_________________ Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
|
|
freebird73717 Member
Joined: 09 Dec 2003 Location: Buckle of the Bible Belt
|
|
Yeah there are several improvments I could add to this script I just whipped this out quick today. I knew aften was based off of ffmpeg but I thought there were improvements made to get a better sound. If I'm mistaken then I'll just use ffmpeg to output ac3 and save a step. In my windows gui I actually do offer a upmix function (ironically enough a process I learned while surfing a linux forum several months ago).
Right now I'm playing with glade but I've also looked at wxWidgets. I've got a few others I'm going to try as well. Since I'm basically starting from scratch I'm trying out as many toolkits as I can until I find one that I like the best.
I appreciate the offer for the mplayer scripts. I may take you up on that. My primary focus is getting HCbatchGUI to be totally nix (with the exception of HCenc of course!)
It's been a while since I've been in windows and to be honest it feels good!
_________________ My Tools My Guides
Registered Linux user 467258
Registered Ubuntu user 20876
|
|
disturbed1 Member
Joined: 22 Apr 2001 Location: init 4
|
|
Can't say I've done any serious listening tests between ffmpeg and aften. I should, but I'm lazy like that
Good luck finding an IDE/Toolkit. I honestly believe there are of more IDEs in Linux than there are text editors.
_________________ Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
| |