OS2World OLD-STATIC-BACKUP Forum

OS/2 - SIGs => Rexx => Topic started by: cyber on 2009.06.12, 12:05:45

Title: CE2mp3
Post by: cyber on 2009.06.12, 12:05:45
Something happen with old thread so here is end.  >:(

1.
start CE2mp3 with source file for converting as argument, like
CE2mp3 d:\path\nice song.wma
CE2mp3 will first prompt for samplerate, bitrate and stream remap (important when
source file have more than one audio stream), You can enter values, or simply
press ENTER without any other input for using default values.
2.
start CE2mp3 with directory with source files as argument, like
CE2mp3 d:\path
CE2mp3 will go for converting all files from this directory, without any prompt.
Default values will be used.

In both cases, CE2mp3 will create target files with same name as source files
except for extension in directory where is started.



/*  Convert everything to MP3 by Cyber v0.03  */
/*        using FFmpeg as convertor  */
/*     You need to change default values !!!!   */

/* Default values :  */
SAMPLERATE=44100                      /* CHANGE AS NEEDED */
BITRATE=64                            /* CHANGE AS NEEDED */
FFmpeg_pth="ffmpeg.exe" /* CHANGE AS NEEDED */
/*
path where is FFmpeg: if ffmpeg is in PATH or in same direcory with this
convertor use FFmpeg_pth="ffmpeg.exe" else, You need to enter full path
to program.
*/

/* end of configuration !!!!   */
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
call SysLoadFuncs
Say ""
CALL WhiteCol; CALL CHAROUT , "  ŰŰŰ  ŰŰŰ   Ű  Ű  Ű   Ű ŰŰŰŰ ŰŰŰ  ŰŰŰ          everything to mp3";
say
CALL WhiteCol; CALL CHAROUT , " Ű    Ű   Ű  ŰŰ Ű  Ű   Ű Ű    Ű  Ű  Ű"
call LblueCol; CALL CHAROUT , "  for www.os2world.com ";CALL GreenCol; CALL CHAROUT , "written by Cyber ";
say
CALL WhiteCol; CALL CHAROUT , " Ű    Ű   Ű  Ű ŰŰ  Ű   Ű ŰŰ   ŰŰŰ   Ű "
say
CALL WhiteCol; CALL CHAROUT , " Ű    Ű   Ű  Ű  Ű   Ű Ű  Ű    Ű Ű   Ű"
Call RedCol;CALL CHAROUT , "      Code by RobertM and Jep, "
say
CALL WhiteCol; CALL CHAROUT , "  ŰŰŰ  ŰŰŰ   Ű  Ű    Ű   ŰŰŰŰ Ű  Ű  Ű    "
CALL yellowCol; CALL CHAROUT , "     Thanks to WarpCafe "

call YellowCol

CALL SysSleep 1
Parse Arg v1ideost
if v1ideost="" then call nofile  /* if no argumet go to exit */
filebytes = stream(v1ideost, C, 'query size') /* determine is it file or dir */
IF filebytes = 0 then call ProcDir  /* if dir jump to ProcDir else continue */

Call GreenCol
FFmpeg_pth" -i "v1ideost
Call WhiteCol
say "Enter samplerate (enter for default to "SAMPLERATE")"
Call GreenCol
tsample=LINEIN()
If tsample="" then tsample=SAMPLERATE
Call WhiteCol
say "Enter bitrate (enter for default to "BITRATE")"
Call GreenCol
tbit=LINEIN()
If tbit="" then tbit=BITRATE
Call WhiteCol
say "Enter stream mapping [-map 1:0] (enter for default to no mapping at all)"
Call GreenCol
tmap=LINEIN()

PARSE VALUE REVERSE( FILESPEC( "N", v1ideost ) ) WITH ."."fname
fname = REVERSE( fname )
gname="'"fname".mp3'"
FFmpeg_pth' -i 'v1ideost tmap' -acodec libmp3lame -ac 2 -ar 'tsample' -ab 'strip(tbit)'k -vol 256 'gname

call WhiteCol
Say "conversion complete"
exit

RedCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||31||'m'
return

GreenCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||32||'m'
return

WhiteCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||37||'m'
return

LblueCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||36||'m'
return

YellowCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||33||'m'
return

GreyCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||30||'m'
return

BlueCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||4||'m'
return

YellGreyCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||5||'m'
return

YellRedCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||41||'m'
return

cYellRedCol:
CALL CHAROUT ,"1B"x||'[1m'||"1B"x||'['||40||'m'
return

ProcDir:
Call SysFileTree ARG(1)||v1ideost"\*", "files", "FO"
do i = 1 to files.0
say files.i
v1ideost="'"files.i"'"
PARSE VALUE REVERSE( FILESPEC( "N", v1ideost ) ) WITH ."."fname
fname = REVERSE( fname )
gname="'"fname".mp3'"

FFmpeg_pth' -i 'v1ideost' -acodec libmp3lame -ac 2 -ar 'SAMPLERATE' -ab 'strip(BITRATE)'k -vol 256 'gname
end

call WhiteCol
Say "conversion complete"
exit

nofile:
say
call YellRedCol
say
say" Must have source file or source directory as argument"
call cYellRedCol

say ""
say "exiting..."
pause
exit


Title: Re: CE2mp3
Post by: Batchheizer on 2009.06.15, 18:34:50
CE2mp3 works fine. Thanks for this fine small program. Three remarks:
1. Is it possible to convert the Vorbis-Tags (from ogg-files) to ID3 tags? Now the tags are lost. ID3V2 (on hobbes, handles ID3 up too 2.3.0) and VorbisComment from Ogg-Package maybe useful for this.
2. Is it possible to write the tags to the EAs? On eCS with the CW-Classes Title, Artist etc. can be written to the EAs. It should be possible to implement this with REXX.
3. Maybe a WarpIN-Package could help to create WPS-Objects and associations (to OGG etc.).
Title: Re: CE2mp3
Post by: cyber on 2009.06.16, 00:36:56
For questions 1,2, I think that this can be easy done, but maybe in next release. I'm now busy on updating something else. But in few days I could try something with that. I was considering possibility of creating target name from tag data too. Nice suggestions. Thanks.
3. I'm not a programer, and I do not have enough time to learn all that about WarpIn and WPS objects. This simple script was finished because other people help me.

4. GUI version is next release.
Title: Re: CE2mp3
Post by: jep on 2009.06.16, 08:59:37
Batchheizer and Cyber,

CE2mp3 seem to grow rapidly now.  ;)

Very good suggestions Batchheizer...

We'll help you to deal with obstacles that you may encounter cyber, just mention what you're looking for.

I have rexx code (as functions) for you that deal with question 3, auto configuration, wps object creation with file association etc. that rexx does so very good on its own. (Similar to code used in MPlayer configration, ClamAV... etc.)

//Jan-Erik

Title: Re: CE2mp3
Post by: cyber on 2009.06.16, 09:26:58
Quote from: jep on 2009.06.16, 08:59:37
CE2mp3 seem to grow rapidly now.  ;)

  Im affraid of that.  It make mp3 files as result. But it can convert to any format FFmpeg support, so It may become CE2Anything in future ?  :o

Quote from: jep on 2009.06.16, 08:59:37
We'll help you to deal with obstacles that you may encounter cyber, just mention what you're looking for.

I have rexx code (as functions) for you that deal with question 3, auto configuration, wps object creation with file association etc. that rexx does so very good on its own. (Similar to code used in MPlayer configration, ClamAV... etc.)

Well... If You help anytime I stuck like till now... I can write even OpenOS/2.  ;D
Title: Re: CE2mp3
Post by: Batchheizer on 2009.06.16, 11:53:51
Quote from: jep on 2009.06.16, 08:59:37
I have rexx code (as functions) for you that deal with question 3, auto configuration, wps object creation with file association etc. that rexx does so very good on its own. (Similar to code used in MPlayer configration, ClamAV... etc.)
//Jan-Erik
I prefer WarpIN, because of easy (De-)Installation and Upgrade. If nobody of the programers could handle it, I could create the WIS-script and the WPI-Package. Please tell me, what associations are useful for CE2mp3.
Title: Re: CE2mp3
Post by: cyber on 2009.06.16, 16:04:33
Quote from: Batchheizer on 2009.06.16, 11:53:51
Please tell me, what associations are useful for CE2mp3.

