PDA

View Full Version : GUI dvd->matroska MPlayer front end


six6
10th March 2005, 00:16
So, I worked a bit more on bitterbpp, and now it's a nice dvd->matroska MPlayer front end.

Features:
- Auto-detects a chosen movie track's settings. Features a built in bits/pixel calculator to assist in a scaling choice.
- Supports mpeg4, xvid, snow, and x264 in 2-pass or n-pass. You may pass custom command parameters (some parameters selectable via the GUI) to each codec, or accept some decent defaults.
- Multiple audio track (ac3 or dts) and subtitle track support. Can recompress audio streams to Ogg Vorbis or leave them untouched; subtitles are extracted in VobSub format.
- Can be used as a standalone bitrate calculator.

Check the webpage for more info: bitterbpp website (http://www.derekfrye.com/bitterbpp/) [derekfrye.com]
Doom9 bitterbpp-refresh development thread: bitterbpp-refresh (http://forum.doom9.org/showthread.php?t=98129) [doom9.org]

GUI Directions: See the bitterbpp website (http://www.derekfrye.com/bitterbpp/), in the "Docs and Help" section.

Limitations:
- Matroska file format output only (no avi, ogm, wmv, or mov container output supported)
- Doesn't do LPCM audio.
- Handles PAL or NTSC framerates only.

### Original thread content below ###:
Alright, I figure I'd try creating a cmd-line/GUI bitrate calculator, as they seem to be all the rage lately :), and it's (mostly) finished.

It's called bitter_bpp, and it's in gtk2 and perl. Details are in the tarball. Here's the link: bitter_bpp (http://www.sunfryes.com/files/scripts/perl/bitter_bpp_v1.tar.bz2) (maybe slow, it's my home computer).

You provide a path to dvd files, desired size, and audio bitrate, and it figures out mpeg4 bitrate. It features auto crop/scaling, auto film length, aspect ratio detection, and touches on the benefits of bits per pixel optimization (thanks Mosu).

It needs lsdvd, gtk2-perl, glib-perl, and mplayer for the GUI.
It needs just lsdvd and perl for the command line interface.

I'd be flattered if ppl found it useful. Let me know how I can improve it! Of course, this is only the 3rd program I've ever written (and first GUI), so expect slow change :)

Edit: I'd like to thank mikeX for his c bitrate program's kbps algorithm and acid_kewpie for lsdvd.
Edit: Updated for version 1.6.

six6
16th March 2005, 05:45
bump ...
Since I overhauled the software, I figure I'd pseudo-rerelease it to the top of the forum :)

six6
27th March 2005, 22:06
New release. Now does vorbis transcoding, and has a better layout. Screenshots available on the bitter_bpp (http://sourceforge.net/projects/bitterbpp/) project page.

Joe Fenton
29th March 2005, 01:24
Looks good! I'll have to try it.

six6
13th April 2005, 02:59
Since this application is so popular :rolleyes:, I'm releasing v1.4 :)

Lots of features added. Read the first post for an overview, and visit sourceforge for new screenshots, instructions (in the "Notes" section), changes, and to download it.

six6
15th May 2005, 03:39
Added support for snow and x264. Now only works with MPlayer1.0pre7 :rolleyes:

Joe Fenton
15th May 2005, 03:53
That program is WAY to big. ;) :D

Nice work. I like the added support for snow. It's been a pain trying to do encodes in linux since Doom9's GUI is just for Windows.

six6
15th May 2005, 04:28
Maybe within the night I'll finish subtitle support.
As an aside, this program runs somewhere other than my computer? :)

mzilikazi
16th May 2005, 08:08
Hi! I found this very interesting when it was pointed out to me by a friend so I had to try it. Here is my experience:
DVD Title: A Tribute to Muddy Waters
$ bitter_bpp --gui --autodetect
I'll use /dev/dvd as a potential path to the image...
Autodetecting...
- lsdvd reports time: 01:15:39 (4539 seconds)...
- cropping: 704:368:8:56
- detecting audio tracks...
number of detected audio tracks: 1
Use of uninitialized value in addition (+) at /usr/bin/bitter_bpp line 685.
It fails to rip the audio from the DVD :/
So I tried to execute the bitter_bpp_audio_cue.sh directly which results in the same error:
mplayer -aid 128 -dvd-device /dev/dvd -dumpaudio -dumpfile 128.ac3 dvd://1

