VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. let 1% = sss.mp4

    ffmpeg.exe -i %1 -y -acodec copy
    doesnt work and it says that i need to put at least 1 file name

    ffmpeg.exe -i %1 -y -acodec copy xxxxx
    doesnt work and it says that it is unable to find a suitable file format

    ffmpeg.exe -i %1 -y xxx.mp3
    works but this is not the one i want, i do not want to do re-codecking. so there is no point to put any output file name asociated with its extension.
    I want an extraction, whatever the file's original sound format was, i want to have that as an auto-output with its original format extension.
    how can i extract the sound?

    ffmpeg.exei %1 -y -acodec pcm_s16le -ar 44100 "%4".WAV
    why do i need this ? -acodec pcm_s16le

    if extraction is not possible,
    ffmpeg.exe -i %1 -y xxx.WAV , is this WAV output here as close as the original file format?
    Last edited by sommers; 5th Jun 2017 at 11:29.
    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    ffmpeg want you to specify an output filename, including suffix, which often also implies a multimedia format. So I think you'll have to do it in two steps: first detect, then demux -- if you want to keep the original format in all cases. If you allow for conversion, then it is easier, as you can specify the output you want, regardless of input; but conversion takes longer. Sometimes you just need more than one line of code.

    ffmpeg -i %1
    e.g.: Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)

    ffmpeg -i %1 -y -vn -acodec copy "%4".m4a

    Container format (.m4a) based on the detected audio codec (aac).

    (Please note that this is posted in an archived forum on the shareware macOS GUI ffmpegX application, not the command line tool ffmpeg which it uses.)
    Last edited by Case; 3rd Jun 2017 at 09:19.
    Quote Quote  
  3. Mod Neophyte Super Moderator redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    ffmpegX is a Mac only program.
    Probably better asked and answered in Newbie/General Forum.

    Moving you.

    Moderator redwudz
    Last edited by redwudz; 3rd Jun 2017 at 21:03.
    Quote Quote  
  4. >> ffmpeg -i %1 -y -vn -acodec copy "%4".m4a

    i will get back to this problem later as to what it can do, i am too busy making batch files associated with for %%v do () with some error controls in them, for %%v do () doesnt understand the hidden files so i have to use "token=*" approach.

    when i look at m4a extension.... i feel damn, why is extraction so more difficult than recodecking commands... someday i will know...
    Quote Quote  
  5. aa=ffmpeg.exe -i %1 -y -vn -acodec copy xxx.m4a
    aa=ffmpeg.exe -i %1 -y -vn -acodec copy xxx.aac
    cc=ffmpeg.exe -i %1 -y -vn -acodec copy xxx.mp3
    dd=ffmpeg.exe -i %1 -y -vn -acodec copy xxx.ac3

    1. source video file has aac, mp4a
    aa= makes xxx.m4a fast, but bit rate is fixed, plays in a little special audio player

    2. source video file has aac, mp4a
    bb= makes xxx.aac fast, but bit rate changes. winamp plays

    3. source video file has aac, mp4a
    cc= doesnt make mp3, causes an error.

    4. source video file has mp3
    cc= makes xxx.mp3 fast. winamp plays

    5. source video file has ac3
    dd= makes xxx.ac3 fast. plays in a little special audio player

    "makes fast" above means taking about 30 seconds for 2 hour long video, so i conclude this as a direct copy.

    now i think
    -acodec copy means stream copy, or direct copy, or extraction of as it is. and means no recodecking. but as you said, i have to detect the format first and then insert the found extension.

    -acodec copy means in document
    Force audio codec to codec. Use the "copy" special value to specify... this was so unintuitive, what special value?... and so on.


    ps: i wrongly wrote intuitive at 1st post, what i meant was unintuitive, not intuituve
    Last edited by sommers; 5th Jun 2017 at 11:14.
    Quote Quote  
  6. so when you use -acodec copy command, you must not use −ab 300k together, it might not ignore −ab 300k and it might do recodecking for hours.
    Quote Quote  
  7. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by sommers View Post
    3. source video file has aac, mp4a
    cc= doesnt make mp3, causes an error.

    "makes fast" above means taking about 30 seconds for 2 hour long video, so i conclude this as a direct copy.

    now i think
    -acodec copy means stream copy, or direct copy, or extraction of as it is. and means no recodecking. but as you said, i have to detect the format first and then insert the found extension.

    -acodec copy means in document
    Force audio codec to codec. Use the "copy" special value to specify... this was so intuitive, what special value?... and so on.
    I donít know what document you are referring to?
    -acodec copy copies the audiostream as-is, but will error if you instruct it to do something impossible (such as copy AAC audio into an MP3 file).

    AAC audio should go in an MP4 container: .m4a, .mp4, .3gp, or a raw stream file (no meta-data) (.aac) or a container that will carry AAC as part of the supported multimedia (e.g. .mkv, .mov).
    MP3 audio should go in an MP3 container: .mp3, or a container that will carry MP3 as part of the supported multimedia (e.g. .mkv, .avi, .mov).

    Originally Posted by sommers View Post
    so when you use -acodec copy command, you must not use −ab 300k together, it might not ignore −ab 300k and it might do recodecking for hours.
    You canít copy as-is *and* specify a detail to be a certain way. Either copy as-is, or re-encode to specification. In your example, -acodec copy is honoured, and the bitrate specification is ignored (with current ffmpeg).
    Quote Quote  
  8. Its dependent on the format of the audio stream.

    For example, a VOB that has an AC3 stream, I use:

    ffmpeg -i "video.vob" -c:a copy "audio.ac3"

    This would take the AC3 audio from the VOB and save it to an audio file with AC3 file extension. This is given that the VOB has only 1 audio track and you dont need to map out which audio stream you want.


    Tell us about the file and we can offer better assistance.

    However, an MP4 typically has an AAC audio stream, however MP3 is legal
    VOB typically has an AC3 audio stream, but PCM is not uncommon
    MKV could be *anything*, since the container supports... "anything"

    Download and check the file with mediainfo, Ive found it to be almost 99% accurate.

    HTH,
    Andrew
    Quote Quote  



Similar Threads