VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. Okay, so I made a mistake and I need some help. I have a bunch of .mp4 video files with an incorrect audio format. I need the audio portion of all the files to be converted to a different format. Unfortunately, I no longer have the source files so this is the only option.

    Which program can I use to batch convert just the audio portions of .mp4 files then re-mux with the video streams without re-encoding the video?

    P.S. I know I could just do this manually but there are a lot of files...
    Quote Quote  
  2. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  3. If you want a gui

    xmediarecode
    Drag files in
    Select each individually and:
    video>copy
    Audio>convert
    Quote Quote  
  4. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    What audio format do you need?

    You could use ffmpeg with ffqueue (setup first). Copy preset block below:

    //8RAQAAeNpFjc1qw0AMhO8Gv4MfQDSyifMHOmySW6GHhp5CMJ
    u14iyJva7/qN++8hITECPQjL451w233F3CwOZ0+loMx592r9T+
    UxdKGRRRRGFQ6ZLpm8v+Lxpszg4ipQ4RV8blHOk+ty4MvJFNF0
    PG1WMYPHjMbo28tgQACEucU7+9ftpuJIR1KsZqO7lLkS36nEgs
    YU9+IZ/2OrhMayOts9PojilONhALfz6+2RtBdPe+vLbkiVBXhd
    8pQjLtBFLpAcSdnw9E/AdzrlCA

    Paste it into ffqueue's preset manager. Now drag & drop your files to the main window, batch make opens. Tick audio & video, define a destination folder for converted videos, select "Remux video, AAC encode audio" under preset (the preset you copy-pasted from above), and click Make jobs. FFQ will now create jobs for your files and send you back to the main window. Now you can click start and conversion begins!

    Video will be remuxed and audio will be encoded in 128k AAC.
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  5. I need it be .aac codec with AAC-LC setting. I'll give xmediarecode a try first and if not I'll give ffmpeg a try. I'll let you know if I can get it to work. Thank you for the replies!
    Last edited by Whitezombie455; 21st Jan 2015 at 12:45.
    Quote Quote  
  6. Originally Posted by TorBru View Post
    What audio format do you need?

    You could use ffmpeg with ffqueue (setup first). Copy preset block below:

    //8RAQAAeNpFjc1qw0AMhO8Gv4MfQDSyifMHOmySW6GHhp5CMJ
    u14iyJva7/qN++8hITECPQjL451w233F3CwOZ0+loMx592r9T+
    UxdKGRRRRGFQ6ZLpm8v+Lxpszg4ipQ4RV8blHOk+ty4MvJFNF0
    PG1WMYPHjMbo28tgQACEucU7+9ftpuJIR1KsZqO7lLkS36nEgs
    YU9+IZ/2OrhMayOts9PojilONhALfz6+2RtBdPe+vLbkiVBXhd
    8pQjLtBFLpAcSdnw9E/AdzrlCA

    Paste it into ffqueue's preset manager. Now drag & drop your files to the main window, batch make opens. Tick audio & video, define a destination folder for converted videos, select "Remux video, AAC encode audio" under preset (the preset you copy-pasted from above), and click Make jobs. FFQ will now create jobs for your files and send you back to the main window. Now you can click start and conversion begins!

    Video will be remuxed and audio will be encoded in 128k AAC.
    Well I couldn't figure out xmediarecode so I gave ffmpeg with ffqueue a try and so far it is working perfectly! Very easy to understand and use. It was a lot easier then what is above here. I couldn't find anywhere to paste the preset block so I just went in and created a preset and it was really easy to make one. Thanks for the help!

    I'll post back if I encounter any problems.
    Quote Quote  
  7. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    Great that it went smoothly! The copy-paste preset is quite simple - just select the whole base64 block (from "//" to "CA" - both inclusive) , and press [CTRL]+[C] to copy. Open ffqueue, open preset manager and click the "Paste" button. But since you had no problems creating a preset yourself it does not matter
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  8. Originally Posted by TorBru View Post
    What audio format do you need?

    You could use ffmpeg with ffqueue (setup first). Copy preset block below:

    //8RAQAAeNpFjc1qw0AMhO8Gv4MfQDSyifMHOmySW6GHhp5CMJ
    u14iyJva7/qN++8hITECPQjL451w233F3CwOZ0+loMx592r9T+
    UxdKGRRRRGFQ6ZLpm8v+Lxpszg4ipQ4RV8blHOk+ty4MvJFNF0
    PG1WMYPHjMbo28tgQACEucU7+9ftpuJIR1KsZqO7lLkS36nEgs
    YU9+IZ/2OrhMayOts9PojilONhALfz6+2RtBdPe+vLbkiVBXhd
    8pQjLtBFLpAcSdnw9E/AdzrlCA

    Paste it into ffqueue's preset manager. Now drag & drop your files to the main window, batch make opens. Tick audio & video, define a destination folder for converted videos, select "Remux video, AAC encode audio" under preset (the preset you copy-pasted from above), and click Make jobs. FFQ will now create jobs for your files and send you back to the main window. Now you can click start and conversion begins!

    Video will be remuxed and audio will be encoded in 128k AAC.
    Thank you.
    Can you please post a preset to remux the audio into uncompressed wav?
    Quote Quote  
  9. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    That is not remux, but convert.. Use preset above, double-click it in the preset manager, go to audio page, select "pcm_s16le" as codec, clear bit-rate field, and you're done.

    ///3AAAAeNpFjN0KgkAQhe8F38EHGGoUtR/Yi9XuogiiqwjRdb
    Ml/3JV8O0blyQYzsA53zn3tpNa9g/bUjm7ntfj4aYjzqNjWnAu
    kIQzZlt1WkkWN+3kjCqXDThumKneucQnJx1y1diW8RPR5FIwQa
    BtveWUPDsqagYACD4u1GdIS9VPDGETUBDu5tQn2aHhSFyCzfJv
    shVVot2wlIv939gS2r+GKtPMNKGtC/MDBG/+HgS0B4h7cytE/A
    LTpUfk

    Please note that ffmpeg does not allow PCM in the MP4 container, use MKV instead.
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  10. Thank you, Torben.
    What tool to create MKV files with PCM audio?
    Quote Quote  
  11. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    FFqueue.. In the job editor you can simply change the extension of the output-file to .mkv instead of .mp4 and you're in business!
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  12. Thanks, however it doesn't work. The 2.4 Gb xxx.ts file was converted in less than a second to 123.7Kb xxx.mkv file, which is unplayable. Probably only a certain mkv header was created. The xxx_log.htm says:

    Starting FFMpeg 2015/24/01 21:27:37 with command: -hide_banner -i "D:\Movies\Music\Symphonies\בר רד הייטי ק - ברלין פילהרמו יק - הראשו ה של גוסטב מהלר.ts" -map 0:0 -map 0:1 -c:v copy -c:a copy "D:\Movies\Music\Symphonies\בר רד הייטי ק - ברלין פילהרמו יק - הראשו ה של גוסטב מהלר.mkv"
    [h264 @ 00000000002ebe40] mmco: unref short failure Last message repeated 1 times Input #0, mpegts, from 'D:\Movies\Music\Symphonies\בר רד הייטי ק - ברלין פילהרמו יק - הראשו ה של גוסטב מהלר.ts': Duration: 01:02:59.85, start: 10.000000, bitrate: 5591 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x1100]: Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 384 kb/s Output #0, matroska, to 'D:\Movies\Music\Symphonies\בר רד הייטי ק - ברלין פילהרמו יק - הראשו ה של גוסטב מהלר.mkv': Metadata: encoder : Lavf56.15.103 Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 384 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [matroska @ 00000000063b06e0] Can't write packet with unknown timestamp av_interleaved_write_frame(): Invalid argument [matroska @ 00000000063b06e0] Can't write packet with unknown timestamp
    frame= 5 fps=0.0 q=-1.0 Lsize= 124kB time=00:00:00.04 bitrate=25350.8kbits/s
    video:161kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Conversion failed!
    FFMpeg exited 2015/24/01 21:27:37, running time 00:00:00.160
    Successfully completed with 1 lines of statistics!

    The strange characters are because of the name of the xxx.ts file is in Hebrew.
    Quote Quote  
  13. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    You are using a preset that remuxes both audio and video unchanged to the output. If you need to convert audio to PCM, please select the preset provided earlier (you need to select it in the job editor).
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  14. Thanks, however it doesn't work.
    I used the first preset, changed audio to PCM:

    [preset]
    id=SN/vDUsBAABKagAAc0gAAA==
    name=Remux video, PCM encode audio
    video_codec=copy
    key_frames=,,,0,40
    video_quality=0,75,0,69,0,44,0,90,0,40,0,10
    audio_codec=pcm_s16le
    audio_rate=128,1,,,
    audio_quality=0,80
    thumbs=0,0,1,png,0,1,50,20,1,2,5,10,00:00:00.000

    FFQueue gives me an error message:

    av_interleaved_write_frame(): Invalid argument
    [matroska @ 0000000004cd00a0] Can't write packet with unknown timestamp
    frame= 5 fps=0.0 q=-1.0 Lsize= 124kB time=00:00:00.04 bitrate=25367.2kbits/s
    video:161kB audio:6kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!
    FFMpeg exited 2015/24/01 21:53:00, running time 00:00:00.180
    Successfully completed with 1 lines of statistics!
    Quote Quote  
  15. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    In ffqueue's job editor please try to modify the FFMpeg command line to:

    Code:
    -fflags +genpts <%inputs%><%preset%><%output%>
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  16. Thank you,
    I did it but got the same error message.
    Quote Quote  
  17. Member
    Join Date
    Jul 2014
    Location
    Denmark
    Search Comp PM
    Dunno what to do then. Seems like it is a known issue:

    https://trac.ffmpeg.org/ticket/1979
    I'm the developer behind FFQueue. My posts might reflect this! ;-)
    Quote Quote  
  18. From the above link it seems that it works with ffmpeg in command line.
    Can you please suggest a command line for my needs?
    Thank you.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!