/snip/

DVD successfully opened.
MPEG-PS file format detected.

Too many video packets in the buffer: (4096 in 8271019 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.
MPEG: No audio stream found -> no sound.
Core dumped ;)

Exiting... (End of file)

Then I did a simple mplayer -v dvd://1 and it tells me:
==> Found audio stream: 160
==> Found audio stream: 129

So then changing the -aid value to 129 did work for ripping the audio. Restarted bitter_bpp again and skipped the 'Do audio' and went directly for 'Do video and merge'. We'll see how that comes out tomorow...(tired).

$ apt-cache policy mplayer
mplayer:
Installed: 1:1.0-pre7-0.0

This is sure to become a great tool! Hope you find the time to work on it more. :)

On another note, Kel Modderman (http://www.users.tpg.com.au/sigm/html/debian.htm) has made debs for bitter_bpp and mkvtoolnix for both i386 & amd64. Here you are:
echo "deb http://users.tpg.com.au/sigm/debian/ sid main" >> /etc/apt/sources.list && apt-get update && apt-get install bitter_bpp

Update: Seems the bitter_bpp_merge.sh did not get executed....running the script manually does produce a working avi file. Will experiment more!

Test #2:
Second DVD Eric Clapton 'One More Car, One More Rider' is working better. The audio was properly autodetected and is ripped properly. Waiting....

six6
16th May 2005, 14:38
@mzilikazi:

Thanks so much for the kind words! I'd love to look into your issue. Can you run './bitter_bpp --gui --autodetect --devel > problem_file', going through the same steps you tried and post the contents of 'problem_file' here (or mail it to me, or post it on a forum @ sf.net) please? When you run with --devel you will be creating the encoding files, etc, but you won't actually execute them. All in all the process should take about 5 min. Also, what movie format (pal or ntsc) are you trying? Lastly, the full 'mplayer -v dvd://1' would be very helpful (minus all the dvd_next_cell lines).

Thanks!

Edit: Also, thanks to Kel Modderman for creating deb archives! Those are very handy.

six6
17th May 2005, 03:30
Oh, as a side note, make sure you always use the latest version of bitter_bpp. I know that versions before 1.4.1 won't work anymore with MPlayer1.0pre7. In the future I'll try to mirror the feature development of MPlayer at the expense that future versions of bitter_bpp won't work with past versions of MPlayer (unless there is good reason to switch and support older MPlayer versions).

Example: With bitter_bpp_v1.4.1 you can use snow or x264, but you can no longer use MPlayer<=1.0pre6a. This shouldn't create problems unless people stick to older MPlayer versions. But even then, they can still use older bitter_bpp versions (all on the sf.net site).

mzilikazi
18th May 2005, 00:50
OK posted (https://sourceforge.net/forum/?group_id=134086).

six6
18th May 2005, 03:06
Most of this information is cross posted:
Short answer: bitter_bpp doesn't yet support LPCM audio. Sorry :)

Secondly, bitter_bpp gets audio info from the "[open] .." lines of "mplayer -v" so the fact that MPlayer says the ac3 is track 128 there is REALLY strange, since later MPlayer says it found audio in track 129 and 160. That may be a bug in MPlayer; or something strange about that particular movie.

Edit: That's why you get "uninitialized value ... line 685" as output, because bitter_bpp is trying to figure out the bitrate of a track (-aid 128) that doesn't exist. MPlayer first says the track is 128, then later says it's 129. Definitely not a problem with bitter_bpp, but with MPlayer.

six6
21st May 2005, 06:43
Released v1.4.2. Biggest feature is subtitle support: Here (http://sourceforge.net/project/shownotes.php?group_id=134086&release_id=319914) is most everything that's new.

six6
31st May 2005, 13:58
Doo dah, doo dah, here is a brand new, shiny version: 1.4.3, to go along with a new forum. Now unlimited subtitle support, sped up/considerably reduced temp filesize when transcoding, blah blah, and some other stuff. And now, fun new smileys :readguid: :thanks:

six6
2nd August 2005, 00:28
New version, bitterbpp_v1.5. Changelog is here (http://sourceforge.net/project/shownotes.php?group_id=134086&release_id=346296). Most notable is n-pass choice for each codec, GUI selectable codec parameters (only proof of concept, more to be added later), and a script that gets the freshest dependencies for bitterbpp (doom9 thread specifically for the script that gets bitterbpp dependencies is here (http://forum.doom9.org/showthread.php?t=98129)).
Also, I created a website for bitterbpp, and the latest news, documentation, etc, can be found there:

The bitterbpp (http://sunfryes.com/bitterbpp/) website.

As of right now, the website is complete except for documentation, which I'll be adding as soon as I learn some more about docbook format :)

bugmenotwillyou
2nd August 2005, 11:26
uau, nice GUI, do you plan to add chapter time ripping and subtitles 2 txt?
http://www.bunkus.org/dvdripping4linux/en/single/index.html#subtitles_text

Textual subtitles look better and take less space than images, unfortunately gocr doesn't rip alwais right the text

PS: you should forward http://bitterbpp.sourceforge.net/ to http://sunfryes.com/bitterbpp/

six6
2nd August 2005, 19:56
Chapter time ripping will be important to add, and darn it, I forgot to include it in v1.5. It'll be in the next release for sure.

Text subtitles are interesting, because like you said, they take less space but aren't always displayed correctly. What we need is some sort of standalone interactive text rippper ala SubRip for Windows. So I'm hesitant to add text subs, because then bitterbpp will depend on a bunch more software (transcode packages, gocr, etc). I'd rather keep the requirements at or below where they are.

That said, if we can find a lightweight way to get text subtitles, I'd do it.

Edit: Fwd'd bitterbpp.sourceforge.net to the bitterbpp homepage.

six6
2nd August 2005, 20:17
Since I released just yesterday, I updated the v1.5 rdbi_software.sh script in v1.5 on sourceforge. As per the notice (http://sunfryes.com/bitterbpp/) on the homepage, if you downloaded bitterbpp before 6:15pm UTC on 2 Aug 2005, re-download it from sourceforge. The script fixes a problem MPlayer has recognizing libavcodec.

bugmenotwillyou
3rd August 2005, 01:00
I don't know subrip, I did some tests following that guide and the biggest problem are:
- pgm2txt doesn't support ascii-extended characters אטלעש... I tried to put them as exadecimal but seems it doesn't work
Some times you can solve it with ispell dictionary, but not alwais

- pgm2txt shows unrecorgnized characters in ascii art (probably there's a way to put them in a image widget)

- If you are afraid about too many deps you could enable a checkbox(rip subs to txt) at runtime, or better, import a user-checked txt

six6
13th August 2005, 23:42
New release. Now you may select chapter start/stop points. Biggest change is the process of running bitterbpp. Other changes include interface updates and code cleaning.

An absolute must: read the new Documentation (http://sunfryes.com/bitterbpp/doc/book1.htm)! The process for running bitterbpp has changed a little!

Also available is a bitterbpp flow chart (http://sunfryes.com/bitterbpp/doc/figures/what_is_bitterbpp_flow_chart-2.png) that I had alot of fun creating in inkscape. :) If you're unfamilar with how bitterbpp works, that picture does an excellent job (in my opinion :)) of explaining it.

six6
5th February 2006, 20:08
New version 1.6 out. Biggest changes: ability to encode a selected title, selection of the mounted dvd or (unmounted) iso image via the GUI, and now released as a .deb and .tar.bz2.