Page 3 of 13

ffmpeg/ffconvert update

Posted: Thu 20 May 2010, 07:41
by shinobar
The large pet ffmpeg-20100408-0.7.pet, which contains libspeex.
The small pet ffconvert-0.7.pet, with small bugfix.
Both available from the top of this topic.

Re: ffmpeg/ffconvert update

Posted: Fri 21 May 2010, 01:34
by BarryK
shinobar wrote:The large pet ffmpeg-20100408-0.7.pet, which contains libspeex.
The small pet ffconvert-0.7.pet, with small bugfix.
Both available from the top of this topic.
Hi, you have uploaded the 'ffconvert-0.7' directory, not the .pet.

Re: ffmpeg/ffconvert update

Posted: Fri 21 May 2010, 14:32
by shinobar
BarryK wrote:[Hi, you have uploaded the 'ffconvert-0.7' directory, not the .pet.
Thanks Barry. Uploaded the pet now.

Re: convert directory

Posted: Mon 24 May 2010, 03:06
by Flash
dweez wrote:Hello Flash

to convert whole directory try this:

- go to directory and open terminal
- type/paste

Code: Select all

for f in *.mp3;do ffmpeg -i "$f" -y -f mp3  -acodec libmp3lame -ab 32k -ac 1 -ar 22050   /root/My-Music/"$f";done
After installing shinobar's big ffmpeg-0.7.pet, this did the job. The only hitch, which had no effect on the result, was that when it ran out of mp3 files to convert, it gave this confusing error:
Input #0, mp3, from '153END.mp3':
Metadata:
TIT2 : 153 The End - Pearl of China
TPE1 : Recorded Books
Duration: 00:00:00.00, start: 0.000000, bitrate: -2147483 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s
Output #0, mp3, to '/mnt/sdf1/Mp3_books/Min,/Pearl/153END.mp3':
Metadata:
TSSE : Lavf52.61.0
Stream #0.0: Audio: libmp3lame, 22050 Hz, 1 channels, s16, 32 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[libmp3lame @ 0x809f460]lame: output buffer too small (buffer index: 9508, free bytes: 284)
Audio encoding failed

#

Posted: Mon 24 May 2010, 03:32
by Flash
GNOME MPlayer started working in Quirky 100 after I installed shinobar's big ffmpeg-0.7.pet. :D

Convert whole directory

Posted: Tue 01 Jun 2010, 12:16
by shinobar
Thanks Flash and to all:

FFconvert-0.8 can now convert all files in the same directory with one operation.
Try the new version.

Posted: Tue 01 Jun 2010, 20:38
by abushcrafter
Bug: FFConvert can't cope with files with spaces in their paths.

Posted: Wed 02 Jun 2010, 03:35
by Flash
What ambushcrafter said, and it is a real pain in the you-know-what.

Haven't I seen a program somewhere in Puppy that changes spaces to _underlines_ and back again?

file names with spaces

Posted: Wed 02 Jun 2010, 13:47
by shinobar
Updated FFconvert to v.0.9 which can handle paths with spaces.
Thanks abushcrafter and flash.

Posted: Wed 02 Jun 2010, 15:40
by Flash
Thanks a bunch. :D I'll try it as soon as I can.

Posted: Sun 06 Jun 2010, 04:44
by Flash
Okay, I gave it a try tonight.

I wanted to reduce the size of the files on an mp3 CD audio book, from 92 Kbps stereo to 32 kbps mono, so they would fit on my mp3 player. My first try, I missed the preload option in FFConvert. The minimum bitrate FFConvert would allow was 64 kbps, so that's what I chose for the test.

FFconvert didn't have any problem with spaces in the directory names, but it failed to convert the files to mono or to 64 kbps. I'm pretty sure I set up the GUI correctly, but maybe not.

When that didn't work, I took another look at the GUI and discovered the preload section had an mp3 32 kbps mono option. This also had no problem with spaces in the directories, but it skipped converting three of the 91 mp3 files on the CD. All three files play in Gxine from the CD, but when I tell FFConvert to convert them, it says there is no video or audio stream to convert. :?

The audio quality of the converted 32 kbps mp3 files is perfectly adequate for my purpose. They sometimes sound slightly rough, like someone speaking through a fan, but if the book is good I get into it and I don't notice the roughness.

Posted: Wed 23 Jun 2010, 20:27
by joel
It seems the links to your pet are dead. I keep getting an m86 Gateway error.?

Link corrected

Posted: Mon 28 Jun 2010, 09:24
by shinobar
Sorry, the link corrected.

Posted: Sat 10 Jul 2010, 20:47
by abushcrafter
For the OGG preset your need to change the file format parameter to "ogg" from "OGG".

case of ogg

Posted: Sat 10 Jul 2010, 23:19
by shinobar
abushcrafter wrote:For the OGG preset your need to change the file format parameter to "ogg" from "OGG".
I have no problem with "ogg" in lower case, using the large pet.
what version of ffmpeg you use?

Posted: Sun 11 Jul 2010, 21:06
by abushcrafter
Your version.

Case of ogg

Posted: Mon 12 Jul 2010, 12:53
by shinobar
abushcrafter wrote:Your version.
Strange.
Will you paste the error log?

Posted: Mon 12 Jul 2010, 15:07
by abushcrafter

Code: Select all

#!/bin/sh
ffmpeg -i "/mnt/sda6/Media/Audio/tmp/01-AllSaints-NeverEver.bak.flac" -y -f OGG  -acodec vorbis   -ac 2 -aq 60 "/mnt/sda6/Media/Audio/tmp/01-AllSaints-NeverEver.OGG"
STATUS=$?
echo -n $STATUS > "/tmp/ffconvert_01-AllSaints-NeverEver.tmp"
[ "$STATUS" = "0" ] && exit 
echo -n Press [ENTER] to exit :
read REP

Re: case of ogg

Posted: Tue 13 Jul 2010, 06:55
by shinobar
abushcrafter wrote:

Code: Select all

#!/bin/sh
ffmpeg -i "/mnt/sda6/Media/Audio/tmp/01-AllSaints-NeverEver.bak.flac" -y -f OGG  -acodec vorbis   -ac 2 -aq 60 "/mnt/sda6/Media/Audio/tmp/01-AllSaints-NeverEver.OGG"[/quote]
As for the preset value in the large pet, ffmpeg-20100408-0.9.pet contains /usr/shar/ffconvert/OGG_theora_vorvis, and it uses lower case 'ogg', not 'OGG'.

-f ogg -vcodec libtheora  -b 1000k     -acodec vorbis -ab 128k

Posted: Tue 13 Jul 2010, 21:21
by abushcrafter
I tried again on a clean pupsave of my very customised Puppy Linux 4.3.2 version3. This time I used the "OGG theora vorbis" preset and that also failed.

Code: Select all

#!/bin/sh
ffmpeg -i "/mnt/sda6/Media/Audio/tmp/01-AllSaints-NeverEver.bak.flac" -y -f OGG  -acodec vorbis   -ac 2 -aq 60 "/root/01-AllSaints-NeverEver.OGG"
STATUS=$?
echo -n $STATUS > "/tmp/ffconvert_01-AllSaints-NeverEver.tmp"
[ "$STATUS" = "0" ] && exit 
echo -n Press [ENTER] to exit :
read REP
Here is the SHA1 checksum of the ffmpeg20100408-0.9.pet I am using: eb063a38ebfc9f2667157423e9b15d3fa0a4fd71

An other problem is ffconvert still can't cope with paths with spaces. A feature I would love/badly need is for metadata to be copied across between converted files. FFmpeg has this option:

Code: Select all

-map_meta_data outfile:infile  set meta data information of outfile from infile
But I can't get it to work at all. I have tried it with flac to ogg, flac to acc (yuck) flac to mp3 (yuck) with all possible methods I can think of and it still refuses to do its job :x. So the only way I can think to do it, Is by using the

Code: Select all

-metadata string=string  add metadata
option to add the metadata with the "-y" option to get the meta data. Here is how far I have got with writing a script to do it:

Code: Select all

#!/bin/sh

ffmpeg -i ""

tracknumber=
artist=
album=
title=
genre=
date=
copyright=
comment=

if ffmpeg -v =  then
	ffmpeg -metadata timestamp="$date" artist="$artist" copyright="$copyright" comment="$comment" album="$album" title="$title" year="" genre="$genre" track="$tracknumber" -i "$in" -acodec copy -vcodec copy "$out"
else
	# -year ?
	ffmpeg -title "$title" -timestamp "$date" -author "$artist" -copyright "$copyright" -comment "$comment" -album "$album" -track "$tracknumber" -year "" -i "$in" -acodec copy -vcodec copy "$out"
The version of FFmpeg that Puppy came with before the 5 series does not have the "-metadata" option. So I used the right options for that version. Hence the "if" statement.