VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
+ Reply to Thread
Results 1 to 30 of 30
Thread
  1. I've tried at least a dozen different solutions and none seem to fit my needs:
    1) can handle "Latin" characters in tags (e.g., inverted question marks, ellipses)
    2) doesn't lose or truncate tags (e.g., podcast URL, podcast description, podcast category)
    3) can convert to a constant bit rate of 32kbps @ 44.1K Hz.

    conversions I need are from .wav, .mp4 and .m4a to .mp3 (simple huh?)

    drag and drop gui would be nice but not necessary

    Please limit responses to recommendations on software packages.

    Thx

    ps I currently use dBpoweramp, but it fails on item #2 and doesn't not have drag & drop
    Quote Quote  
  2. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Have you already tried Foobar2000

    1) can handle "Latin" characters in tags (e.g., inverted question marks, ellipses)
    fb2k handles Unicode fine.

    2) doesn't lose or truncate tags (e.g., podcast URL, podcast description, podcast category)
    I haven't checked that yet

    3) can convert to a constant bit rate of 32kbps @ 44.1K Hz.
    You meant 320kbps, I presume Foobar2000 can be configured to use external encoders (in this case, LAME) with the required command-line switches.
    Quote Quote  
  3. Member
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Or you can try LameXP but I am not sure about point 2 too.

    Bernix
    Quote Quote  
  4. ffmpeg should be able to do this things correctly however 32kbps looks like too low bitrate for mp3 (maybe mono and reduced bandwidth can be ok) - bellow example script - not tested but it should work

    Code:
    @setlocal
    @set OUTDIR="out"
    @if not exist %cd%\%OUTDIR% (mkdir %cd%\%OUTDIR%)
    @ffmpeg -i %1 -vn -c:a libmp3lame -b:a 32k -ac 1 -af "aformat=sample_fmts=flt,highpass=f=20,aresample=resampler=soxr:osr=44100:dither_method=0,lowpass=f=6000" "%OUTDIR%\%~n1.mp3"
    Quote Quote  
  5. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    I also hope you meant 320K instead of 32K ... not only do I not know of any that go that low it'd be only suitable for speech recorded with lousy microphones.
    Quote Quote  
  6. none of the above suggestions meet all the requirements (foobar, lamexp, ffmpg<-fails 2nd & 3rd criteria). I don't recall the specifics on foobar & lamexp, but they too failed.

    i do mean 32, thirty two, trenta y dos kbps ... i listen to podcasts (10 years now) and that level of quality is just fine. constant bit rate is an artifact of the ipod software i use (rockbox) which didn't like vbr for a couple of its functions.
    Quote Quote  
  7. Originally Posted by rkovideo View Post
    none of the above suggestions meet all the requirements (foobar, lamexp, ffmpg<-fails 2nd & 3rd criteria). I don't recall the specifics on foobar & lamexp, but they too failed.

    i do mean 32, thirty two, trenta y dos kbps ... i listen to podcasts (10 years now) and that level of quality is just fine. constant bit rate is an artifact of the ipod software i use (rockbox) which didn't like vbr for a couple of its functions.
    ffmpeg not failing on 32kbps CBR - i've tested my script with various inputs (even multichannel 88kHz, True HD etc)...
    about metadata - from my perspective all metadata are copied correctly if container can carry tag - tested on large set of files with some strange meta and IMHO it works quite well.

    Quality from my perspective is OK for speech but for music is less than acceptable - plenty issues with smearing even with usable bandwidth reduced to 150 - 5500Hz...
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    32kbps is too low a bitrate for decent quality music, whether mp3, mp4/aac, ogg, even opus. 32kbps should be doable with Mpeg 2-Layer 3 (vs. Mpeg 1-Layer 3), but you should expect shitty quality unless encoding speech.

    Scott
    Quote Quote  
  9. ffmpeg encodes 32kbps @ 44.1K Hz?

    i tried various times from mp4 to mp3 and always had to crank down the -ar to 11025, otherwise -ab 32k was overridden ... please let me know the release of ffmpeg you used to successfully convert mp4 to 32kbps @ 44.1K Hz (hopefully you're using a windows version).

    for example, i used your script above and the result came out as 56kbps CBR
    Last edited by rkovideo; 7th Jun 2016 at 09:34.
    Quote Quote  
  10. Originally Posted by rkovideo View Post
    ffmpeg encodes 32kbps @ 44.1K Hz?

    i tried various times from mp4 to mp3 and always had to crank down the -ar to 11025, otherwise -ab 32k was overridden ... please let me know the release of ffmpeg you used to successfully convert mp4 to 32kbps @ 44.1K Hz (hopefully you're using a windows version).

    for example, i used your script above and the result came out as 56kbps CBR
    Well this is strange as i use script with various audio files and i have reproducible CBR 32kbps mp3 as a result - this is exactly script i use:

    Code:
    @setlocal
    @set OUTDIR="out"
    @if not exist %cd%\%OUTDIR% (mkdir %cd%\%OUTDIR%)
    @ffmpeg -y -hide_banner -fflags genpts -err_detect aggressive -i %1 -vn -c:a libmp3lame -b:a 32k -ac 1 -af "aformat=sample_fmts=flt,aresample=resampler=soxr:osr=44100:dither_method=0,dynaudnorm=p=1/sqrt(2):m=100,firequalizer=gain='if(gte(f,154),0,-INF)+if(lte(f,7501),0,-INF)':accuracy=1:fixed=on" "%OUTDIR%\%~n1.mp3"
    btw -ab means average bitrate not audio bitrate - for fixed bitrate you need to use -b:a
    Quote Quote  
  11. thanks. i hadn't noticed the ab vs.b:a difference. it didn't work when i tried your original script, but when i used an older version of ffmpeg (20150615) it worked. i ended up with a CBR of 32kbps.

    but it automatically takes the sample rate down to 11K Hz.

    also, wipes out the tags %unsyncedlyrics%, %subtitle%, %podcastdesc%, %podcastcategory% and %podcasturl%.

    so ffmpeg still fails requirements 2 & 3.
    Quote Quote  
  12. Originally Posted by rkovideo View Post
    thanks. i hadn't noticed the ab vs.b:a difference. it didn't work when i tried your original script, but when i used an older version of ffmpeg (20150615) it worked. i ended up with a CBR of 32kbps.
    https://ffmpeg.zeranoe.com/builds/
    https://sourceforge.net/projects/mplayer-win32/files/FFmpeg/

    7.1 audio file converted with script gives something like this:

    Code:
    {
        "streams": [
            {
                "index": 0,
                "codec_name": "mp3",
                "codec_long_name": "MP3 (MPEG audio layer 3)",
                "codec_type": "audio",
                "codec_time_base": "1/44100",
                "codec_tag_string": "[0][0][0][0]",
                "codec_tag": "0x0000",
                "sample_fmt": "s16p",
                "sample_rate": "44.100000 KHz",
                "channels": 1,
                "channel_layout": "mono",
                "bits_per_sample": 0,
                "r_frame_rate": "0/0",
                "avg_frame_rate": "0/0",
                "time_base": "1/14112000",
                "start_pts": 353600,
                "start_time": "0:00:00.025057",
                "duration_ts": 156303360,
                "duration": "0:00:11.075918",
                "bit_rate": "32 Kbit/s",
                "disposition": {
                    "default": 0,
                    "dub": 0,
                    "original": 0,
                    "comment": 0,
                    "lyrics": 0,
                    "karaoke": 0,
                    "forced": 0,
                    "hearing_impaired": 0,
                    "visual_impaired": 0,
                    "clean_effects": 0,
                    "attached_pic": 0
                }
            }
        ],
        "format": {
            "filename": "hd_dthd_7.1.mp3",
            "nb_streams": 1,
            "nb_programs": 0,
            "format_name": "mp3",
            "format_long_name": "MP2/3 (MPEG audio layer 2/3)",
            "start_time": "0:00:00.025057",
            "duration": "0:00:11.075918",
            "size": "43.517578 Kibyte",
            "bit_rate": "32.186000 Kbit/s",
            "probe_score": 51,
            "tags": {
                "title": "HD Dolby TrueHD 7.1",
                "encoder": "Lavf57.37.101"
            }
        }
    }
    So you must do something wrong.
    Last edited by pandy; 7th Jun 2016 at 14:26.
    Quote Quote  
  13. Originally Posted by pandy View Post
    Originally Posted by rkovideo View Post
    ffmpeg encodes 32kbps @ 44.1K Hz?

    i tried various times from mp4 to mp3 and always had to crank down the -ar to 11025, otherwise -ab 32k was overridden ... please let me know the release of ffmpeg you used to successfully convert mp4 to 32kbps @ 44.1K Hz (hopefully you're using a windows version).

    for example, i used your script above and the result came out as 56kbps CBR
    Well this is strange as i use script with various audio files and i have reproducible CBR 32kbps mp3 as a result - this is exactly script i use:

    Code:
    @setlocal
    @set OUTDIR="out"
    @if not exist %cd%\%OUTDIR% (mkdir %cd%\%OUTDIR%)
    @ffmpeg -y -hide_banner -fflags genpts -err_detect aggressive -i %1 -vn -c:a libmp3lame -b:a 32k -ac 1 -af "aformat=sample_fmts=flt,aresample=resampler=soxr:osr=44100:dither_method=0,dynaudnorm=p=1/sqrt(2):m=100,firequalizer=gain='if(gte(f,154),0,-INF)+if(lte(f,7501),0,-INF)':accuracy=1:fixed=on" "%OUTDIR%\%~n1.mp3"
    btw -ab means average bitrate not audio bitrate - for fixed bitrate you need to use -b:a
    @pandy I want to change bitrate of MP3 files in a folder to 192k CBR and keep metadata intact using a batch file.
    Can you please give the right code?
    Thanks.
    Last edited by ConverterCrazy; 27th Sep 2017 at 12:55. Reason: additional text for clarity
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  14. @pandy

    Not possible using ffmpeg?
    Last edited by ConverterCrazy; 30th Sep 2017 at 08:37. Reason: Deleting
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  15. Originally Posted by ConverterCrazy View Post
    @pandy

    Not possible using ffmpeg?
    Definitely it is possible... try this one - didn't tested but it should work fine.
    Code:
    @setlocal
    @set OUTDIR="out"
    @if not exist %cd%\%OUTDIR% (mkdir %cd%\%OUTDIR%)
    @ffmpeg -y -hide_banner -i %1 -vn -c:a libmp3lame -b:a 192k "%OUTDIR%\%~n1.mp3"
    @endlocal
    Quote Quote  
  16. Originally Posted by pandy View Post
    Originally Posted by ConverterCrazy View Post
    @pandy

    Not possible using ffmpeg?
    Definitely it is possible... try this one - didn't tested but it should work fine.
    Code:
    @setlocal
    @set OUTDIR="out"
    @if not exist %cd%\%OUTDIR% (mkdir %cd%\%OUTDIR%)
    @ffmpeg -y -hide_banner -i %1 -vn -c:a libmp3lame -b:a 192k "%OUTDIR%\%~n1.mp3"
    
    
    @endlocal

    Thanks
    Ran the script.
    FFMPEG says in red "-vn: no such file or directory" and exits
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  17. Not used before, no need for it, but came across this:

    http://www.inspire-soft.net/software/mp3-quality-modifier

    If it's any good Baldrick might add it to the software downloads.
    Quote Quote  
  18. Originally Posted by ConverterCrazy View Post
    Ran the script.
    FFMPEG says in red "-vn: no such file or directory" and exits
    You must provide source file for this script - simplest way is drag & drop ( https://en.wikipedia.org/wiki/Drag_and_drop ) your files on this batch.
    Quote Quote  
  19. And maybe change -i %1 to -i "%1" including quotation marks in the batch.
    Quote Quote  
  20. Originally Posted by transporterfan View Post
    Not used before, no need for it, but came across this:

    http://www.inspire-soft.net/software/mp3-quality-modifier

    If it's any good Baldrick might add it to the software downloads.
    Thanks a ton!

    Yes, @Baldrick might its so simple to use.
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  21. You're welcome.
    Good to know it works.
    Quote Quote  
  22. Originally Posted by videobruger View Post
    And maybe change -i %1 to -i "%1" including quotation marks in the batch.
    Thanks.

    Doesn't work. Same error reported.
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  23. Originally Posted by pandy View Post
    Originally Posted by ConverterCrazy View Post
    Ran the script.
    FFMPEG says in red "-vn: no such file or directory" and exits
    You must provide source file for this script - simplest way is drag & drop ( https://en.wikipedia.org/wiki/Drag_and_drop ) your files on this batch.
    Thanks. Works for a single file not for batch conversion.

    There are 323 files.
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  24. Well... conversion is quite simple as you can do something like:

    Code:
    for /R %%a in (*.mp4, *.aac, *.mp3, *.m4a, *.flac) do (@ffmpeg -y -v quiet -stats -i "%%a" -vn -sn -c:a libmp3lame -b:a 192k "%%~na.192k.mp3")
    But if you trying to perform such operation with replicated directory structure then it can be a serious issue for simple batch.
    You can try something like:https://mostlybuggy.wordpress.com/2012/09/25/windows-batch-file-how-to-copy-and-conver...y-with-ffmpeg/ - there are some limitations but it should work.
    Last edited by pandy; 4th Oct 2017 at 11:30. Reason: fixed missing ending parentheses as pointed by videobruger
    Quote Quote  
  25. I think pandy's code is missing end parentheses ).

    "%%~na.192k.mp3")
    Quote Quote  
  26. Originally Posted by videobruger View Post
    I think pandy's code is missing end parentheses ).

    "%%~na.192k.mp3")
    True, my mistake, Thx!
    Quote Quote  
  27. Thanks.
    After modification, this code works, but metadata is not saved in new files (Title tag is blanked out):

    Code:
    @setlocal
    @set /a cput=(%NUMBER_OF_PROCESSORS%*3)/2
    @if not exist %cd%\out (mkdir %cd%\out)
    
    for %%a in (*.mp4, *.aac, *.mp3, *.m4a, *.flac) do (@ffmpeg -y -v quiet -stats -i "%%a" -vn -sn -c:a 
    
    libmp3lame -b:a 192k "%cd%\out\%%~na.192k.mp3")
    
    @Echo Done!
    @pause
    Perhaps, it might help.
    Last edited by ConverterCrazy; 7th Oct 2017 at 08:43. Reason: Updated with fresh input
    Sword is no substitute for kitchen-knife.
    Quote Quote  
  28. Thanks.

    This is the final script for the batch conversion:

    Code:
    @setlocal
    @set /a cput=(%NUMBER_OF_PROCESSORS%*3)/2
    @if not exist %cd%\out (mkdir %cd%\out)
    
    for %%a in (*.mp4, *.aac, *.mp3, *.m4a, *.flac) do (@ffmpeg -y -v quiet 
    
    -stats -i "%%a" -vn -sn -c:a libmp3lame -b:a 192k -map_metadata 0 -
    
    id3v2_version 3 "%cd%\out\%%~na.192k.mp3")
    
    @Echo Done!
    @pause
    Sword is no substitute for kitchen-knife.
    Quote Quote  



Similar Threads