JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #41  
Old 06.11.2019, 15:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

I'm sorry but no news yet
__________________
JD-Dev & Server-Admin
Reply With Quote
  #42  
Old 07.11.2019, 07:51
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

hello if I converted the 'mp4' sound would it be good? is this possible?
Reply With Quote
  #43  
Old 07.11.2019, 11:18
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

@smokiemamour: mpeg4 audio is superior to mp3.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #44  
Old 07.11.2019, 12:03
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

this subject is solved thanks to all
Reply With Quote
  #45  
Old 03.12.2019, 11:29
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

hello, I would like to make a script so that when I download mp4 it converts me to mp3
can you tell me if the script is good thanks

Code:
// Convert /mp4 files to mp3.
// Trigger required: "A Download Stopped".
// Requires ffmpeg/ffprobe. Uses JD ffmpeg/ffprobe settings if available.
// Overwrites destination file (mp3) if it already exists.

if (link.isFinished()) {
    var fileName = link.name.replace(/(.+)(\..+$)/, "$1");
    var fileType = link.name.replace(/(.+)(\..+$)/, "$2");
    var sourceFile = link.getDownloadPath();
    var audioFile = /\.(aac|m4a|ogg)$/.test(sourceFile);

    if (audioFile) {
        var downloadFolder = package.getDownloadFolder();
        var destFile = downloadFolder + "/" + fileName + ".mp3";
        var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
        var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe");
        var data = JSON.parse(callSync(ffprobe, "-v", "quiet", "-print_format", "json", "-show_streams", "-show_format", sourceFile));
        var streamsBitrate = data.streams[0].bit_rate ? data.streams[0].bit_rate : 0;
        var formatBitrate = data.format.bit_rate ? data.format.bit_rate : 0;
        var bitrate = Math.max(streamsBitrate, formatBitrate) / 1000;
        var deleteSourceFile = false; // Set this to true to delete source file after conversion.

        if (bitrate > 0) {
            callSync(ffmpeg, "-y", "-i", sourceFile, "-b:a", bitrate + "k", destFile);
            if (deleteSourceFile && getPath(destFile).exists()) deleteFile(sourceFile, false);
        }
    }
}
disablePermissionChecks();

Last edited by raztoki; 03.12.2019 at 13:01.
Reply With Quote
Old 05.12.2019, 11:03
smokiemamour
Message deleted by raztoki. Reason: dupe
  #46  
Old 05.12.2019, 11:38
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

I do believe the answer was already answered right https://board.jdownloader.org/showpo...7&postcount=20

please stop making the exact same post over and over (your copy paste). If you have further enquiry please query specifics and then wait for a response.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #47  
Old 05.12.2019, 11:43
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

it is to convert aac/m4a/ogg it's because I wanted to make a new subject
Reply With Quote
  #48  
Old 05.12.2019, 12:14
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

we can rename this thread easy enough. Think the merging of your topics as already achieved your goal.

From your posts you still seem unsure of your script (which mgpai and jiaz have provided/worked on).
I would ask again that if you have an issue please state specifics then those that have knowledge will hopefully spend time and assist.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 05.12.2019 at 12:17.
Reply With Quote
  #49  
Old 05.12.2019, 12:32
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

why not just make a new topic?
Reply With Quote
  #50  
Old 05.12.2019, 12:41
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

because your exact same post was already in here. Their is zero need.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #51  
Old 05.12.2019, 12:49
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

Quote:
Originally Posted by smokiemamour View Post
if I converted the 'mp4' sound would it be good? is this possible?
Quote:
Originally Posted by Jiaz View Post
@smokiemamour: mpeg4 audio is superior to mp3.
mpeg4 is considered the natural successor to mp3, and is the codec normally used in 'm4a' and 'mp4' containers.

Quote:
Originally Posted by smokiemamour View Post
... I would like to make a script so that when I download mp4 it converts me to mp3
'mp4' is a container, not a codec. YT usually contains the same audio stream in both containers.

Example:
'm4a' = 'aac' audio
'mp4' = 'aac' audio + 'h.264' video

If they are of the same audio bitrate (which they usually are), quality of the converted 'mp3' file will remain the same in both cases. So, it is not necessary to download the file in 'mp4' (video+audio) format, if you just want the audio stream.

YT normally provides only the transcoded video/audio files and not the original ones. You will be again transcoding from one lossy format (aac) to another (mp3). Hence, the quality of the resulting 'mp3' file will be inferior than the source (aac) file.
Reply With Quote
  #52  
Old 05.12.2019, 14:04
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

so what should I take as a file?
excuse me but I do not understand your message
Reply With Quote
  #53  
Old 06.12.2019, 12:23
smokiemamour smokiemamour is offline
JD Beta
 
Join Date: Sep 2019
Posts: 55
Default

hello would it be possible to rename my message, I would like to do it but everything is in English I'm French I do not understand anything thank you
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 19:30.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.