VideoHelp Forum




+ Reply to Thread
Page 3 of 7
FirstFirst 1 2 3 4 5 ... LastLast
Results 61 to 90 of 199
  1. If you just need those 3 files in the same directory, can't you just uncheckmark "delete the intermediate files" from megui ?
    Last edited by poisondeathray; 29th Jul 2014 at 21:15.
    Quote Quote  
  2. I don't know what your actual paths are, I copied them from above post. I'm assuming you want the AC3 "normalized" by the same algorithm/values as the processed AAC, not through SOX or other processing

    Code:
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %1 -map 0:0 -map 0:1 -c:v copy -bsf:v h264_mp4toannexb -an "video.h264" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del gain.m4a
    del video.h264
    del output.ac3
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause


    I still don't understand why you're doing this??? You're stream copying video into MKV with AC3, separate AAC for input into megui so you can encode it again ?
    Last edited by poisondeathray; 29th Jul 2014 at 21:59.
    Quote Quote  
  3. Thanks very much. The script works perfectly. I end up with 3 files in the same directory which is what I wanted:

    Video Name.mkv (this is the MKV source with AAC)
    Video Name.AC3.mkv
    Video Name.aac

    Bluray doesn't support AAC so I wanted a quick way to mux the MKV back to MKV but re-encode the audio to AC3.
    I also wanted the AAC demuxed because what happens if there's a future disc format after Bluray that doesn't support AC3? I don't want to re-encode the AC3 file again as I already lost quality by re-encoding the AAC to AC3 so by having the AAC source I can re-encode that to a future file format.

    The script does all that in one step. MeGUI can't do all that and I like to fix problems with the videos at the source, not at the moment I decide to re-encode the videos with MeGUI.

    -----------------------------------------------------------------------------

    Was wondering, I assume the script only normalizes the AAC (and losslessly) and then the AAC is re-encoded to AC3. The AC3 will already by normalized since it came from the AAC file?

    I have some other files that are in .TS format that I'd like to use the script on to mux to MKV. The script works however it gives these error messages at the top of the CMD: https://docs.google.com/document/d/1OlFuehIssbrsiP3LltOs9JkehR5I7o43LyHAMulxGhc/edit
    Do you have a script mod that would prevent those errors please?
    Quote Quote  
  4. Originally Posted by VideoFanatic View Post



    Was wondering, I assume the script only normalizes the AAC (and losslessly) and then the AAC is re-encoded to AC3. The AC3 will already by normalized since it came from the AAC file?

    Yes, it uses the AAC gain version of the AAC file as input for the AC3 . You can check in an audio editor or ffmpeg


    eg. original
    ffmpeg -i "Superstars 2014 July 24 clip.mkv" -vn -af "volumedetect" -f null NULL
    [Parsed_volumedetect_0 @ 02d3a920] n_samples: 6062080
    [Parsed_volumedetect_0 @ 02d3a920] mean_volume: -31.1 dB
    [Parsed_volumedetect_0 @ 02d3a920] max_volume: -14.6 dB
    [Parsed_volumedetect_0 @ 02d3a920] histogram_14db: 3
    [Parsed_volumedetect_0 @ 02d3a920] histogram_15db: 56
    [Parsed_volumedetect_0 @ 02d3a920] histogram_16db: 238
    [Parsed_volumedetect_0 @ 02d3a920] histogram_17db: 807
    [Parsed_volumedetect_0 @ 02d3a920] histogram_18db: 2276
    [Parsed_volumedetect_0 @ 02d3a920] histogram_19db: 6009
    eg. AC3 version
    ffmpeg -i "Superstars 2014 July 24 clip.AC3.mkv" -vn -af "volumedetect" -f null NUL

    [Parsed_volumedetect_0 @ 02d3f3a0] n_samples: 6064128
    [Parsed_volumedetect_0 @ 02d3f3a0] mean_volume: -20.5 dB
    [Parsed_volumedetect_0 @ 02d3f3a0] max_volume: -4.2 dB
    [Parsed_volumedetect_0 @ 02d3f3a0] histogram_4db: 21
    [Parsed_volumedetect_0 @ 02d3f3a0] histogram_5db: 124
    [Parsed_volumedetect_0 @ 02d3f3a0] histogram_6db: 480
    [Parsed_volumedetect_0 @ 02d3f3a0] histogram_7db: 1420
    [Parsed_volumedetect_0 @ 02d3f3a0] histogram_8db: 4006
    [Parsed_volumedetect_0 @ 02d3f3a0] histogram_9db: 9187






    I have some other files that are in .TS format that I'd like to use the script on to mux to MKV. The script works however it gives these error messages at the top of the CMD: https://docs.google.com/document/d/1OlFuehIssbrsiP3LltOs9JkehR5I7o43LyHAMulxGhc/edit
    Do you have a script mod that would prevent those errors please?
    It might be a protected stream. You might have to use something else to do the demuxing. Post a sample
    Last edited by poisondeathray; 30th Jul 2014 at 08:23.
    Quote Quote  
  5. Sample. This is the same sample as before but in TS format instead of MKV. It wasn't protected.
    Quote Quote  
  6. Just replace the 1st line with eac3to to do the demuxing step

    Code:
    eac3to %1 1:"video.h264" 2:"gain.m4a"
    of course eac3to needs the path if it's not setup as an environment variable or in the search path
    "X:\Portable Installations\eac3to\bin\eac3to.exe" or whatever


    and add to the delete entries at the end (before pause)

    Code:
    del "video - Log.txt"
    If you want to delete the eac3to log file





    Code:
    eac3to %1 1:"video.h264" 2:"gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del gain.m4a
    del video.h264
    del output.ac3
    del "video - Log.txt"
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Last edited by poisondeathray; 30th Jul 2014 at 08:52.
    Quote Quote  
  7. Actually there is a problem with AACGAIN doesn't seem to like the header or something that eac3to demuxed aac file . You can still demux the video with it, but use ffmpeg or something else to demux the audio

    Code:
    eac3to %1 1:"video.h264"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" %1 -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del gain.m4a
    del video.h264
    del output.ac3
    del "video - Log.txt"
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Quote Quote  
  8. Tried that script and I added the eac3to location:
    "X:\Portable Installations\eac3to327\eac3to.exe" %1 1:"video.h264"

    However the CMD asks if I want to overwrite the source file.
    Quote Quote  
  9. Ok I'll look into it , just a sec

    sorry, the 1st ffmpeg line is missing a "-i"

    Code:
    eac3to %1 1:"video.h264"
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i %1 -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    
    "X:\Portable Installations\AAC Gain 1.9\aacgain" -r -k -m 0 gain.m4a
    
    "X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" -i gain.m4a -map 0:0 -vn -c:a copy "%~d1%~p1%~n1.aac" -map 0:0 -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "X:\Portable Installations\MKV Toolnix\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del gain.m4a
    del video.h264
    del output.ac3
    del "video - Log.txt"
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause
    Last edited by poisondeathray; 30th Jul 2014 at 15:23.
    Quote Quote  
  10. E:\2 = New>"X:\Portable Installations\eac3to327\eac3to.exe" "E:\2 = New\Supersta
    rs 2014 July 24 clip TS AAC.ts" 1:"video.h264"
    TS, 1 video track, 1 audio track, 0:01:03, 50i
    1: h264/AVC, 1080i50 (16:9)
    2: AAC, 2.0 channels, 48kHz
    v01 Extracting video track number 1...
    v01 Creating file "video.h264"...
    Video track 1 contains 3154 fields.
    eac3to processing took 1 second.
    Done.

    E:\2 = New>"X:\Portable Installations\ffmpeg\bin\ffmpeg.exe" "E:\2 = New\Superst
    ars 2014 July 24 clip TS AAC.ts" -vn -c:a copy -absf aac_adtstoasc "gain.m4a"
    ffmpeg version N-65018-gad91bf8 Copyright (c) 2000-2014 the FFmpeg developers
    built on Jul 26 2014 22:09:15 with gcc 4.8.3 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
    enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
    modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
    b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
    r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
    able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
    --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
    libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
    libavutil 52. 92.101 / 52. 92.101
    libavcodec 55. 69.100 / 55. 69.100
    libavformat 55. 49.100 / 55. 49.100
    libavdevice 55. 13.102 / 55. 13.102
    libavfilter 4. 11.102 / 4. 11.102
    libswscale 2. 6.100 / 2. 6.100
    libswresample 0. 19.100 / 0. 19.100
    libpostproc 52. 3.100 / 52. 3.100
    File 'E:\2 = New\Superstars 2014 July 24 clip TS AAC.ts' already exists. Overwri
    te ? [y/N]
    Quote Quote  
  11. See the edit above . I think I accidentally deleted it (the "-i" ) when copy & pasting your paths
    Quote Quote  
  12. Thanks very much. It works now.

    Those scripts work for AAC sources but I'm curious about Sox which can convert any audio format. I've got a bunch of files with high bitrate AC3 files that I'd like to mux back to the same format but re-encode the AC3 to AC3 and lower the bitrate.

    Do you know what script to use to do the same as before for MKV/TS but with AC3 audio source? I'd like to normalize the AC3 as before to the same noise level.
    Quote Quote  
  13. Originally Posted by VideoFanatic View Post
    Thanks very much. It works now.

    Those scripts work for AAC sources but I'm curious about Sox which can convert any audio format. I've got a bunch of files with high bitrate AC3 files that I'd like to mux back to the same format but re-encode the AC3 to AC3 and lower the bitrate.

    Do you know what script to use to do the same as before for MKV/TS but with AC3 audio source? I'd like to normalize the AC3 as before to the same noise level.


    For sox, I typically use --norm for normalize. So --norm=-3 would be -3db. Choose whatever value works for your goal. It won't be exactly the same as the other example, because the ReplayGain uses a different algorithm. (Of course set the "PATH" to the real paths for your binaries)


    This one is for MKV, which uses ffmpeg to demux the video
    Code:
    "PATH\ffmpeg" -i %1 -f sox - | "PATH\sox" -t sox - -c 2 -r 48000 -b 16 --norm=-3 -t wav - | "PATH\ffmpeg" -i - -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "PATH\ffmpeg" -i %1 -c:v copy -bsf:v h264_mp4toannexb -an "video.h264"
    
    "PATH\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del video.h264
    del output.ac3
    
    pause

    This one is for TS, which uses eac3to to demux the video
    Code:
    "PATH\ffmpeg" -i %1 -f sox - | "PATH\sox" -t sox - -c 2 -r 48000 -b 16 --norm=-3 -t wav - | "PATH\ffmpeg" -i - -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "PATH\eac3to" %1 1:"video.h264"
    
    "PATH\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del video.h264
    del output.ac3
    del "video - Log.txt"
    
    pause
    Quote Quote  
  14. Thanks. Remember though, I also wanted the AC3 demuxed into an AC3 file with the same name as the input video. Could you please adjust the scripts to do that.

    Tried the MKV script, it works fine but gives this message in the CMD: http://pastebin.com/a9vGvXYf
    TS scripts works fine.

    Was wondering, will the scripts convert 5.1 AC3 to the same format OK?
    Quote Quote  
  15. Originally Posted by VideoFanatic View Post
    Thanks. Remember though, I also wanted the AC3 demuxed into an AC3 file with the same name as the input video. Could you please adjust the scripts to do that.
    Are you sure? The normalization is not reversible like ReplayGain (RG adjusts metadata , so players that support RG will know what to do). IMO you'd be better off keeping the original AC3. What if you need 0dB for some application ? What if you need -10dB for another situation in the future?

    Tried the MKV script, it works fine but gives this message in the CMD: http://pastebin.com/a9vGvXYf
    TS scripts works fine.
    Ok I'll have a look, you might have to use MKV extract or ffmpeg to physically extract it, but that would mean no pipe to sox (slower)


    Was wondering, will the scripts convert 5.1 AC3 to the same format OK?
    No because the -c 2 in the sox line is hardcoded (2 channels). You would have to change that





    BTW these are shitty ways to write batch scripts. A better geeky way to organize this is to use variables and paths at the beginning of the script so you can easily adjust and make changes. So you change 1 entry at the beginning and all subsequent entries are automatically changed.
    Quote Quote  
  16. Originally Posted by VideoFanatic View Post

    Tried the MKV script, it works fine but gives this message in the CMD: http://pastebin.com/a9vGvXYf
    I can't reproduce this. Is this the same batch of MKV's as in your sample? or different set, different characteristics?
    Quote Quote  
  17. Originally Posted by poisondeathray View Post
    Originally Posted by VideoFanatic View Post

    Tried the MKV script, it works fine but gives this message in the CMD: http://pastebin.com/a9vGvXYf
    I can't reproduce this. Is this the same batch of MKV's as in your sample? or different set, different characteristics?
    New clip here.

    Originally Posted by poisondeathray View Post
    Originally Posted by VideoFanatic View Post
    Thanks. Remember though, I also wanted the AC3 demuxed into an AC3 file with the same name as the input video. Could you please adjust the scripts to do that.
    Are you sure? The normalization is not reversible like ReplayGain (RG adjusts metadata , so players that support RG will know what to do). IMO you'd be better off keeping the original AC3. What if you need 0dB for some application ? What if you need -10dB for another situation in the future?
    OK thanks, never really thought of that. Can you still give a demuxed AC3 file but without changing the volume of it then - so only the AC3 in the destination container should be volume changed.

    The videos will be going on Bluray. Are you saying that there are some Bluray players that will ignore the AC3 normalized level and play it at it's original level?
    Quote Quote  
  18. Originally Posted by VideoFanatic View Post



    OK thanks, never really thought of that. Can you still give a demuxed AC3 file but without changing the volume of it then - so only the AC3 in the destination container should be volume changed.

    The videos will be going on Bluray. Are you saying that there are some Bluray players that will ignore the AC3 normalized level and play it at it's original level?
    OK I'll change the scripts after I look at the new sample file

    No - Blu-ray players will accept the AC3 normalization with EITHER method because it's physically, permanently, re-encoded and changed in the AC3. In the 1st AAC example the AC3 used the RG version of the AAC as input, so the new AC3 file has those normalization values and will work in all players. But the RG AAC version is not guarenteed to work everywhere , because there is no physical alteration, it's just metadata (only players that are compatible with RG) ; but the benefit is that it's reversible. In the 2nd method, the AC3 used sox to normalize, so it too will work in all players
    Quote Quote  
  19. That last sample has gaps and overlaps. I would use eac3to to do the demuxing

    The separate AC3 file is not normalized (just demuxed), but the AC3 in the MKV is processed by sox

    Code:
    "PATH\ffmpeg" -i %1 -f sox - | "PATH\sox" -t sox - -c 2 -r 48000 -b 16 --norm=-3 -t wav - | "PATH\ffmpeg" -i - -vn -c:a ac3 -b:a 128k "output.ac3"
    
    "PATH\eac3to" %1 1:"video.h264"  2:"%~d1%~p1%~n1.ac3"
    
    "PATH\mkvmerge.exe" -o "%~d1%~p1%~n1.AC3.mkv" "--forced-track" "0:no" "-d" "0" "-A" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "video.h264" ")" "--language" "0:eng" "--forced-track" "0:no" "-a" "0" "-D" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "output.ac3" ")" "--track-order" "0:0,1:0"
    
    del video.h264
    del output.ac3
    del "video - Log.txt"
    
    pause
    Quote Quote  
  20. Was wondering, how do I insert comments (notes for myself) into a script?

    Tried the script. It works but gives these messages in CMD: http://pastebin.com/nAGAdCjT
    Is that anything to worry about?

    Also what do you mean by "gaps and overlaps"? The video plays fine, I don't see any problems when watching it.

    In the 1st AAC example the AC3 used the RG version of the AAC as input, so the new AC3 file has those normalization values and will work in all players. But the RG AAC version is not guarenteed to work everywhere , because there is no physical alteration, it's just metadata (only players that are compatible with RG) ; but the benefit is that it's reversible. In the 2nd method, the AC3 used sox to normalize, so it too will work in all players
    Confused. So will the AC3 in the destination container work in all Bluray players or not?
    Quote Quote  
  21. Originally Posted by VideoFanatic View Post
    Was wondering, how do I insert comments (notes for myself) into a script?
    Use a REM statement (= remark) .

    Code:
    REM This is a remark, it wont be processed
    .
    .
    ffmpeg blah blah blah
    mkvmerge blah blah blah
    .

    Tried the script. It works but gives these messages in CMD: http://pastebin.com/nAGAdCjT
    Is that anything to worry about?

    Also what do you mean by "gaps and overlaps"? The video plays fine, I don't see any problems when watching it.
    It should be ok, but that's probably what's causing ffmpeg and eac3to to print those messages. These are gaps in the video, but eac3to is supposed to be able to correct for gaps in the audio. It has something to do with your souce timestamps


    In the 1st AAC example the AC3 used the RG version of the AAC as input, so the new AC3 file has those normalization values and will work in all players. But the RG AAC version is not guarenteed to work everywhere , because there is no physical alteration, it's just metadata (only players that are compatible with RG) ; but the benefit is that it's reversible. In the 2nd method, the AC3 used sox to normalize, so it too will work in all players
    Confused. So will the AC3 in the destination container work in all Bluray players or not?


    Yes the AC3 works in everything , by itself, or in destination container with either method.

    But the replaygain processed AAC doesn't necessarily work in all players. Player has to support ReplayGain . And of course AAC isn't supported by BD

    Because the decoder you used (ffmpeg) on the RG AAC supported RG, the resultant re-encoded AC3 from the RG AAC has those changes encoded into it now (not reversible) . ie. it was decoded from the RG AAC with those changes, before encoding to AC3 with those same changes .
    Last edited by poisondeathray; 31st Jul 2014 at 13:53.
    Quote Quote  
  22. Thanks. If I understand you correctly you're saying AAC may not work in all Bluray players. I didn't expect AAC to work in Bluray players as AAC isn't Bluray compliant!

    Isn't there a way to get the script to automatically convert to 2 channel or 5.1 if the source is 2 channel or 5.1?
    Quote Quote  
  23. Originally Posted by VideoFanatic View Post
    Thanks. If I understand you correctly you're saying AAC may not work in all Bluray players. I didn't expect AAC to work in Bluray players as AAC isn't Bluray compliant!
    In ALL players. I mean including devices, Ipods etc.... Not all software mediaplayers support ReplayGain either

    Recall you wanted that separate AAC file - I'm warning you to be careful because not all players will recognize the RG values

    Likewise you could keep the original audio there as well. I didn't complain at that time because at least RG is reversible and non destructive unlike the sox changes . With the RG AAC you could just run it through a different set of parameters again

    Isn't there a way to get the script to automatically convert to 2 channel or 5.1 if the source is 2 channel or 5.1?
    If you omit the channels in sox I think it should do it automatically, but you probably don't want -b:a 128k for 6ch AC3

    There are also other ways with If/then statements and complex scripts
    Quote Quote  
  24. The AAC file is just in case the new format after Bluray is extinct doesn't support AC3 in which case I'll have the AAC original source to convert to a new audio format. So I assume since the AAC was normalized that any audio format I encode that to will still have the same volume and providing it's compliant to the Bluray successor's spec, it should work in all players!

    Good point about 6 channel audio.

    Last thing I'm trying to fix is MPEG2 standard definition videos recorded off TV that have MPA audio such as THIS sample. I use THIS MPEG2 script to convert to MPEG2 but with AC3 and also demux the MPA file. I look at the resulting file in MediaInfo and no delay is reported. If I then try to save a project of the video with DGIndex then instead of it just demuxing the 1 audio file, all I get are these files:

    Impact 2014 July 24 Ta7 96K 20bit 1ch.wav
    Impact 2014 July 24 T8a DELAY -540ms.dts
    Impact 2014 July 24 T8b DELAY -540ms.dts
    Impact 2014 July 24 T8c DELAY -540ms.dts
    Impact 2014 July 24 T8d DELAY -540ms.dts
    Impact 2014 July 24 T8e DELAY -540ms.dts
    Impact 2014 July 24 T8f DELAY -540ms.dts
    Impact 2014 July 24 T88 DELAY -540ms.dts
    Impact 2014 July 24 T89 DELAY -540ms.dts
    Impact 2014 July 24 Ta0 48K 24bit 1ch.wav
    Impact 2014 July 24 Ta1 96K 24bit 8ch.wav
    Impact 2014 July 24 Ta2 96K 16bit 6ch.wav
    Impact 2014 July 24 Ta3 96K 24bit 8ch.wav
    Impact 2014 July 24 Ta4 48K 24bit 7ch.wav
    Impact 2014 July 24 Ta5 48K 20bit 1ch.wav
    Impact 2014 July 24 Ta6 48K 16bit 8ch.wav

    Even weirder is that when I drag the MPEG2 FFMPEG conversion into TSMuxer it says "Error: Sample rate 44100 is not supported for LPCM format". So I can't demux with TSMuxer to seperate the files to start again. Old version of TSMuxer just recognizes 2 video files as all I get is 2 demuxed MPV files at 4MB each (The video should be over 1GB in size!)

    MediaInfo says the video is AC3 48 Khz sampling rate so I don't know what the problem is. Only way to salvage those videos is to use DGIndex to demux the FFMPEg result then mux the video with the demuxed FFMPEG audio then I can start again.

    Anyway, do you know what script I can use to do the same thing as before: Mux MPEG2 to MPEG2, Normalize (if you think that's appropriate) and Demux the MPA and convert to AC3 for the MPEG2 container destination. I should then be able to demux the script's resulting MPEG2 with DGIndex and it should then demux properly?
    Quote Quote  
  25. Originally Posted by VideoFanatic View Post
    The AAC file is just in case the new format after Bluray is extinct doesn't support AC3 in which case I'll have the AAC original source to convert to a new audio format. So I assume since the AAC was normalized that any audio format I encode that to will still have the same volume and providing it's compliant to the Bluray successor's spec, it should work in all players!
    Nope - and that's the point - The AAC will only have those normalized values ONLY in a player or software that supports ReplayGain . If you convert it with sofware that doesn't - it will sound like the original low volume . e.g. If I take your AAC files and plop them into Adobe, it won't be the same because they don't support RG. You just have to remember that those were RG processed AAC files

    That's both the benefit and negative of RG. On one hand it's nondestructive and reversible. On the other it doesn't work everywhere
    Quote Quote  
  26. For the IMPACT mpg, do you have a bunch of individual mpg files? or is it a large single clip ?

    If I then try to save a project of the video with DGIndex then instead of it just demuxing the 1 audio file, all I get are these files:
    I don't get what you're doing here? Are you taking the original video, or ffmpeg processed video and running it through DGIndex ? How are you getting dts and wav ?

    Im guessing that that MPEG2 video switches audio configurations mid stream. e.g. for commercials it might be be something, for parts of the main program might be something else. That might not be revealed in a smaller sample
    Quote Quote  
  27. Source is MPEG2 with MPA audio. Used FFMPEG script to mux to MPEG2 with AC3 audio (audio was re-encoded). Demuxed that file with DGIndex and for some reason instead of just demuxing 1 AC3 file, it gives me all those DTS and WAV files. Same thing happens with the full length 1 hour 30 minute video.

    Note sure if when it aired on TV it used a different audio codec during commercials but I wouldn't imagine so. Also I cut out all the commercials.

    Still confused by what you said here or was that a mistake what you said?

    In the 1st AAC example the AC3 used the RG version of the AAC as input, so the new AC3 file has those normalization values and will work in all players. But the RG AAC version is not guarenteed to work everywhere , because there is no physical alteration, it's just metadata (only players that are compatible with RG) ; but the benefit is that it's reversible. In the 2nd method, the AC3 used sox to normalize, so it too will work in all players
    You said the AC3 that came from the AAC normalized audio will work on all players.
    Quote Quote  
  28. The RG AAC won't necessarily have the gain effect in all players. It will play, but only in players that support RG, will the normalization/volume changes be audible

    Yes AC3 will work on all players with the gain/normalization (even if derived from RG AAC). Because you used a RG supported method of converting to AC3. So those changes are permanent in the AC3 now . If you forgot, and used something else like Adobe or Apple software to convert the RG AAC to AC3, then that AC3 wouldn't reflect those changes. So in the future, you have to remember that those AAC files are normalized by RG, not other method
    Quote Quote  
  29. I think the problem is you left out -f vob for the mpg case

    This produces demuxed mpa (unprocessed) , remuxed stream copied video, with AC3 normalized by sox to -3db (again adjust value if you want), into MPEG2-PS

    When DGIndex processes the output file, there is only 1 audio file output. If you leave out the " -f vob" , DGIndex will have those many audio file outputs (for some reason, I don't know why)

    Code:
    
    "PATH\ffmpeg" -i %1 -vn -c:a copy "%~d1%~p1%~n1.mpa"
    
    "PATH\ffmpeg" -i %1 -f sox - | "PATH\sox" -t sox - -c 2 -r 48000 -b 16 --norm=-3 -t wav - | "PATH\ffmpeg" -i - -i %1 -map 0:0 -map 1:0 -c:v copy -c:a ac3 -b:a 128k -f vob "%~d1%~p1%~n1.AC3.mpg"
    
    "X:\Daves Folder\Sounds\VideoRedo Completed Sound Short.WAV"
    
    pause

    old stable version of tsmuxer (1.10.6) doesn't complain about the audio in the output file either, but the new version complains about something if you try .ts, but it's ok with .m2ts
    Last edited by poisondeathray; 31st Jul 2014 at 17:07.
    Quote Quote  
  30. Thanks. It works however MediaInfo shows a -5ms delay in MediaInfo on the FFMPEG video. When I then demux that video using DGIndex, DGIndex mentions a delay of 122ms in the AC3 file name.

    I don't think there should be any delay as I cut my files in a way that prevents a delay occurring.

    For example, in my source clip I uploaded, if you use DGIndex to save a project you'll see no delay is mentioned in the MP2 of the demuxed audio.

    Do you know how to fix the script to prevent a delay?
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!