To many... almost all of existing audio formats and every video format (container) that can carry audio file supported by FFmpeg, but mostly we are interested in: ogg, wav, mp2, mp3, wma, amr ... avi, mp4, mpeg, vob, wmv, flc, 3gp, flash...
You can try `FFMPEG -formats' (or with >format.txt ) on command line, and AFAIK all listed with D can be source file and with E can be target file.

Title: Re: CE2mp3
Post by: jep on 2009.06.16, 16:38:41
Hi,

Quote from: cyber on 2009.06.16, 09:26:58
Well... If You help anytime I stuck like till now... I can write even OpenOS/2.  ;D

cyber, I may take your word for it...  ;) when can we expect you to deliver OpenOS/2?!  ;D

Quote from: Batchheizer on 2009.06.16, 11:53:51
I prefer WarpIN, because of easy (De-)Installation and Upgrade. If nobody of the programers could handle it, I could create the WIS-script and the WPI-Package. Please tell me, what associations are useful for CE2mp3.

Yes, you're quite right, though while it's rexx only it's very well suited for the task.

Why I never got WarpIn do do anything useful was probably due the fact that it's not possible to use the promising gui to create wpi packages.

//Jan-Erik
Title: Re: CE2mp3
Post by: cyber on 2009.06.16, 17:19:45
Quote from: jep on 2009.06.16, 16:38:41
cyber, I may take your word for it...  ;) when can we expect you to deliver OpenOS/2?!  ;D

Ahem... How should I start writing ?  Some loop ? :)

Quote from: jep on 2009.06.16, 16:38:41
Yes, you're quite right, though while it's rexx only it's very well suited for the task.

Wich language is better than Rexx ?  ;)

Quote from: jep on 2009.06.16, 16:38:41
Why I never got WarpIn do do anything useful was probably due the fact that it's not possible to use the promising gui to create wpi packages.

Update:
It is probably waste space to paste 'code' here, so it is zipped, VREXX GUI version; very same to nonGUI but with wIndoZes to chose bitrate/samplerate/mapping... and if started without paramethar, file selection window -- no multiple files or directorys, or I do not know how.  Using directory name as paramethar work as before. Please test... If anyone need, there is VREXX -> files that is need to run.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.06.17, 12:48:30
Hi,
I have ffmpeg audio conversion integrated into my cdrwsel gui as well as video and I can make my current build available if needed. Just send me an email to r.dodin to the mail server "free.fr" .
I couldn't take as long time as planned on my gui development and it is in a "beta" build. I should have a few vacancies in a near time and plan to take time updating my interface (new first menu mutch more friendly...)
If you would like use it for audio/video conversion, just start cdrwsel with the flag enabling internal filemanager only.
Title: Re: CE2mp3
Post by: cyber on 2009.06.17, 13:10:49
CDRWSel do conversion of audio files in internal filemanager ? 
Don't got me wrong, I really value Your work and how You help me earlier, but this is kinda bloatware...  ;D
BTW any multisession now in CDRWSel ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.06.17, 15:14:16
First, I did CDRWSel GUI to manage more than one CD/DVD/BD burner using RSJ but rapidly,
* RSJ was made optional
* Added mkisofs and DVDDAO support
* Added some cdrtools options used for CD-AUDIO and to burn CD ISO images
Due to the need to put some own AVI files out of my camera on DVD:
* I added ffmpeg and dvdauthor support to create my DVD in one drag/drop from an AVI or FLV etc... file.
For the same raison about some personnal mp3 audio records to CD-AUDIO : 
* I added lame + sox support (my prefered tool) but due to format limitation, I enable audio conversion available though ffmpeg (including  WMA, FLAC etc format).
Of course, I do not need burn a CD or DVD each time and both video/audio conversion can be used out of the burning process through the internal filemanager. this one can be started without the burning menu

But all of these options are currently available under the build I have at home and audio conversion part isn't available on the build downloaded from my server by a few users.

My next step is to make the first menu more friendly like I told. That is, using quick path through a few icons :
1/ CD/DVD/BR to ISO image file (icon)
2/ CD/DVD/BR clone (icon)
3/ ISO to CD/DVD/BR (icon)
4/ Create CD-AUDIO (icon)
5/ Create DVD-VIDEO (icon)
6/ Create DATA CD/DVD/BR (icon)
7/ AUDIO to AUDIO (icon) using ffmpeg   
8/ VIDEO to VIDEO (icon) using ffmpeg

note: BR = Blu-ray (I use it a lot for my system backup, data only due to missing compatible UDF for the VIDEO while the curretn UDF or CDFS are those needed for datas)
As you can see, I plan to have more work to do (just after my system upgrade  ;) )

My knowledge is limited but I try to do my best and I wrote it using drdialog.
Cheers/2
Remy
   
Title: Re: CE2mp3
Post by: cyber on 2009.06.17, 15:20:24
Question for Dr Jep:

How to delete one last caracter from string.
For example Artist.Name-Song.1 to become Artist.Name-Song. ?
Title: Re: CE2mp3
Post by: cyber on 2009.06.17, 15:31:22
To CDRWSel:

I know... all started simple and easy lot years ago, and then suddenly I was lost in bunch of options and possibilities CDRWSel give two years ago (in non public releases). As I mostly need only sixt option (6/), and then was no multisession support built in, I wrote my own script for that (if You remember Napalm), and give up with CDRWSel. :) 
More friendly meny will for sure help. CDRWSel is now more like set of applications related to burn and manipulate audio/video files.
Title: Re: CE2mp3
Post by: jep on 2009.06.17, 16:48:31
Quote from: cyber on 2009.06.17, 15:20:24
Question for Dr Jep:

How to delete one last caracter from string.
For example Artist.Name-Song.1 to become Artist.Name-Song. ?

Alt. 1
fname = REVERSE( SUBSTR( REVERSE( fname ), 2 ) )

Advantage: Robust even if fname doesn't contain any characters, less sensetive to problems/errors
Disadvantage: Has to reverse the text twice

Alt. 2
fname = SUBSTR( fname, 1, LENGTH( fname ) - 1 )

Advantage: ?
Disadvantage: May cause halt/stop/crash if length( fname ) = 0, need a check before usage
if length( fname ) > 0 then
  fname = SUBSTR( fname, 1, LENGTH( fname ) - 1 )

//Jan-Erik
Title: Re: CE2mp3
Post by: Batchheizer on 2009.06.17, 18:12:11
CE2MP3 can't convert files with ' (in name nand/or path) for Example: "Manfred Mann's Earth Band - You Angel You.wav"
Title: Re: CE2mp3
Post by: CDRWSel on 2009.06.17, 23:58:39
Quote from: cyber on 2009.06.17, 15:31:22
To CDRWSel:

I know... all started simple and easy lot years ago, and then suddenly I was lost in bunch of options and possibilities CDRWSel give two years ago (in non public releases). As I mostly need only sixt option (6/), and then was no multisession support built in, I wrote my own script for that (if You remember Napalm), and give up with CDRWSel. :) 
More friendly meny will for sure help. CDRWSel is now more like set of applications related to burn and manipulate audio/video files.

Hi nice to read you. Yes I remember.
Right, it isn't multisession but I should be able to make it possible to run a burn process while converting multimedia files. I just disabled this possibility to prevent user error into the GUI (easy solution but obviously the bad solution) 
Yes, it is a GUI in the way you wrote.
Title: Re: CE2mp3
Post by: cyber on 2009.06.19, 10:40:35
Quote from: Batchheizer on 2009.06.17, 18:12:11
CE2MP3 can't convert files with ' (in name nand/or path) for Example: "Manfred Mann's Earth Band - You Angel You.wav"

My trusty old 40Gb HDD died yesterday... so... few days longer.  >:(
Title: Re: CE2mp3
Post by: cyber on 2009.06.22, 13:36:58
Quote from: Batchheizer on 2009.06.17, 18:12:11
CE2MP3 can't convert files with ' (in name nand/or path) for Example: "Manfred Mann's Earth Band - You Angel You.wav"

Fixed (both text and GUI versions), also fix default values for GUI.  8)

BTW... could You please ul any ogg with taginfo for me to test ?
Title: Re: CE2mp3
Post by: cyber on 2009.06.22, 14:16:57
Quote from: CDRWSel on 2009.06.17, 23:58:39
Hi nice to read you. Yes I remember.
Right, it isn't multisession but I should be able to make it possible to run a burn process while converting multimedia files. I just disabled this possibility to prevent user error into the GUI (easy solution but obviously the bad solution) 
Yes, it is a GUI in the way you wrote.

But multisession is very usable funtion ? I often do backups to DVD or CD in parts (small sizes every few days). Now I lost my primary drive, but nothing of important data was lost. Or I do not know yet.  :o
Only thing I wasn't implement is burn on the fly.
Title: Re: CE2mp3
Post by: jep on 2009.06.22, 15:38:47
Hi cyber,

can you give us an example how you wrote the code to handle file names with '.


In what way has the main drive failed (physical as in scratchings, crc32, clunky sound) or soft (fs can't repair damaged structure).

If it's accessible, try dfsee to recover data.
Try "Warp 4 Remote Install" via diskette if you can't add another hdd to the machine and cd boot refuse to work, select networking appropriate for your setup. Stop when it's supposed to access CD, use recovery tools from there on.

//wysiwyg
Title: Re: CE2mp3
Post by: cyber on 2009.06.22, 19:54:50
Quote from: jep on 2009.06.22, 15:38:47
can you give us an example how you wrote the code to handle file names with '.

PARSE VALUE REVERSE( FILESPEC( "N", v1ideost ) ) WITH ."."fname
fname = REVERSE( fname )
gname='"'fname'.mp3"'
FFmpeg_pth' -i 'v1ideost tmap' -acodec libmp3lame -ac 2 -ar 'tsample' -ab 'strip(tbit)'k -vol 256 'gname

and before intervention was gname="'"fname'.mp3'"


Problem was just in passing new name to FFmpeg,  it was like ffmpeg -i input.file -switches 'output with spaces.mp3'
and when output file contain ['] then this look like 'output' was lost.mp3'   so FFmpeg cannot handle this because need extension for codecs...
Now it will be "output wasn't lost.mp3", and will work.

Quote from: jep on 2009.06.22, 15:38:47
In what way has the main drive failed (physical as in scratchings, crc32, clunky sound) or soft (fs can't repair damaged structure).

It has partition corruption problems, bad blocks and non accessible data right after copying there. It isn't all partitions included, one with 16 Gb seems to work OK even now.

Quote from: jep on 2009.06.22, 15:38:47
If it's accessible, try dfsee to recover data.
Try "Warp 4 Remote Install" via diskette if you can't add another hdd to the machine and cd boot refuse to work, select networking appropriate for your setup. Stop when it's supposed to access CD, use recovery tools from there on.

I'm pretty sure that I have all important data back-uped, last of them on two different DVD media and one old 4Gb HDD. And this old 40 Gb probaly even Jan van Wijk will not want to rescue  :'( ... because is from time when I have 486DX4, and BIOS doesn't recognise such big disks... so I make to represent as only 16 Gb. Only windozes never complain about this disk, because use BIOS values. :)
Title: Re: CE2mp3
Post by: Batchheizer on 2009.06.22, 21:48:53
Quote from: cyber on 2009.06.22, 13:36:58
BTW... could You please ul any ogg with taginfo for me to test ?
You can create and tag any ogg-file with vorbiscomment from http://hobbes.nmsu.edu/download/pub/os2/apps/mmedia/sound/convert/oggvorbis-1.0.1-os2.zip or other (up-to-date) packages.

WPI is ready. Which license has CE2MP3? Or should I omit the license-page?

There is now a problem with finding ffmpeg.exe:

RC=0M:\Manfred Mann's Earth Band\Best of I+II>C:\TOOLS\M600\ffmpeg.exe -i "M:\Ma
nfred Mann's Earth Band\Best of I+II\You Angel You.WAV"
SYS0003: Der angegebene Pfad konnte nicht gefunden werden. (Path not found...)

ffmpeg and ce2mp3 are in the same dir (also in PATH).

Did you change anything concerning the path of ffmpeg.exe?

The version-number in the head of the scripts seem to be incorrect.

Handling of ' functions fine.

Please change the name of GUI-Version to "CD2MP3GUI.cmd" (or so) - so easy updating is possible.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.06.23, 00:11:15
Quote
But multisession is very usable funtion ? I often do backups to DVD or CD in parts (small sizes every few days). Now I lost my primary drive, but nothing of important data was lost. Or I do not know yet.  :o
Only thing I wasn't implement is burn on the fly.

Ok, I'll work on it again and review "backup" facilities due you used it a lot  ;)
Title: Re: CE2mp3
Post by: cyber on 2009.06.23, 09:38:19
Quote from: Batchheizer on 2009.06.22, 21:48:53
You can create and tag any ogg-file with vorbiscomment from http://hobbes.nmsu.edu/download/pub/os2/apps/mmedia/sound/convert/oggvorbis-1.0.1-os2.zip or other (up-to-date) packages.
I know... I want to test wider range of such media...
There is one more format that can have taginfo; WMA, but I found only mplayer showing taginfo, and not in very usable format.

Quote from: Batchheizer on 2009.06.22, 21:48:53
WPI is ready. Which license has CE2MP3? Or should I omit the license-page?

I wasn't think about that... should be opensource, free to use and modify to anyone in OS/2 eCS comunity.
Wouldn't wait for me to try 'tag updating' version ?

Quote from: Batchheizer on 2009.06.22, 21:48:53
There is now a problem with finding ffmpeg.exe:
RC=0M:\Manfred Mann's Earth Band\Best of I+II>C:\TOOLS\M600\ffmpeg.exe -i "M:\Ma
nfred Mann's Earth Band\Best of I+II\You Angel You.WAV"
SYS0003: Der angegebene Pfad konnte nicht gefunden werden. (Path not found...)
ffmpeg and ce2mp3 are in the same dir (also in PATH).
Did you change anything concerning the path of ffmpeg.exe?
Oposite: I forgot to change (to strip my own path)... just replace C:\TOOLS\M600\ffmpeg.exe  with ffmpeg.exe and will work. Or download attach here.

Quote from: Batchheizer on 2009.06.22, 21:48:53
The version-number in the head of the scripts seem to be incorrect.
Please change the name of GUI-Version to "CD2MP3GUI.cmd" (or so) - so easy updating is possible.

Fixed...
Title: Re: CE2mp3
Post by: Batchheizer on 2009.06.23, 11:17:53
Quote from: cyber on 2009.06.23, 09:38:19
There is one more format that can have taginfo; WMA, but I found only mplayer showing taginfo, and not in very usable format.
ExifTool (on hobbes) can read WMA/WMV-Tags. Simple create another assocation to WMA/WMV. Hope it runs fine.

Quote from: cyber on 2009.06.23, 09:38:19
I wasn't think about that... should be opensource, free to use and modify to anyone in OS/2 eCS comunity.
Wouldn't wait for me to try 'tag updating' version ?
Yes, I'll wait. So I take GPL-License.

Is there a way to reduce the files needed for the GUI-version. Now it needs VREXX.exe (in Path?) and two DLLs (in Libpath?). Is there a way to create a simple EXE from the GUI-script?

GUI should be able to cancel the process. Now ESC goes to next parameter-window. If GUI-Version is started in background (only parameter-windows are displayed, and only this makes sense for a GUI) no question of ffmpeg (overwrite existing file) is show to the user. Can you catch the output of ffmpeg in a fine way? So questions and progress will be displayed to the user.
Title: Re: CE2mp3
Post by: cyber on 2009.06.23, 11:24:49
Quote from: CDRWSel on 2009.06.23, 00:11:15
Ok, I'll work on it again and review "backup" facilities due you used it a lot  ;)

Hey, as I start my own "program" it is to late for me, but I really beleive that our community need Your application, and as You wasn't make public releases for years it would be a 'killer' package.
Title: Re: CE2mp3
Post by: cyber on 2009.06.23, 11:39:21
Quote from: Batchheizer on 2009.06.23, 11:17:53
ExifTool (on hobbes) can read WMA/WMV-Tags. Simple create another assocation to WMA/WMV. Hope it runs fine.

Thanks.

Quote from: cyber on 2009.06.23, 09:38:19
Is there a way to reduce the files needed for the GUI-version. Now it needs VREXX.exe (in Path?) and two DLLs (in Libpath?). Is there a way to create a simple EXE from the GUI-script?

I think that this can be converted to exe, and be complete. In other way, VRexx and dll's can reside in same path as convertor.
There will be then another problem, path statement for ffmpeg will be 'hard-coded' in to exe, and also now You have abillity to change directory where to look first(f.e. c:\dowload\music), so when start convertor without paramethar, it will open file dialog in this directory (as in example in c:\dowload\music). So in this case extra code is needed... to store such values in EA (like Jep suggested) or in separate cfg file (looks more easy to me).

Quote from: cyber on 2009.06.23, 09:38:19
GUI should be able to cancel the process. Now ESC goes to next parameter-window.

Aha. This could be done easy.

Quote from: cyber on 2009.06.23, 09:38:19
If GUI-Version is started in background (only parameter-windows are displayed, and only this makes sense for a GUI) no question of ffmpeg (overwrite existing file) is show to the user.

OK, one more funtion of checking does target file already exist will solve this. It can be overwriten, or got new name ?

But I wasn't ever think about starting cmd in background, if You want to keep quality as much as it is possible, then You will make convert to same bitrate and samplerate... and this is what ffmpeg -i source file will show You when start convertor ?

Quote from: cyber on 2009.06.23, 09:38:19
Can you catch the output of ffmpeg in a fine way? So questions and progress will be displayed to the user.

This is something I do not have idea how... Calling Dr Jep ?

Or do not make it such complex.  ;)
Title: Re: CE2mp3
Post by: jep on 2009.06.23, 14:59:34
Ring, ring... someone calling?!  ;D

Output from some app can be routed through rexxqueue, but the annoying thing that many experience is that it usually halt the queue processing until all is done, something that is less desirable. You want the output when the app write it to stdout (screen) and it has to be handled asynchronously, while rexxqueue does it synchronously.

There are various packages that can help you out that's written for rexx to deal with ipc (Inter Process Communication), but they seem "low level" and as such, often allow you to do everything, in 10 000 or so, easy (or not) steps with many params that has to be provided with the right settings (C/C++ like thinking). How to get there is beyond me, but RobertM may be your guy to explain how to deal with those.

Anyway, I got so frustrated that I started to write a rexx dll that would handle it with just a few parameters, but stumbled on how to start a thread and then how to reroute the output back to a rexx queue in a proper way, but noone came to may aid.

If you (or get someone else to) can show me a working example how to create a proper thread, signal back and forth how various messages and handle pipes, then I'll gladly write it! I'll even add some more useful functions later on that does things in a more rexx-friendly way.

Example what one has to use:
OS/2 Programming Toolkit
Book: Control Program Programming Guide and Reference (cp3.inf)
Chapter: Pipes->Using named Pipes->Redirecting Standard I/O for Child Processes
Functions:DosDupHandle
DosCreatePipe
DosExecPgm
etc.

+ Thread and thread communication

//Jan-Erik
Title: Re: CE2mp3
Post by: cyber on 2009.06.24, 14:06:16
No FFmpeg output in CE2MP3 !!! ... sit and wait !  ;D 
There is one other thing... it can be some progres indicator in directory process mode, depending on files being processed, file size... or something ?

GUI should be able to cancel the process. Now ESC goes to next parameter-window.
Aha. This could be done easy
It looks like it will be easy. I rewritten allmost whole script. chasing typos.

If GUI-Version is started in background (only parameter-windows are displayed, and only this makes sense for a GUI) no question of ffmpeg (overwrite existing file) is show to the user.
OK, one more funtion of checking does target file already exist will solve this. It can be overwriten, or got new name ?
Next thing in line...
Title: Re: CE2mp3
Post by: CDRWSel on 2009.06.24, 18:02:44
About ffmpeg,
After a few more test, adding 2> \pipename should be ok to get verbose data into the pipe
RD       
Title: Re: CE2mp3
Post by: cyber on 2009.06.25, 14:52:57
Quote from: CDRWSel on 2009.06.24, 18:02:44
About ffmpeg, After a few more test, adding 2> \pipename should be ok to get verbose data into the pipe
RD       

Could You give more info, please, how exactly to start ffmpeg with 2> \pipename, and how to catch this in Rexx ?

Here is newest release, please do intensive tests on GUI version and report any problem.
New is that now both versions will overwrite target mp3 if they exist without asking, and with GUI version now is possible to cancel by presing ESC at any window (text mode can cancel using [CTRL+Break] at any time).
Title: Re: CE2mp3
Post by: jep on 2009.06.25, 17:51:58
Hi,

I've added 2 functions to rxtnsion.dll that I test to see if I can get the desired behaviour to redirect output from other text mode applications.
I have to write some more code but have had a bit much to do at work, but can hopefully look at it in the comming week.

My initial test leave me pussled as the output look like garbage, but it'll hopefully turn out right some time in the future.

//Jan-Erik
Title: Re: CE2mp3
Post by: RobertM on 2009.06.25, 20:29:30
jep,

Could it be because certain programs send ascii character positioning and other ansi codes with it? I had that problem with a parser I wrote for curl or wget (forget which), and had to parse out those codes. I found whenever there was a cursor move (reposition for text output for instance), or a color change, that there was an ansii sequence appended at that char output location.

Rob
Title: Re: CE2mp3
Post by: CDRWSel on 2009.06.25, 23:16:24
Quote from: cyber on 2009.06.25, 14:52:57
Quote from: CDRWSel on 2009.06.24, 18:02:44
About ffmpeg, After a few more test, adding 2> \pipename should be ok to get verbose data into the pipe
RD       

Could You give more info, please, how exactly to start ffmpeg with 2> \pipename, and how to catch this in Rexx ?

Here is newest release, please do intensive tests on GUI version and report any problem.
New is that now both versions will overwrite target mp3 if they exist without asking, and with GUI version now is possible to cancel by presing ESC at any window (text mode can cancel using [CTRL+Break] at any time).


First get RXU dll from hobbes:
http://hobbes.nmsu.edu/download/pub/os2/dev/rexx/rxu1a.zip

May be something like:

/* load RXU functions for PIPE process */
If rxfuncquery('rxuinit') then do
Call RxFuncAdd 'rxuinit','rxu','rxuinit'
Call rxuinit
End
/* ---------------------------------------------- */
pipename = '\pipe\ffmpeg'
openmode = 'WIN'
pipemode = 'WTR'
instance_count = '1'
outbuf = '4096'
inbuf = '4096'
timeout = '-1'
readbufsize = '4096'
EOFCR=x2c("0D0A")
EOF = x2c(4)
EOF1=x2c("0D")
/* -- */
Ddosrc = rxcreatenpipe('hpipe',pipename,openmode,pipemode,instance_count,
    ,outbuf,inbuf,timeout)
If Ddosrc \= 0 then say 'RxCreateNPipe failed with rc =' Ddosrc
Ddosrc = rxconnectnpipe(hpipe)
Ddosrc = RxDosRead( 'data', hpipe, readbufsize )
Do while word(Ddosrc,1) = 0 & word(Ddosrc,2) > 0
     /* may be you'll have to translate every EOF and EOF1 into CDTEST with something like
         If (pos(CRTEST, data, 3) > 0)|(pos(EOF, data, 3) > 0)|(pos(EOF1, data, 3) > 0)  then do
         pipe_line_in=translate(data,EOFCR,EOF)
         pipe_line_in=translate(data,EOFCR,EOF1)
         ... add your code to pickup data from the messages sent through the pipe ....     
     */
     Ddosrc = RxDosRead( 'data', hpipe, readbufsize )
End
...
...
--------------------------------------------------

Start your ffmpeg after starting your rexx programm which opens the pipe and add as last ffmpeg argument  2> \pipe\ffmpeg
You should get all messages issued by ffmpeg into the pipe. 
Title: Re: CE2mp3
Post by: jep on 2009.06.30, 14:22:12
Hi,

CDRWSel has provided you with a very powerful example...

In the mean time, I wrote a couple of functions to do about the same thing, please see attached file with example and source code.
The exemple contains the executable "loop.exe" that run and just write a number (0 to 9999) to the screen.

Here's the C/C++ code for the rexx dll while we're at it...
/**
* function: rxExecPrgm( app_name, <parameters>, <environment> )
*
* This function returns an empty string if it couldn't start the application.
*/
APIRET APIENTRY __export rxExecPrgm( CHAR *name, ULONG numargs, RXSTRING  args[], char* queuename, RXSTRING *retstr )
{

   if( numargs < 1 )
      return INVALID_ROUTINE;

   var appName( args[0].strptr );
   var params( ( numargs > 1 ) ? args[1].strptr : "" );
   var appEnv( ( numargs > 2 ) ? args[2].strptr : "" );

    HPIPE hpW;
    CHAR szFailName[256];

    HFILE hfSave = -1, hfNew = HF_STDOUT;

    DosDupHandle( HF_STDOUT, &hfSave ); /* Saves standard output handle      */

    DosCreatePipe( &Output.hpR, &hpW, PIPESIZE ); /* Creates pipe                      */

    DosDupHandle( hpW, &hfNew ); /* Duplicates standard output handle */

    DosExecPgm( szFailName, sizeof( szFailName ), EXEC_ASYNCRESULT, params, appEnv, &Output.resCode, appName );  /* Starts child process      */

    DosClose( hpW );                /* Closes write handle to ensure     */
                                  /* Notification at child termination */
    DosDupHandle( hfSave, &hfNew );     /* Brings stdout back                */

   appName.cpy( "pid=" ).cat( Output.resCode.codeTerminate ).set( retstr );

   Output.ulRead = 1;

   return VALID_ROUTINE;
}

/**
* function: rxPrgmOut( <none> )
*
* This function returns an empty string if it couldn't start the application.
*/
APIRET APIENTRY __export rxPrgmOut( CHAR *name, ULONG numargs, RXSTRING  args[], char* queuename, RXSTRING *retstr )
{
   char achBuf[1024];
   PID pidChild = 0;
   var tmpBuf;

   if ( Output.ulRead )
      DosRead( Output.hpR, achBuf, sizeof( achBuf ), &Output.ulRead );

   if ( Output.ulRead ) {
      tmpBuf.cpy( Output.buffer ).cat( achBuf, Output.ulRead );
      Output.buffer.cpy( tmpBuf.splitAtLast( '\n', true ) );   //Remove delimiter
   } else {
      DosWaitChild( DCWA_PROCESS,    /* Look at only the process specified */
                 DCWW_WAIT,       /* Wait until a child terminates      */
                 &Output.resCode,        /* Termination codes returned         */
                 &pidChild,       /* pid of terminating process         */
                 Output.resCode.codeTerminate );   /* Process (pid) to look at */

      tmpBuf.cpy( "rc=" ).cat( (int) Output.resCode.codeTerminate );
   }

   tmpBuf.set( retstr );

   return VALID_ROUTINE;
}


//Jan-Erik
Title: Re: CE2mp3
Post by: cyber on 2009.07.06, 17:07:28
After some delay, on the code again.  8)

How to strip tab character from text string using Rexx ?
    26 +++     tagpart = STRIP(tagpart, '?');
REX0040: Error 40 running C:\Tools\M600\ce2mp3\CE2MP3tag.cmd, line 26:
Incorrect call to routine
Using spaces in tagpart = STRIP(tagpart, '        '); does not help in finding this character.
Title: Re: CE2mp3
Post by: RobertM on 2009.07.06, 18:53:12
Quote from: cyber on 2009.07.06, 17:07:28
After some delay, on the code again.  8)

How to strip tab character from text string using Rexx ?
    26 +++     tagpart = STRIP(tagpart, '?');
REX0040: Error 40 running C:\Tools\M600\ce2mp3\CE2MP3tag.cmd, line 26:
Incorrect call to routine
Using spaces in tagpart = STRIP(tagpart, '        '); does not help in finding this character.

All you need to do is look for it's ASCII character code. That works for Carriage Returns and Line Breaks as well.

TAB= 9

Thus, look for D2C(9) instead of spaces or such.

tagpart = STRIP(tagpart, d2C(9))

And of course, this works for any character not representable in typed code (such as any below 32)

Rob
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.06, 19:12:19
Hi !
From my previous update, you'll have EOF for End Of File x'0D' end CR x'0A' for Carriage return
To remove these special characters, use the translate instruction
eof=x2c('0D')
tagpart=translate(tagpart,'',eof)
If you have more than one chars to 'translate', just append it after first chars to be translated as follow
cr=x2c('0A')
eof=x2c('0D')
tagpart=translate(tagpart,'',eof||cr)

Remy
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.07, 00:38:29
Hi !
Here is my updated "progress bar" used with cdrwsel but this version is usable separatly and supports incoming pipe datas from 'DVDDAO', 'FFMPEG'
How to use it !
start it as a separate thread using a '@det ' command under your program and give a process type parameter.
e.g. '@start cdrwbar.exe dvddao'  for dvddao
e.g. '@start cdrwbar.exe ffmpeg' for 1 ffmpeg (video) process and close
       or
       '@start cdrwbar.exe ffmpeg5' for 5 ffmpeg (video) processes and close after the 5th process
       (it will not close until 5th ffmpeg is processed)
       This is usefull if you run ffmpeg in 2 pass mode (use ffmpeg2)
e.g '@start cdrwbar.exe affmpeg'  or replace affmpeg by affmpegX (X = any number) - for Audio 
       You can follow progress of each started ffmpeg process through one opened progress bar (be carrefull to run as many processes as you specified into the parameter)
.
Add at end of your ffmpeg command line the corresponding pipe option:
  2>/pipe/dvddao    (for dvddao)
  2>/pipe/ffmpeg     (for any ffmpeg type)

Cheers/2
Remy

e.g.
/* rexx example script */
/* ------------------------------------------------------------------------------------------------------- */
/* Start cdrwbar with the number of tracks to convert - % + time + progress Indicator */
/* ------------------------------------------------------------------------------------------------------- */
'@start cdrwbar.exe affmpeg3'
/* ------------------------------------------------------------------------------------------------------- */
/* May be you add here a process to check cdrwbar PID is available before continue */
/* ------------------------------------------------------------------------------------------------------- */
Call syssleep 3  /* wait for full initialized cdrwbar + open pipe */
'ffmpeg -y -i C:\MUSIC\my_track1.ogg C:\MP3\my_track1.mp3 2>/pipe/ffmpeg'
say rc
'ffmpeg -y -i C:\MUSIC\my_track2.ogg C:\MP3\my_track2.mp3 2>/pipe/ffmpeg'
say rc
'ffmpeg -y -i C:\MUSIC\my_track3.ogg C:\MP3\my_track3.mp3 2>/pipe/ffmpeg'
say rc
return


                 
         
Title: Re: CE2mp3
Post by: cyber on 2009.07.08, 09:44:06
To: CDRWSel

Progress bar does not work in my enviroment:
SYNTAX ERROR: Routine not found in:
Ddosrc = rxcreatenpipe('hpipe',pipename, openmode,pipemode,instance_count,
Added later: I wonder... did I put right dll in path or not... need to check this at home.


UPDATED:

[C:\TOOLS\M600\ce2mp3-cdrw]ffmpeg.exe -i Hydrate-Kenny_Beltrey.ogg  -acodec libm
p3lame -ac 2 -ar 44100 -ab 64k -vol 256 "Hydrate-Kenny_Beltrey.mp3"  2>/pipe/ffm
peg
SYS0003: The system cannot find the path specified.
conversion complete

It still have trouble. All exe, dll, cmd and ogg files in same path. Some references to path in cdrwbar.exe ?


To: RobertM

Thanks

Where I can find those character codes, help.exe is sometime useless;

tagstr=d2C(9)
tagpart  = LINEIN("tag.nfo")
tagpart  = strip( tagpart , L, tagstr) 

Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.08, 21:39:57
Hi cyber !
You must have the RXU.DLL under a dllpath. I suggest you to copy the RXU.DLL under [boot_drive]:\ecs\dll or under [boot_drive]:\os2\dll 
At start of cdrwbar, I load both dlls :
/* load general REXXUTIL functions */
If rxfuncquery('SysLoadFuncs') then do
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
End
/* load RXU functions for PIPE process */
If rxfuncquery('rxuinit') then do
Call RxFuncAdd 'rxuinit','rxu','rxuinit'
Call rxuinit
End

According the error you have, rxu dll isn't loaded or it fails !
Verify you have Rexxutl.dll too and do a try after a copy of dll's into dll path as previous writen.

As soon the pipe isn't created and opened by cdrwbar, the error
SYS0003: The system cannot find the path specified.
you have is correct because /pipe/ffmpeg doens't exist

Cheers/2
Remy
 
PS: here are 2 screencopy about cdrwbar result on video or audio tracks.
Title: Re: CE2mp3
Post by: cyber on 2009.07.09, 01:12:43
Quote from: CDRWSel on 2009.07.08, 21:39:57
You must have the RXU.DLL under a dllpath. I suggest you to copy the RXU.DLL under [boot_drive]:\ecs\dll or under [boot_drive]:\os2\dll 

Looks like I've been too tired.  First I was try with wrong dll, and then on wrong place.  :'(
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.09, 02:58:12
Hi!
You are not alone, I'm probably tied too.
Here is an updated build.
* Corrected seconds display to have it right align with padded '0' (now, 1.00s is 01.00s)
* I just realized that I left a duplicate var for the first arg which made cdrwbar start in dvddao mode only   ::)

With good dll, it should be ok now.
Remy       

PS: This wiki page may be usefull for control characters translation  ;)
       http://fr.wikipedia.org/wiki/Fin_de_ligne  (French)
       http://en.wikipedia.org/wiki/Newline (in English with much more comments)
Title: Re: CE2mp3
Post by: cyber on 2009.07.09, 10:01:46
Why I can not use funtion NOT like this
If NOT artisttag  = ""   Then writetag

and this is working ok:
If artisttag = ""  Then z=1
else writetag


modyfy to test behaviour.
Title: Re: CE2mp3
Post by: cyber on 2009.07.10, 11:47:26
CE2MP3 v07

Tag from source ogg files will be copyed in to created mp3. You need files from ogg-tags.zip (id3v2, ogginfo and dll's) in path.

There is sideefect from using wipe for overwriting; if You try to convert mp3 to mp3 and source file is in directory where is CE2MP3, source file will be deleted BEFORE converting.   Work on this.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.10, 21:03:38
Do you plan to use querycddb.exe ? (included with leechmp3)
.
Strange, I'm unable to view page 3 of this topic once I'm logged in !! (there is a problem on os2world)
Title: Re: CE2mp3
Post by: RobertM on 2009.07.11, 10:55:39
Quote from: CDRWSel on 2009.07.10, 21:03:38
Do you plan to use querycddb.exe ? (included with leechmp3)
.
Strange, I'm unable to view page 3 of this topic once I'm logged in !! (there is a problem on os2world)

Go to http://www.os2world.com/forum/ and find this topic. That will get you in until we figure out the issue with the Joomla wrapper.
Title: Re: CE2mp3
Post by: Batchheizer on 2009.07.11, 12:55:12
Quote from: cyber on 2009.07.10, 11:47:26
CE2MP3 v07

Tag from source ogg files will be copyed in to created mp3. You need files from ogg-tags.zip (id3v2, ogginfo and dll's) in path.

Ogg-Tag is NOT copied zu Mp3. I created an OGG with only one tag (artist=Ich), but it is not copied to mp3 (no tags)
The last output of CE2MP3 shows no tags.

Should all files of ogg-tags be copied to path? Or should the DLL placed to libpath?

Thanks for your work on this fine script.
Title: Re: CE2mp3
Post by: cyber on 2009.07.11, 23:44:49
Please try this 07a version.
Strange situation... on development machine 07 works perfect, on this one here not. But 07a should work OK on both.
Different versions of REXX in use ?
AHA, path only, test with (in command line) ogginfo.exe oggfile.ogg, if it show tags it should work.
Title: Re: CE2mp3
Post by: cyber on 2009.07.13, 11:43:13
Strange thing is that difference isn't in Rexx, than in ogginfo.exe;
on one machine (eCS 2 b4) gives output like:

        TITLE=Hydrate - Kenny Beltrey

and on other (Warp 4.5) like:

        title=Hydrate - Kenny Beltrey ???

Adding translating to uppercase of part that should be recognised before matching, solve problem, and work on both system.  I hope. :)
Title: Re: CE2mp3
Post by: cyber on 2009.07.13, 11:53:07
Quote from: CDRWSel on 2009.07.10, 21:03:38
Do you plan to use querycddb.exe ? (included with leechmp3).

   No ? QueryCD is for getting data about music CD and there is already several apps/frontends that can do converting from musicCD to mp3 ?  I'm trying to got something that OS/2 and eCS miss (Hey! I too!!!) and not to duplicate existing tools. On the other hand You have right... convert EVERYTHING to mp3 should include musical CD's too.  :D  
   Change name to "CE2MP3 except musical CD" ?  ;D

   There is still problems with cdrwbar; on single file usage it stays at beggining until conversion finished, then just jump to end. On directory processing bar behave same, except that it start bar for every file and show >> Error ocured <<. Comand line say SYS1806: The system cannot start the session in the foreground.

There is workaround for blocked pages. If page doesn't shown right after my posting, modifyng last post via direct link (http://www.os2world.com/forum/) always turn page shown normal. Modify of page might cause problem as it behave like off/on switch ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.13, 15:01:02
* Use FFMPEG R18731 build *
I found an corrected a few problem under previous build + one which will corrected this evening
I will review the one run multiple file process too before posting it here again. It should be done very soon  ;)

note: If your process run ffmpeg one time for each file (e.g ffmpeg ..... ; ffmpeg ..... ; ffmpeg ..... )
        and you start cdrwbar with parm AFFMPEG8 (8=number of time ffmpeg is started), you'll have to plan
        adding a small timer between each ffmpeg process (e.g. syssleep 5/2)   
 
Remy
Title: Re: CE2mp3
Post by: Batchheizer on 2009.07.13, 16:59:27
Quote from: cyber on 2009.07.11, 23:44:49
Please try this 07a version.
Strange situation... on development machine 07 works perfect, on this one here not. But 07a should work OK on both.
Different versions of REXX in use ?
AHA, path only, test with (in command line) ogginfo.exe oggfile.ogg, if it show tags it should work.

07a fine. It sets ID3V2 and ID3V1. I will make more test on "Umlaute" etc.
Title: Re: CE2mp3
Post by: cyber on 2009.07.13, 17:03:07
Module for tag info V1 for mp3 - mp3 conversion ready.
Is it possible to have tag data v2 and nothing for v1 ? Or is it just uncommon ?
Title: Re: CE2mp3
Post by: cyber on 2009.07.13, 17:05:36
Quote from: Batchheizer on 2009.07.13, 16:59:27
07a fine. It sets ID3V2 and ID3V1. I will make more test on "Umlaute" etc.

Thanks for testing. :) It should work...   :D
Title: Re: CE2mp3
Post by: Batchheizer on 2009.07.13, 21:17:17
Quote from: cyber on 2009.07.13, 17:03:07
Module for tag info V1 for mp3 - mp3 conversion ready.
Is it possible to have tag data v2 and nothing for v1 ? Or is it just uncommon ?

Both should be set. One big difference is the codepage (V2: Unicode) and the length a string (Title etc.).
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.13, 23:36:55
Hi,

I updated your prog for use with cdrwbar.
I include both into the same zip file
(test not done)
Title: Re: CE2mp3
Post by: cyber on 2009.07.14, 09:38:01
Quote from: Batchheizer on 2009.07.13, 21:17:17
Both should be set. One big difference is the codepage (V2: Unicode) and the length a string (Title etc.).

If only tagv1 at source exist, it will be copyed to tagv1 and v2 at target mp3.
If tagv1 and tagv2 at source exist, it will be copyed as tagv1->tagv1 and tagv2->tagv2 ?
And if tagv2 exist and tagv1 does not, it will be just tagv2->tagv2 !
Is this OK ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.14, 09:47:05
Hi Cyber,

Have a look into the CE2MP3 included into the zip file.
I've added a few changes as suggestions with a comment + "RD" flag
e.g. replace temp file by a rxqueue etc...
Well done, continue...  ;)

Title: Re: CE2mp3
Post by: cyber on 2009.07.14, 09:59:52
Quote from: CDRWSel on 2009.07.13, 23:36:55
I updated your prog for use with cdrwbar.
I include both into the same zip file
(test not done)

Single file: Progress bar, down line where "Track:" is, does not 'travel' from left to right; not show real progres during conversion. It stay at beggining until end, then just jump to the end of line when finishing.
Directory: it fails with:
  140 +++         Call sysleep 5 / 2;
REX0043: Error 43 running C:\TOOLS\M600\ce2mp3-cdrw\CE2MP3_rd.cmd, line 140:
Routine not found
   43 +++     Call ProcDir;

:)))  After correcting typo (syssleep) it is working like single file mode, except that top bar wich represent track n/n show correct possition when jump to next file.
Little more to perfection !!! :)

* Use FFMPEG R18731 build *  All the time. :)


Title: Re: CE2mp3
Post by: cyber on 2009.07.14, 10:08:47
Quote from: CDRWSel on 2009.07.14, 09:47:05
Have a look into the CE2MP3 included into the zip file.
I've added a few changes as suggestions with a comment + "RD" flag
e.g. replace temp file by a rxqueue etc...
Well done, continue...  ;)

Nice. But progress bar should travel from left to right during FFMPEG making conversion ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.14, 10:34:06
Sorry for the typo  ::)

Yes it should. Doesn't it   ???  (I would like see a screen copy about the exact pb - small size)
when, starting the progress bar, the parameter tells him the product to monitor (it could be dvddao) and ffmpeg (more are planned...). When ffmpeg is used, the parameter can be "FFMPEG" or "AFFMPEG" to make a difference between video and audio tacks. If more than 1 track is going to be converted and stop of progress bar isn't wanted at end of first track, add the number of tracks appended to the parameter like : ffmpeg5 (progress bar if than left open and is waiting to a total of 5 ffmpeg run (if an error occurs, it stops else it stay open and wait until completion)
       
Progress bar "turtle" is starting when correct information is returned into the pipe. If the program start before te progress bar is enabled to read the pipe, some datas may be lost ! (try to increase the wait time just after the cdrwbar start and before the ffmpeg command. e.g. add 3s (you can reduce it after test))

In case of trouble with cdrwbar, you can kill it or send a "ffmepg -h 2>/pipe/ffmpeg command". Canceling the ffmpeg command gives an error and closes cdrwbar too.

May be you can email me at free.fr
r.dodin       
Title: Re: CE2mp3
Post by: Batchheizer on 2009.07.14, 11:13:38
Quote from: cyber on 2009.07.14, 09:38:01
If only tagv1 at source exist, it will be copyed to tagv1 and v2 at target mp3.
OK
Quote from: cyber on 2009.07.14, 09:38:01
If tagv1 and tagv2 at source exist, it will be copyed as tagv1->tagv1 and tagv2->tagv2 ?
OK
Quote from: cyber on 2009.07.14, 09:38:01
And if tagv2 exist and tagv1 does not, it will be just tagv2->tagv2 !
Is this OK ?
In the last case copy tagv2 to tagv1. Maybe they are cutted - but this is better than none ID3V1- because many OS2-porgrams can only read ID3V1 (minta; CW_Classes etc.).


Title: Re: CE2mp3
Post by: cyber on 2009.07.14, 11:39:40
To CDRWSel:

First bar (bar1) stays unchanged to the end of conversion. At the end is updated like bar2.


To Batchheizer:
>In the last case copy tagv2 to tagv1. Maybe they are cutted - but this is >better than none...

OK, but it may happend when unicode is used for tagv2 to look like garbage in tagv1 ?
Have any mp3 with tagv2 unicode characters, i've search web to find some files for test but find only files with tagv1 only and tagv1 identical to tagv2 ?  Link or if files cyber<et>nscable<dot>net
Title: Re: CE2mp3
Post by: cyber on 2009.07.14, 15:32:44
To Batchheizer:


As ID3v2 can handle to many frames, I've suggest to chose only those below:

COMM    [#sec4.11 Comments]
TCOM    [#TCOM Composer]
TCON    [#TCON Content type]
TEXT    [#TEXT Lyricist/Text writer]
TIT1    [#TIT1 Content group description]
TIT2    [#TIT2 Title/songname/content description]
TPE1    [#TPE1 Lead performer(s)/Soloist(s)]
TPE2    [#TPE2 Band/orchestra/accompaniment]
TPOS    [#TPOS Part of a set]
TRCK    [#TRCK Track number/Position in set]
TSSE    [#TSEE Software/Hardware and settings used for encoding]
TYER    [#TYER Year]

suggestions ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.15, 02:53:06
Hi Cyber,
Ok, I understand
I would like see the logs of the process (to see them, click on "file->logs" because the progress bar can only progress if ffmpeg returns progression messages like:
size=      77kB time=3.29 bitrate= 191.1kbits/s   
size=     156kB time=6.69 bitrate= 191.5kbits/s   
size=     238kB time=10.16 bitrate= 191.7kbits/s   
size=     321kB time=13.71 bitrate= 191.8kbits/s   
size=     400kB time=17.08 bitrate= 191.8kbits/s   
size=     481kB time=20.56 bitrate= 191.8kbits/s   
size=     562kB time=23.98 bitrate= 191.9kbits/s   
size=     644kB time=27.51 bitrate= 191.9kbits/s   
...
From the total duration (found into the logs) and the time, I calculate the % of total process done. Each "size" entry gives a new progress to the bar  ( saw one time only missing size entries )   
Remy
Title: Re: CE2mp3
Post by: cyber on 2009.07.15, 10:03:42
Logs in attachments, there is no any trace of 'total duration' in both logs. In FFMPEG output in general I see nothing useful that can give any clue of how more of conversion is done. Maybe -verbose <switch> is missing ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.15, 10:41:11
Ok,

Here is the problem. Well do a try adding the -v flag but I'm not sure it will help
Do you know how this ogg file was created ?

Look at my attached log, it is much different and here is the command I used for the test:
ffmpeg -y -i "f:\ogg_tracks\track03.ogg" -ab 128k -ar 44100 -ac 2 "track03.mp3" 2>affmpeg.txt

I will think for a bypass...
Remy 
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.15, 15:48:25
Hi cyber !

Bypass found and implemented. (use of ogginfo which returns duration and this value is sent thue pipe to cdrwbar).
See modified ce2mp3 with comments into this zip file
Use updated cdrwbar with support of new special options.
;) 

Tell me if it is ok now.
Remy
Title: Re: CE2mp3
Post by: Batchheizer on 2009.07.15, 16:00:42
Quote from: cyber on 2009.07.14, 15:32:44
To Batchheizer:


As ID3v2 can handle to many frames, I've suggest to chose only those below:

COMM    [#sec4.11 Comments]
TCOM    [#TCOM Composer]
TCON    [#TCON Content type]
TEXT    [#TEXT Lyricist/Text writer]
TIT1    [#TIT1 Content group description]
TIT2    [#TIT2 Title/songname/content description]
TPE1    [#TPE1 Lead performer(s)/Soloist(s)]
TPE2    [#TPE2 Band/orchestra/accompaniment]
TPOS    [#TPOS Part of a set]
TRCK    [#TRCK Track number/Position in set]
TSSE    [#TSEE Software/Hardware and settings used for encoding]
TYER    [#TYER Year]

suggestions ?

I think this sounds good.OGGs mostly do not have so much tags.
Title: Re: CE2mp3
Post by: cyber on 2009.07.16, 09:58:59
It miss oggtag: routine wich probably should determine Vrun_time ?

You do not test Your programs, or this work on Your machine ?

But if You analyse with ogginfo, then this solution is for ogg input files only. It is better to use ffmpeg with -i to got duration, and then calculate progress with time=nn from duration ?  Then this can be usefull for any format that FFMPEG support ?

  Duration: 00:03:10.81, start: 0.000000, bitrate: 90 kb/s
    Stream #0.0: Audio: vorbis, 44100 Hz, mono, s16, 110 kb/s
Output #0, mp3, to 'HanyuShuipingKaoshi.mp3':
    Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=    1491kB time=190.85 bitrate=  64.0kbits/s
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.16, 12:10:07
Right, I didn't the test with your CE2MP3 I updated to give you some suggestions but fully test was done with a small rexx I wrote to validate cdrwbar process.
.
CDRWBAR uses ffmpeg information returned during convertion process and sent through the pipe like I wrote it previously (ffmpeg always returnes duration with all test I did and with any kind of supported files) but the logs you provided show that ffmpeg didn't return this information for your tracks or different control chars exist preventing message trapping ! (i added this option to allow a bypass in case of problems like you have and duration can be calculated or extract from any tools or process you want and pass it to cdrwbar as default with this new options but cdrwbar always uses the last duration value received. If ffmpeg send one, it is taken and used instead of the default provide outside of the ffmpeg convertion) or may be something got wrong under your system and I would like see the logs issued from a ffmpeg command with  2>ffmpeg.log  added as last parm to compare. I'm sure it is going to work as well as under my system  ;)
Thanks
Remy

note: just replace ogginfo by ffmpeg and extract the duration, this one will be passed as default duration value for the current track if you prefer but why is ffmpeg sending you duration value when not converting file ? ( pleasen do a try outside of CE2MP3 (command line) using following example: ffmpeg -y -i "your_ogg_track" -ab 192k -ar 44100 -ac 2 "your_mp3_outtrack" 2>/pipe/ffmpeg  just after starting cdrwbar like:  cdrwbar affmpeg )  
Title: Re: CE2mp3
Post by: cyber on 2009.07.17, 10:42:35
Quote from: CDRWSel on 2009.07.16, 12:10:07
Right, I didn't the test with your CE2MP3 I updated to give you some suggestions but fully test was done with a small rexx I wrote to validate cdrwbar process.

Can You provide this small rexx to test to ?

Quote from: CDRWSel on 2009.07.16, 12:10:07
CDRWBAR uses ffmpeg information returned during convertion process and sent through the pipe like I wrote it previously (ffmpeg always returnes duration with all test I did and with any kind of supported files) but the logs you provided show that ffmpeg didn't return this information for your tracks or different control chars exist preventing message trapping ! (i added this option to allow a bypass in case

I've tested this on several ways with lot of different files.  FFMPEG do provide information on duration with every file I tried.  It does not give this part of information WHEN is used 2>pipe/ffmpeg  switch (at least it isn't shown in cdrwbar log)  with every file I tried.  Why is this happen I do not know. I want to test this on my home machine, but have not enough time yet.  Probably someone else could try test this ?


Quote from: CDRWSel on 2009.07.16, 12:10:07
note: just replace ogginfo by ffmpeg and extract the duration, this one will be passed as default duration value for the current track if you prefer but why is ffmpeg sending you duration value when not converting file ?

Where ? Whole ogginfo: routine is missing ?

Quote from: CDRWSel on 2009.07.16, 12:10:07
( pleasen do a try outside of CE2MP3 (command line) using following example: ffmpeg -y -i "your_ogg_track" -ab 192k -ar 44100 -ac 2 "your_mp3_outtrack" 2>/pipe/ffmpeg  just after starting cdrwbar like:  cdrwbar affmpeg )  

in command line when I start cdrwbar using 'start cdrwbar affmpeg' and after that:
'ffmpeg -y -i "your_ogg_track" -ab 192k -ar 44100 -ac 2 "your_mp3_outtrack" 2>/pipe/ffmpeg' cdrwbar does not see anything, and ffmpeg give out like this
C:\Tools\M600\ce2mp3-cdrw>ffmpeg -y -i I:\vid\TestDir\HanyuShuipingKaoshi.o 9:35
FFmpeg version SVN-r18731, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/extras --enable-gpl --enable-libmp3lame --enable-libg
sm --enable-libfaad --enable-libfaac --prefix=/extras --enable-postproc --enable
-nonfree
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.28. 0 / 52.28. 0
  libavformat   52.32. 0 / 52.32. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on May  3 2009 14:55:37, gcc: 4.4.0
Input #0, ogg, from 'I:\vid\TestDir\HanyuShuipingKaoshi.ogg':
  Duration: 00:03:10.81, start: 0.000000, bitrate: 90 kb/s
    Stream #0.0: Audio: vorbis, 44100 Hz, mono, s16, 110 kb/s
Output #0, mp3, to 'asf.mp3':
    Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=    4473kB time=190.85 bitrate= 192.0kbits/s
video:0kB audio:4473kB global headers:0kB muxing overhead 0.000699%
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.17, 16:32:21
Hello Cyber,

ogginfo code was not missing but incorect routine was called due to typo error 'timextr' instead of 'timeextr'   ::)

I checked your program and mine small test code and found that the 'pause' you use gives problem.
I added a 'pause' into my code and then I didn't get datas from the pipe  (paused).
I would suggest to not use this 'pause' command which seems for me to impact any pipe process with unpredictable results.
I did a few ogg tracks from a CD-Audio and tried the ce2mp3 on the new created directory.
I added several changes and removed the 'pause' making problems in the code and I updated cdrwbar to accept a CLOSE command which may be issued by ce2mp3.
I included a few screencopy of the process (cdrwbar with ce2mp3 in the background) in the zip file about results after changes.
Now, I suggest you to stop any program using the 'pause' and use a bypass (loop + pull + syssleep...)
This update is fully tested with audio tracks as input as well as some video files on my system   ;)

Please do a try with audio tracks first (e.g. *.ogg)
I tested it on some avi, flv and ts files with correct results too.
Remy

PS: I added an option to disable use of cdrwbar (set the cdrwbar path to "") and one for disable send of extra duration time.

(see added file under next reply - CE2MP3_rd4.zip)
Title: Re: CE2mp3
Post by: cyber on 2009.07.18, 23:02:29
Huh...
I'v got
Sytax error
SAY "Ddosrc =" Ddosrc
Ddosrc = rxcreatenpipe('hpipe' /pipename,openomde,pipemode,instance_count,

can not see all.

Is it may dependent on some more dll's, not only rxu.dll ???

Anyone else ???
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.19, 12:25:35
...Hum strange !
May be only some functions from the dll were loaded and not those needed by the cdrwbar (this could happen with some programs only loading required functions and not dropping them at close time).
I added a dll check into this build. If required function aren't loaded, then I do a drop of the dll followed by a full load. I added a message in case the dll couldn't be loaded.
Hope this help.
Bye/2
Remy

ps: of course, general RexxUtil.dll is required too
Title: Re: CE2mp3
Post by: cyber on 2009.07.20, 16:49:55
RD4 is not working on both my computers, except that on eCSv2b4 do conversion without progres indicator move, and on W4 result with error without making conversion.
It aplyes for both CHK_Duration=1 and CHK_Duration=0

Question:
Is there more than one version of RexxUtil.dll and / or rxu.dll ?
Title: Re: CE2mp3
Post by: cyber on 2009.07.21, 12:52:44
Quote from: Batchheizer on 2009.07.14, 11:13:38
Quote from: cyber on 2009.07.14, 09:38:01
And if tagv2 exist and tagv1 does not, it will be just tagv2->tagv2 !
Is this OK ?
In the last case copy tagv2 to tagv1. Maybe they are cutted - but this is better than none ID3V1- because many OS2-porgrams can only read ID3V1 (minta; CW_Classes etc.).

There is to many combinations for v2->v1...module for tag reading, combinyng and writing is almost big as ce2mp3 without it  :)... for example title1 and title2 in v2 tag are set, and title in v1 tag is empty, but both titles from v2 are ahem... important... wich one to set as v1 tag.  Not to speak about comments.  ???  Anyway... mp3 module is in test phase.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.21, 23:03:16
Quote from: cyber on 2009.07.20, 16:49:55
RD4 is not working on both my computers, except that on eCSv2b4 do conversion without progres indicator move, and on W4 result with error without making conversion.
It aplyes for both CHK_Duration=1 and CHK_Duration=0

Question:
Is there more than one version of RexxUtil.dll and / or rxu.dll ?

Hi Cyber,
I don't understand what happens under your system !  did you run special programs or tools replacing original dll by different version ?. I just did a few test under 2 more different machine and ecs level and it was well too !
Stop all of your special tools and programs using pause in it because as I wrote, it has unpredictable result on pipe process.
If you didn't get a message about dll not loaded, then it was loaded but it could not proceed as expected due to other program disturbing the open pipe !! but, first, review all your dll path and remove all duplicate dll and unwanted dll's to prevent wrong dll loading.
rxu.dll :
2/05/96 22:11        199 012    221 a---  rxu.dll
rexxutil.dll :
6/09/00 12:42         68 119      0 a---  REXXUTIL.DLL

note: it is compatible with os/2 warp connect (W3), W4, W4.5 and eCS ....
Question : did you load special (open) object rexx dll's or modified/updated rexxutil version ? If yes, unload them.
Title: Re: CE2mp3
Post by: cyber on 2009.07.22, 11:54:49
Bug (feature?) found:

Call SysFileTree ARG(1)||v1ideost"\*", "files", "FO"
do i = 1 to files.0

does not work if v1ideost is directory contain spaces.

Call SysFileTree ARG(1)||"'"v1ideost"\*'", "files", "FO"
Call SysFileTree ARG(1)||'"'v1ideost'\*"', "files", "FO"

does not work too ?
suggestions ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.22, 15:06:03
Hi !
Did you see the screenshot I put into the last build, directory and files have blank characters in it and it works well here !
Can you provide a list of all dll's you have under os2/dll and ecs/dll
Check your config.sys dll path that these two paths are at first places in you paths list. If not, correct it and reboot.
Remy

note: when you will add "   ", you'll have to quote full path and not only the directory or filename.
e.g.   "c:\mymusic\classic concert\.*"   (this is ok while c:\mymusic\"classic concert"\.* isn't
other example:  '"'ARG(1)||v1ideost'\*"' 


   
Title: Re: CE2mp3
Post by: cyber on 2009.07.24, 09:41:31
Hmmm... there is more different ways of how You can execute something under OS/2 / eCS.

Problem in my case was using File Comander as shell; when You pass directory with path, using [ctrl] [f], FC pass argument if have spaces under quotes; for example ctrl F on c:\dir\d i r will result with 'ce2mp3 "c:\dir\d i r"'.  With quotes (") stream wont work here, and at the first not even trigger jump to procdir:  trying to treat "c:\dir\d i r" like file. Strip quotes from argument to stream can handle this and back 'em later before start ffmpeg cure problem. It just coincidence that I wasn't try dir with spaces till now.

   This is not case if You using GUI PMshell, or type manualy without quotes in command line. And this 'cure' do not affect those ways.

change at start where stream(v1ideost, C, 'query size')
------>8------>8------>8------>8------>8------>8
filebytes = 0
tagstr=d2C(34)           /* strip " from v1ideost */
v1ideost  = strip( v1ideost , l, tagstr) 
v1ideost  = strip( v1ideost , t, tagstr) 
filebytes = stream(v1ideost, C, 'query size') /* determine is it file or dir */
IF filebytes = 0 then call ProcDir  /* if dir jump to ProcDir else continue */
IF filebytes = "" then call ProcDir  /* some special cases not sure need anymore */
------>8------>8------>8------>8------>8

and add line to return quotes
------>8------>8------>8------>8------>8
v1ideost='"'v1ideost'"'
------>8------>8------>8------>8------>8
just before showing info about source file with
FFmpeg_pth" -i "v1ideost

--------------------------------------------------------
Looks like this changes handle all cases and works OK.

It is now become a usable tool, to prepare bunch of files for old mp3 player. :)
Title: Re: CE2mp3
Post by: cyber on 2009.07.24, 10:01:38
Quote from: CDRWSel on 2009.07.21, 23:03:16
I don't understand what happens under your system !  did you run special programs or tools replacing original dll by different version ?. I just did a few test under 2 more different machine and ecs level and it was well too !

I'm think not. This eCS v2 b4 is mostly 'fresh' install under Virtual PC at my office, and except installed OOo and PMview  almost used only for writing ce2mp3.  What I really not understand is why no one else can confirm working or not status. I'm not the only downloaded Your releases.

Quote from: CDRWSel on 2009.07.21, 23:03:16
Stop all of your special tools and programs using pause in it because as I wrote, it has unpredictable result on pipe process.
If you didn't get a message about dll not loaded, then it was loaded but it could not proceed as expected due to other program disturbing the open pipe !! but, first, review all your dll path and remove all duplicate dll and unwanted dll's to prevent wrong dll loading.
rxu.dll :
2/05/96 22:11        199 012    221 a---  rxu.dll
rexxutil.dll :
6/09/00 12:42         68 119      0 a---  REXXUTIL.DLL

note: it is compatible with os/2 warp connect (W3), W4, W4.5 and eCS ....
Question : did you load special (open) object rexx dll's or modified/updated rexxutil version ? If yes, unload them.

DLL's same on this machine, nothing modified/updated. Fresh boot and first thing is starting Your program. Nothing is different. Cemp3 and cdrwbar work normaly for both file/dir cases, it is only progress bar not travel from left to right.
If other (Batchheizer ?) happy with this version, I'm not care about progress bar, I'm building text version for me. :)
Title: Re: CE2mp3
Post by: cyber on 2009.07.24, 14:50:29
Who need port of Quake III to OS/2 when we can program in Rexx !  ;D

CE2MP3v8.zip - mp3 tag transfer to result files.   8)
4RDce2mp3tag.zip - tag module upgrade for CDRWSel
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.24, 20:54:42
Progress bar not "travelling" means that messages aren't incoming from pipe !   
I have vpc and will do one more test under a fresh installed eCs.
bye/2
Remy     
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.25, 01:45:16
Hi Cyber !
I could reproduce the problem you have but only under ecs in VPC (I only did the tests on ecs host systems - this was the missing info "VPC")
* first comment: messages are well received from open pipe
I will investigate why the progress bar isn't scrolling in this situation and tell you soon ....
Bye/   
Remy
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.25, 03:47:28
Hi Cyber,
Good news, I found the raison of this bug and I corrected it.
The raison:
under native OS/2 or eCS, the pipe returns the message into one line:
  Duration: 00:01:12.84, start: 0.000000, bitrate: 59 kb/s
but under VPC, only this usefull 'duration' message line is splitted into many lines !
  Duration:
  00:01:12.84,
  start:
  0.000000,
  ...
I was searching for the string "duration" and I took the time from the same line but under VPC, the time after duration is not set and the initial 0 default value is used due to missing information on the same line !
I added a code to add next line to current line if 'duration' is found after pos 2 (this si ok in any cases)
I changed the message in case of pipe could not be opened to a rxmessagebox with 'cancel' which closes cdrwbar now to prevent:
" Syntax error
  SAY "Ddosrc =" Ddosrc
  Ddosrc = rxcreatenpipe('hpipe' /pipename,openomde,pipemode,instance_count,"

Due to this strange result, I will now test my rexx under VPC too  ;)

Here is cdrwbar build to test.

PS: I'll review your latest update and put updated ce2mp3 with cdrwbar support online soon     
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.25, 17:30:08
Hi !
I updated ce2mp3 usable with cdrwbar
* you can disable cdrwbar if needed (change internal option)
* added latest cyber changes (with correction processing directories)
* added time stamp tag
* added option to use filename as title if no titletag exist
* added log files
* changed id3v2 writing tag to one run
* reviewed single track or directory routine to use same quoted rules
* Added support to convert mp3 files in the same path as destination path (new track is prefixed by "(new)"

** install rxu.dll from rxu1a.zip under .\ecs\dll or .\os2\dll **
** use ogginfo and id3v2 from previous pages **
** use previous cdrwbar_1.4.9.zip with this update **
** Enjoy and give feedback   ;)  **                       
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.26, 16:07:34
Hi Cyber, I updated ce2mp3 (usable with cdrwbar)

* corrected a wrong id3v1 date tag extraction on mp3 files
* added a very simple codepage converter to translate some specific french characters + " ' " (experimental) due to default id3 codepage versus OS/2 codepage (850 or other)
* ID3 write tag is no more called if ffmpeg fails.
* Corrected ID3 tag to respect mixed characters according original id3 tags ( changed pull xxx to parse pull xxx )
* Corrected ID3 tags from ogg tracks

Default title option (can be disabled) is to take track name if no Title tag exist
If no OGG comment tag exist, the playback time is added into this field.

cdrwbar: added support up to 32 ffmpeg returned "error" messages (not code problem..) before progress bar *aborts* (was one error = stop before)   
Progress bar is dark red after first received error message.
(e.g. of error : "out of space on disk" but it isn't wrote like this in ffmpeg!)

Title: Re: CE2mp3
Post by: cyber on 2009.07.27, 11:37:30
Just simple: IT KICK ASS ! :)  I need yet to check on other machine (real one W4) when I find free time.

* corrected a wrong id3v1 date tag extraction on mp3 files
What ?  Where ?

This is way beyond my understanding... why can Virtual machine act different than real one. Shouldn't be same ?
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.27, 17:38:27
why can Virtual machine act different than real one. Shouldn't be same ?
This is a good question and I have no answer (buffer size or control character issue or something else impacting pipe process only ! I was surprised to see these specific datas received through the pipe be splited on more than one line when under VPC)

For the second question, just wait until I return home, thanks
Remy 
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.27, 20:41:01
Here is the answer:

The change I did because I've got mp3 files with following value set for the datetag: " , G"
This happened for mp3 files without year value e.g.
Title  : Cool                            Artist:
Album  :                                 Year:    , Genre: Unknown (255)
Comment:  0                              Track: 0

After add of verification code, it is ok.   

malbumextr:
albumtag = SUBSTR(tagpart,pos("Album  :",tagpart,1)+9)
albumtag = LEFT(strip(albumtag), 32)

datetag = SUBSTR(tagpart,pos("Year:",tagpart,1)+5)
If pos(',',datetag)>1 then datetag = SUBSTR(datetag,1,pos(',',datetag)-1)
datetag = LEFT(strip(datetag), 4)

Bye/2
Remy


Title: Re: CE2mp3
Post by: cyber on 2009.07.28, 09:51:19
I was tested mp3 without any tag data, and I think that was OK.  Nevermind, I really like how CE2MP3RD work now. Also, interested in Mr. Batchheizer reaction, will german umlauts work without problems.

Also I'm adopted current RD version (10?) for future modification.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.28, 11:50:13
Happy to hear it works ok for you too now and of course, will german umlauts work without problems ?
(If they have problems, just repeat code used for codepage translation and convert special characters into non accent character).
From a very good idea and commun development action, this tool is going to be a must for all ;D
Title: Re: CE2mp3
Post by: cyber on 2009.07.28, 12:51:34
Quote from: CDRWSel on 2009.07.28, 11:50:13
Happy to hear it works ok for you too now and of course, will german umlauts work without problems ?
(If they have problems, just repeat code used for codepage translation and convert special characters into non accent character).

Serbian latin characters from codepage 1250/1252 (čćžšđ) copy to new mp3 fine.

Quote from: CDRWSel on 2009.07.28, 11:50:13
From a very good idea and commun development action, this tool is going to be a must for all ;D

Nooo... Mensys should include this in 2.0, so noone can say there is nothing new and good in new release.  ;D  ;D  ;D
Title: Re: CE2mp3
Post by: cyber on 2009.07.28, 14:36:54
Track:
Changed filebytes show on start - this is leftover of my testing, so now show file size.
Added OldSchool mode, You can enter [44100 128] in single line, in this case mapping will be skiped.
8)
Title: Re: CE2mp3
Post by: Batchheizer on 2009.07.31, 18:11:26
Back from vacation, I found you both making great progress in CE2MP3. Current versions works fine. Progress-window is nice.
Can you improve this window, so that no input in text-window is necessary?

A second menu-item "Options" could help:

Options
-Samplerate
   + 44100
   + xyz
-Bitrate
   +384
   +192
   +128
   +96
   +xyz
-map
   +xyz
-Autostart convertion (X)
-Exit after conversion (X)
-Delete source-file after conversion
+Only WAV (X)
+All files

If you could catch "size= ..." from FFMPEG the user will see progress on a single file.
IMHO starting time of conversion is less usefull for a user than progress the current conversion.

A "Pause/Resume"-Button could be usefull for conversions of many files.

Thank you both for your work on CE2MP3.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.07.31, 19:01:35
Hi Batchheizer,
Of course I can include all into cdrwbar but cdrwbar is usable by dvddao, ffmpeg and cdrwsel too.

Including all code in it may be easy to do and Cyber needs drdialog to work on the source
Hi cyber, are you interested working on drdialog ?
I'll try a test build (specially for this use) and put it online soon.

Bye/2 
Remy   
Title: Re: CE2mp3
Post by: cyber on 2009.08.03, 01:09:44
Hi,
I am interested, but having health problems right now, I am not sure how much can contribute in near future.
Title: Re: CE2mp3
Post by: CDRWSel on 2009.08.05, 16:02:26
Hi,
I'm currently testing eCS silver and I just received an email from my dearler that my new motherboard and i7 are posted and I should receive them very quickly. I'll take a short time just before the migration to build a full GUI draft release.
Bye/2
Remy
Title: Re: CE2mp3
Post by: cyber on 2009.09.02, 10:54:06
Quote from: CDRWSel on 2009.08.05, 16:02:26
Hi,
I'm currently testing eCS silver and I just received an email from my dearler that my new motherboard and i7 are posted and I should receive them very quickly. I'll take a short time just before the migration to build a full GUI draft release.

No progress till I was offline ?  :D
Title: Re: CE2mp3
Post by: CDRWSel on 2009.11.25, 21:52:44
Hi, sorry but eCS V2 RC7 is not working for me (video bug) and no solution is available yet :(
I created an other waited GUI which is ClamAVGUI for eCS (GUI for the ported anti viral tool ClamAV)
For those interested to try the GUI, please send me a request using email address under nominated product for 2009 e-ball award.
( http://fr.ecomstation.ru/projects/awards/?action=nominations )

Next days I'm busy but as soon as possible, I'll take my saved datas and work on it to build the full GUI ;)

cheers/2
Remy

   
Title: Re: CE2mp3
Post by: Saijin_Naib on 2009.11.25, 22:08:15
Very nice :)

I saw that ClamAV has a GUI now.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.19, 03:59:02
Hi!

Just a up on this topic.
I wrote several times ago I'm going to do a GUI.
I worked on it and found that it would be nice to do the same as ce2mp3 does but add the possibility to expand supported audio files type as output and write metadatas to them from the source or from user defiened metadatas.
This makes a lot of work. But why to stop at this point ?
(Many parts works well and others have to be finished. I included a video option (not operationnal yet and planed to have pad/cropb, start/end sequence option ...) this one will be disabled until audio is fully ok)
Well, I think been not far from a first test build (convertion, idtags and metadatas are ok...)
I have to end the log part + pipe for % progression bar (I hope to have enough free time to work on it quickly)  

I added mp3info for id3v1tool due id3v2 doesn't well add ID3V1 tags and it crashes as soon I try to add TRCK or track number tag.

Here a few screenshots of the GUI.
What do you think about ?

@Cyber
Can you please provide an email@ for a draft ?  

Title: Re: CE2mp3
Post by: RobertM on 2010.05.19, 04:25:57
Very awesome!!!
Title: Re: CE2mp3
Post by: cyber on 2010.05.19, 12:05:45
This is just overkill !  Thank You very much CDRWSel.

My opinion, as I often use other OS'es (linux'N'win), is that they now can only be envy.  8)

> cyber at nscable dot net <
Title: Re: CE2mp3
Post by: Batchheizer on 2010.05.19, 15:40:24
Looks very fine.

If Paul has no time to check the error in ID3V2 try to contact another developer for this small program.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.19, 22:11:56
Alpha build with limited function sent to Cyber... Waiting news from him.
Title: Re: CE2mp3
Post by: cyber on 2010.05.21, 00:24:18
I'm a VIP person now !  8)
Title: Re: CE2mp3
Post by: cyber on 2010.05.21, 23:03:44
And a five stars Senior Member ?

8)   8)   8)   8)   8)
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.22, 01:30:45
Hi Cyber !
How did you to have your latest post with a date/time before the previous one ?
Title: Re: CE2mp3
Post by: sXwamp on 2010.05.22, 04:38:15
Quote from: CDRWSel on 2010.05.22, 01:30:45
Hi Cyber !
How did you to have your latest post with a date/time before the previous one ?

I'm pretty sure, "Reply #109 on: 2010.05.21, 00:24:18 »"  -- is 24 minutes past midnight.

And

                         "Reply #110 on: 2010.05.21, 23:03:44 »"  --  is 11:03pm at night, 23 hours later on the same day.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.22, 08:04:29
Yes you are right....  ::)  I have to change my glasses!    ;D
Title: Re: CE2mp3
Post by: cyber on 2010.05.22, 15:03:39
CDRWSel, You was workin to hard on new release of ce2mp3.  ;)

Anyway, leatle teaser:

Prerelease has not yet have build all options, but audio out paramethars can be changed, and it is stable, and work great !  Thank You CDRWSel !!!   :D
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.24, 05:35:56
Hi!

Now, I tried enabling the pipe function (rxu.dll required) which wasn't under previous build and using already tested code.

Here is an alpha build (with pipe) with surely some bugs !
Before previous build, it has:
- a STOP button !
- File in process is selected into the process list
- single file progress bar increment too (if a valid file duration is found or youi'll have to wait the time of the process)
- maps: enabled (default use first available audio stream but user can set other steam value after using "show description" from RMB on selected file
- processing list can have mixed audio files and/or directories and/or video files !
- etc...
- file to video conversion is disabled due to not mutch work done on it know

already exit:
- set user parameters (use user entry)
- define a private profile (from user entry)
etc...  


If some of you are interested to test it and give feedback !

Cheers/2

download link:
http // remydodin.levillage. org/ outils/ FFMPEGCA_ S-0_5_0.wpi  (remove any blanks and add the first ':')
This is a small WPI without all required additonnal package. For a full package with all required packages available on hobbes and added as is in they originally full archive version, you can use the same link + remove '_S' from the name

Updated 'S' package to 0.5.1
"FFMPEG_S-0_5_1.wpi"

0.5.1 - Added option to auto create sub directories under target directory using last sub-dir from input directory (not for files)
     - minor cosmetic changes...
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.27, 11:22:04
First impression from those having tested it ?
Suggestions on current working part ?

Cheers/2
Remy
Title: Re: CE2mp3
Post by: cyber on 2010.05.27, 11:55:45
I have suggestion; I believe that is possible without to many trouble to got info about size of output files direct in CE2MP3 GUI, it may be useful for situation where preparing tracks for external audio devices, which always are limited by space (256Mb, 512Mb, 1Gb,...), and CE2MP3 GUI is just like made-for-this purpose.   ;)
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.27, 14:54:26
Hi Cyber,

I think it should be possible to do it.
Take original file duration (if present) or file size with the corresponding bitrate and calculate output size with the selected new bitrate...
I have to think about how to do it to have it usefull !     
Title: Re: CE2mp3
Post by: abwillis on 2010.05.27, 16:35:18
I have been trying to change the bitrate/sample rate of an mp3 and keep getting an error (tried posting before but os2world timed out on me):
SAY "  1308 +++                           pct ="   1308 +++                           pct
REX0041: Error 41 running E:\PROGRAMS\FFMPEGCA\FFMPEGCA.EXE, line 1308: Bad arithmetic conversion

The error comes up almost immediately.  I have tried a couple of mp3 files but they are all between 20M and 30M.  I've tried changing to various bit and sample rates.  ffmpeg runs for a bit at 99% CPU but only about 25% of the file is converted.  When this happens the cmd script that launches ffmpeg doesn't close and often becomes unclosable but not trying to close it never results in more work being done.

All of the ID3 tags even come across except the comment field.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.27, 17:58:12
Thanks,

Strange having pct (used to change progress bar by %) at blank !
It looks like the pipe was broken from ffmpeg.
What kind of bitrate did you specify ? or give me all parameters you used and I'll check it
which version of FFMPEG do you use ?

You can send me an email using the address given into the readme.  

Cheers/2
Remy
Title: Re: CE2mp3
Post by: cyber on 2010.05.27, 20:31:05
Quote from: abwillis on 2010.05.27, 16:35:18
The error comes up almost immediately.  I have tried a couple of mp3 files but they are all between 20M and 30M.  I've tried changing to various bit and sample rates.  ffmpeg runs for a bit at 99% CPU but only about 25% of the file i

Wich version of ffmpeg is started for conversion ?  There was change in paramethars some time ago, from kbps to bps or vice verse. :)
Title: Re: CE2mp3
Post by: cyber on 2010.05.27, 20:36:04
Quote from: CDRWSel on 2010.05.27, 14:54:26
Hi Cyber,

I think it should be possible to do it.
Take original file duration (if present) or file size with the corresponding bitrate and calculate output size with the selected new bitrate...
I have to think about how to do it to have it usefull !     

I wasn't mean to project future size of new mp3 files, altough this will be more useful, I mean just to calculate how right now is 'output dir' size. :)
Also, I don't believe is possible to correct calculate how big will be new mp3, specialy if vbr and joint stereo is used.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.27, 23:20:18
Updated to V 0.5.2
same sever and change file name to   FFMPEGCA_S-0_5_2.wpi  


0.5.2 - Corrected a possible loop after a full conversion process followed by a new run with unmarked files due to [GO] not disable on 0 marked file
     - corrected missing pct setting under some pipe returned message condition
     - added display of target folder size (no sub-directories) or if (md) on one level is enabled, size = target directory size + one level sub-directory size
     - + some other corrections...

Tell me if it is better...  

Cheers/2
Remy      
Title: Re: CE2mp3
Post by: cyber on 2010.05.27, 23:58:18
Worse ? Not working no metter what chose.  >:(

Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.28, 00:09:16
Hi cyber,

What did you to get this error !

pct only can be a numeric value (verification is done)
Vrun_time only can be numeric and above "0" !
I do not understand except if something whent wrong during the build. Please, download it again... (build done again)


Cheers/2
Remy
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.28, 00:33:03
I've got the error...
debugging now...
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.28, 02:43:01
I did a few changes because I saw that "DURATION:" wasn't recognize at unpredictable time!
I added a few other changes.

I could convert above 100 files.
May be you can do  try of this build.
http // remydodin.levillage. org/ outils/ FFMPEGCA_ S-0_5_3.wpi  (remove any blanks and add the first ':')
   
Cheers/2
Remy
Title: Re: CE2mp3
Post by: cyber on 2010.05.28, 09:34:55
Quote from: CDRWSel on 2010.05.28, 00:09:16
Hi cyber,
What did you to get this error !

Using few predefined values for mp3 output all lead to this same error. But not sure is this only problem, now FFMPEG CLI window stuck, and I can not kill it. Reboot is needed, and I can not reboot just anytime.  :-\
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.28, 15:13:04
Quote from: cyber on 2010.05.28, 09:34:55

Using few predefined values for mp3 output all lead to this same error. But not sure is this only problem, now FFMPEG CLI window stuck, and I can not kill it. Reboot is needed, and I can not reboot just anytime.  :-\

Have a look into your temp directory. You should find a FCAxxxxx.cmd file. Try to kill it if it is running
(this CMD is used to run ffmpeg with pipe). In case of no respond from ffmpeg, always use the stop button to close the pipe. May be I can go through this routine at FFMPEGCA close time too...  ::)

What about v0.5.3 ? (the pipe name changes at each run using time in second as part of the name)

   
Title: Re: CE2mp3
Post by: abwillis on 2010.05.28, 23:53:00
Starting with 0.5.2 I am getting:
SAY "  1362 *-* dir2test1 ="   1362 *-* dir2test1
   306 *-* Call _display_target_size_
REX0093E: Error 93 running E:\PROGRAMS\FFMPEGCA\FFMPEGCA.EXE line 1362:  Incorrect call to method
REX0452E: Error 93.924:  Incorrect position argument specified; found "-1"

I was using Classic Rexx so switched to Object Rexx with no change.  I also deleted the ce2mp3.ini file with no difference.  I then downloaded 0.5.3 and it still errors.
The program launches briefly, just long enough to see the gui and then it errors.
Title: Re: CE2mp3
Post by: abwillis on 2010.05.29, 00:06:25
OK, I was able to get rid of the error.  Initially I backleveled to 0.5.0 and it worked fine.  I set my paths to all the exe files and then ran 0.5.3.  It failed again.  I then opened the ini file and first found that none of the exe extensions had the trailing e (e.g. ffmpeg.ex ).  I added the e at the end but it didn't help.  I then saw that the output was set to < output path  (or whatever the default was for before it was set).  I then added the path I wanted in there and now it launches fine.
Title: Re: CE2mp3
Post by: abwillis on 2010.05.29, 00:14:36
OK, now I have made a successful conversion as well... very nice.  Even kept the comments that I wasn't seeing before.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.29, 01:58:03
Quote from: abwillis on 2010.05.29, 00:06:25
OK, I was able to get rid of the error.  Initially I backleveled to 0.5.0 and it worked fine.  I set my paths to all the exe files and then ran 0.5.3.  It failed again.  I then opened the ini file and first found that none of the exe extensions had the trailing e (e.g. ffmpeg.ex ).  I added the e at the end but it didn't help.  I then saw that the output was set to < output path  (or whatever the default was for before it was set).  I then added the path I wanted in there and now it launches fine.

Ok, I see and is in the added part to show target directory size (I'll correct this)
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.29, 02:24:43
Ok, latest reported problem sould be ok too.  

0.5.4 - Corrected target size calculation to not caculate target size if target name didn't look like a valid path
     - Changed ini file name from ce2mp3g.ini to FFMPEGCA.INI (do not forget renaming older ini file to get all parameters back ( ini file is under ..\OS2 )

http // remydodin.levillage. org/ outils/ FFMPEGCA_ S-0_5_4.wpi  (remove any blanks and add the first ':')


A few tips:
- To add a directory under which you have audio and/or video files, click on dir icon and select the directory from internat filemanager (click on ok to add it into the list of files to be converted. Once the latest directory was added, close the filemanager.
- To add audio/video file, click on the file icon and select files from under a directory to be added into the list of files to be converted (you can drag/drop files into the list or click on ok like for directories). Files can be sorted into the internal filemanager)
- files/directories to be converted are all "Marked". You can select a file to check its information (ffmpeg datas) or unmark it to not process it or delete it from the list...

Most video files have less metadatas. Before converting files (not directories), you can select a file and click on "edit tags". Then update fileds from left side to add metadats into the converted file. Click on "prepare metadatas" and these metadatas are saved for the selected file. Proceed to the next file if needed...
During convertion time, found "prepared metadatas" are copied into the converted file.

At end of process, you can view logs and check if all was correct. You'll find ffmpeg result (rc are from ffmpeg or from ffmpegca according errors received through the pipe). Metadatas/id2 tags rc are loged too.

If you converting a video file with more than 1 audio file, if maps is set to default, first audio track is copied. To select a different audio track, clcik on the file in the list + RMB and check the "ffmpeg file information". If the desired audio track is referenced as #0.3, select #0.3 into the maps option.

If your ausio files are organised under an album title named directory, you can enable (md) 'sub' for directory target. This will create a sub-dir under your defined target directory using the directory name of the source file...

Some option aren't enabled but it is under progress...
Cheers/2     


Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.30, 21:37:00
New build (beta)

0.6.0 - Enabled [advanced] option for audio convertion
       . select part of file to be converted (use of start cut and duration until end of cut)
         Note: enable cut will enable it for all files (setting "start first image" and "duration" + "same all" unchecked disables cut process for the file at run time)    
       . Select a same part time of file to be convert for all files (including files under directories)
         e.g create 10s samples from all files.
       . Overwrite Main(Default) -map setting using one or more -map out of all existing audio stream      
     - Disabled Metadata settings on directories (has no sense)
     - Open WPS directories from directories listed into the conversion list (use enter or click 2 times)
     - Added output stream mapping result into logs
     - Added a flag '*' in front of any ID tags usable for metadata.
     - Disabled DRREXX window to appear in case of unpredictable error.    
     - Corrected some other errors (e.g. corrected stream extracted information from specific stream description)
     note: Help not avalable yet...  

Link:
http // remydodin.levillage. org/ outils/ FFMPEGCA_ S-0_6_0.wpi  (remove any blanks and add the first ':')
To get all required files too, take the full 0.5.0 package first before upgrade.

Cheers/2
Remy
Title: Re: CE2mp3
Post by: cyber on 2010.05.31, 11:39:10
Grrrr.  :-\

Description: Can't connect to the server.
Server: remydodin.levillage.org:80
Additional info: Error code: 10061
Title: Re: CE2mp3
Post by: CDRWSel on 2010.05.31, 12:07:30
 :-\  link works again, use following link.
I just updated my following web page to add the latest build:
http://remydodin.levillage.org/ffmpgca.html

Are you interested by main windows resizing ?
Title: Re: CE2mp3
Post by: abwillis on 2010.06.04, 16:32:26
Haven't had a chance to report... 0.6.1 has worked very well.  The only thing I have noticed is that when the ID3 tags are moved it is hit or miss whether "Track" is brought over.  The same file will one time move it and the next it won't.  Everything else seems to come over, the comment is odd in that for the id3v1 is initially blank on these and a time is added to it which causes different comments to show depending on with what I use to view the tags but seems to be consistent.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.04, 17:36:09
Quote from: abwillis on 2010.06.04, 16:32:26
Haven't had a chance to report... 0.6.1 has worked very well.  The only thing I have noticed is that when the ID3 tags are moved it is hit or miss whether "Track" is brought over.  The same file will one time move it and the next it won't.  Everything else seems to come over, the comment is odd in that for the id3v1 is initially blank on these and a time is added to it which causes different comments to show depending on with what I use to view the tags but seems to be consistent.

Please, send me the logs from a situation + ID3 tags window screenshot.
Then, issue a "ffmpeg -i "your input file" and send me the result.
You can use my email address which is now enabled unde "Contact" on my web link or from the readme file.

cheers/2
Remy


Some news about futur 0.7.0:
- Option to call an external player (usefull to determine cut point) - after some test between Mplayer and KMplayer, preference goes for KMP (tests on video show smooth movie result - needed for futur video development part)
Any suggestion or comment about player to use ?

About video, I did a test creating an OGV file and an html file using HTML5 (ogv) web player.
Result was great.       
     
Title: Re: CE2mp3
Post by: abwillis on 2010.06.06, 04:05:21
Ok, I've sent the log, screenshots and then a second email where I found that whether "Copy OGG2MP3 tags" is selected seems to determine whether Track or Comments is brought over and that "Use Filename as possible Title" causes the time to be put into the comment field (ID3V1). 
A third email sent had the information from ffmpeg -i as OS2World was down again when I was initially sending so I forgot that piece.  And a 4th email when I realized I had forgotten the logs in the second email when it "Copy OGG2MP3 tags" is unchecked.
The comment field missing is more easily handled for my uses as qoobar will allow me to add it back to everything in a directory at one time and in this case it is essentially always the same.  However, it would be nice if the ID3V2 information could be copied to the ID3V1 fields so that they show up in the WPS.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.06, 11:17:06
Hi Andy!
I didn't get the screenshots not the logs. It looks like somethiong got wrong with attached files. Please, do a try to send them from your mailbox using my email address.
I read other emails and comments. Thank having send them.
A few explananation and may be I have to change how I update ID3 tags.
- If input file has ID3V1 tags, there are copied into ID3V2 too (not removed from ID3V1)
- If input file has only ID3V2 tags and some empty fields exist into "matadatas" or with try to use title... I use these information to update empty fields
- When allways is ok, you may have ID3V1 + ID3V2 tags in output file. May be you have more than one comment fileds into ID3V2 each comment field has an additional flag telling from where it comes. It could be from ID3V1 copied inot ID3V2 or from FFMPEGCA added entry. Issue ID3V2 -l "your converted file" and check COMM entries... How many COMM entries do you have and can you please put them here. Thanks

It seems a error could occur in some cases. I'll review my code and add an option to disable adding ID3V1 if these should not be written...

Thanks for feedback which is always very important to have the best program result.
Cheers
Remy     
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.06, 22:22:53
I worked more on FFMPEGCA and review ID3 tags process. Try now this new build with following additon and corrections:

0.6.9
- Added Kmplayer and/or Mplayer support to play files (KMP prefered)
 * Once it is configured, click 2 times (enter) on the selected file from the into the list *

- Added option to disable ID3V1 writing tags
- Added Main window min/max button
- Added external option to fully disable adding track time into COMM tag if comment doesn't exist (FFMPEGCA --dct  or --ect to enable again)  
- Corrected possible bug setting ID3 Comment field
- Corrected possible title set to use ID3V1 is ID3V2 seems not to strange!
- modified read of MP3 IDTAGS routine
- Enabled [View] - [Video]
- Futur Video function displaied but not enabled yet (see futur profiles + functions under [advanced]
  note: changing first frame or last frame time using hh:mm:ss needs to lost focus to have the corresponding picture displaied (info message available)  
- Corrected an error handling (found on mp3 input file) adding a RC2 with writting id tags enabled (message added into logs)
- other minor error and text corrected...

File is available on my web page: http://remydodin.levillage.org/ffmpgca.html (http://remydodin.levillage.org/ffmpgca.html)

Cheers/2
Remy
Title: Re: CE2mp3
Post by: abwillis on 2010.06.07, 01:41:54
The --dct has indeed stopped the time from being added to the comment section.  But I can't tell any other changes with regard to ID3 tags.  I've tried both "Add both mp3 ID3V1 and ID3V2" both checked and unchecked and don't see any difference.  But I have partly determined what is happening.
When "Copy OGG3MP3 tags" is checked then ID3 tags are copied over, when it is not then only metadata is moved over.  This is why the comment field is not moved over. For ID3V2 the Comment field is not metadata (but is for ID3V1 - very odd decision making they did there).  Track is metadata so it is moved over. 
Now, for some reason, when "Copy OGG2MP3 tags" is checked and the ID3 info is moved over it to my best guess is then wiping the metadata out (can't determine how).  If I use ID3V2 to try to copy the Track info into the MP3 then it gives a libc panic and doesn't do anything but still a return code 0 is given which would account for:
--TRCK " 01" (RC:0) "note: id3v2 may fails with rc99 for this option"
I see now what is happening.  Once id3v2 runs successfully (such as for the comment field) it apparently wipes the metadata.  Because all the metadata is being added back in via the tags this is really not a problem, except that because track causes a libc-panic it is lost when "Copy OGG2MP3 tags" is selected. 
I had not expected ID3V2 to wipe the existing metadata so had thought because the metadata was being added with ffmpeg that Track should have been there despite the problem with id3v2.exe. 
I have been trying to build a newer id3v2 but haven't been successful yet but maybe that will help.  I know there was a bug opened for the issue on Smedley's bug tracker too. 
At this point it looks like your code is fine, it is the toolchain that hopefully will be correctable.
Thanks,
Andy
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.07, 09:20:27
Hi Andy,

What I do:

1/ I read metadata using ffmpeg and preset corresponding ID3 tags (because ID3V2 doesn't read metadata).
You have metadata in many kinds of file type. If a COMM metadata is found, it is taken. With --ect, I set COMM to the track duration if this one doesn't exist  
2/ When ogg2mp3 is set (only for OGG), I read OGG tags using ogg tools and correct initial tag settings if needed. Of course, like other parameters, if the COMM field exist, I change it
3/ If the file is a MP3, I read then the corresponding ID3 tags (v1 and v2 if they exist) and overwrite previos set tags with the corresponding tags.
At conversion time, I copy metadatas with the ffmpeg command and as final step, I set mp3 tags using mp3info (for V1 tags) and ID3V2 for V2 tags (with both ID3v1 +° ID3v2 set, I convert written ID3v1 to ID3v2 first before writing ID3v2 - This will add a special comment entry with a [XXX] which indicates it is comming from ID3v1 migration
 
According your selection:
If Adding both IDtag isn't set, ID3 v1 tags are all disabled/removed but some V1 found information corresponding to equal ID3 v2 parameter could be taken if the corresponding ID3 v2 is blank into the source file.

There is no raison to miss some information. At least, result should be exhaustive with found information.
ID3V2 supports more than one COMM entry and if more than one COMM (comment exist, there are all added into the final MP3 file. Run ffmpeg -i "your outfile" and read each entry and then, run ID3V2 -l "your outfile" (-L in lower case) and see how many comments entry exist. I often have 2 different comments entries and each one has an identifier about it's source (with ID3v1 + ID3v2 set, You may have 2 entries and one of them has [xxx] and the second is the one added by ID3V2). Is you tool able to read all ID3V2 comments entries or only one of them ?

ID2V2 goes into panic when you set the --track which always returns rc99 and sometimes rc0! This is why I added a comment into my logs but only this tag goes into error (one write per tag). I left the paramater which has no impact on my system in case ID3V2 will be corrected into a next build!. With V1 tags enabled, TRACK is correctly set. This is why I use this utility too.
If this error is the source of lost of metadatas ! I can make FFMPEGCA disable this option for the current ID3V2 build only. Would it be helpfull ?  

Now,after this long explanation, If something is wrong in the way I add/update MP3 ID tags, please tell it me and I try to correct it.
To resume: (ffmpeg metadata -> existing V1 overwrites same ffmpeg metadata and creates V2 entries -> V2 overwrites same ffmpeg metadata and V2 entries created by V1 step. At ID write time: ffmpeg write metatada - (Write V1 + migrate V1 to V2 if enabled) + write V2 tags whish overwrites existing ID3v2)  

note: I'll check if the delete ID3 V1 tags from ID3V2 is deleting ID3 v1 only or metadatas too !
       (when no ID3 v1 have to be written, I do a delete V1)

Could you test the edit ID tags option ?
* To update ID tags, add the mp3 file to have its ID tags changeds into the list. Select it and click on edit tags.
* Change fields as desired and validate.

The "prepare" option is usable on any files into the list allow you to review existing metadatas, change them and then, these metadatas set as "prepared" for the selected file and are then written into the converted file instead of original metadatas (operation can be done on all files into the list before the conversion. Prepared Metadatas are indexed to correspond to file into the list) 

Cheers/2
Remy
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.07, 22:08:47
Ok, using ID3V2 --delete-v1 or --delete-v2 deletes all metadatas too !

I updated FFMPEGCA to 0.7.0 as follow:
  0.7.0 - Added external parameter to fully disable "unwanted id3 tags"
        > FFMPEGCA --ed3 (Enable Delete ID3 tags) or --dd3 (Disable Delete ID3 tags)

Default is as before that is : "delete unwanted ID3 tags"
You can issue --dd3 one time which will always disable this option and no more delete written metadatas at ffmpeg process time.

Cheers/2
Remy   
Title: Re: CE2mp3
Post by: abwillis on 2010.06.08, 02:16:23
I have built a new id3v2 which allows me to change track (haven't done anymore testing than that so far).
I have sent it via email.
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.08, 03:36:20
I did more test since last build and saw some strange issue with ID3V2 and ffmpeg.
When copying input file metadata to ouptput files, metadatas looks like ID3V2 tags but aren't
one entry which is comment isn't converted into COMM.
Now, ID3V2 erases some entries ex: TSSE which is strange
I changed some part of my code to well take the TSSE and have the input comment field well tranlates into COMM after ffmpeg convesion....
I'll have a look on you id3v2 build and comme back soon...

Cheers/2
Remy       
     
Title: Re: CE2mp3
Post by: abwillis on 2010.06.08, 05:11:09
From the logs:
--TRCK " 01"
can the space be removed? as:
--TRCK "01"
With my id3v2 the space does stop pm123 and id3v2  from seeing the track number as is but qoobar does not.  Removing the space allows it to be seen by pm123, id3v2 and qoobar. 
Title: Re: CE2mp3
Post by: CDRWSel on 2010.06.08, 07:52:23
Hi Andy,

Well done with your ID3V2 build   ;)
I reworked part of the code to use this build nad I could remove some routine I added to bypass some options which didn't well work into older ID3V2.

I emailed you the link to my web server to get the 0.7.1 build for deeper test before I put it online for every body.
Read all changes I made in it and new adds. As soon you think it is ok, I'll put it available with your id3v2 as requirement for best results.     
The extra blank should be ok too.

Thanks
Cheers/2
Remy     
Title: Re: CE2mp3
Post by: abwillis on 2010.06.09, 17:38:35
Remy is unable to post to this thread currently (grey screen issue that often occurs). 
http://remydodin.levillage.org/ffmpgca.html
There is a 0.7.1 that is working very well.  It is recommended to use the new ID3V2 as it fixes several issues:
http://hobbes.nmsu.edu/h-search.php?key=id3v2-0.1.12-os2.zip&pushbutton=Search
Please look at the changelog:
http://remydodin.levillage.org/ffmpegchg.html