Note - If you're doing it as a batch file, instead of cmd directly, use 2 "%%" instead of 1 "%"
orCode:for %%a in ("*.mp4") do ffmpeg -i "%%a" -c:a copy "%%~na.aac" pause
Code:for %%a in ("*.mp4") do ffmpeg -i "%%a" -c:a copy -absf aac_adtstoasc "%%~na.m4a" pause
But again, that' s just for MP4's with AAC audio ONLY . You can't use wildcards *.* for the output file extension
+ Reply to Thread
Results 31 to 60 of 216
-
-
So, this was the winner
PHP Code:FOR %%i IN ("*.mp4") DO (
echo %%i
ffmpeg -i %%i -vn -acodec copy "newfiles\%%i.aac"
)
sadly, the resulting filenames are formatted like this:
pier0.mp4.m4a
waip0.mp4.m4a
sourcefiles are
pier0.mp4
waip0.mp4
can i add a RENAME command to fix that?
can anyone tell me how exactly to do that?
would a FOR /L loop be better?Looking for subtitles of: Höök tt0997023, Lime tt0269480, La clé sur la porte tt0077348. tt=iMDb.com Found Desideria tt0081724 subtitle! :-) -
what does this do?
-c:a
and this?
copy -absf aac_adtstoasc
and the~na in
"%%~na.m4a"
thanks for replying.
EDIT:
your solution completely defeats the purpose of LOSSLESS ripping!!!! it takes hours and its a huge file
lossless aka without loss of quality and is FAST!!!Last edited by KneeRow; 13th Aug 2014 at 19:32.
Looking for subtitles of: Höök tt0997023, Lime tt0269480, La clé sur la porte tt0077348. tt=iMDb.com Found Desideria tt0081724 subtitle! :-) -
ON THE NAIL! you boys are da bomb, thanks.
Code:FOR %%i IN ("*.mp4") DO ( echo %%i ffmpeg -i %%i -vn -acodec copy "newfiles\%%~ni.m4a" ) REN newfiles\?.mp4.m4a ?.m4a REN newfiles\??.mp4.m4a ??.m4a REN newfiles\???.mp4.m4a ???.m4a REN newfiles\????.mp4.m4a ????.m4a REN newfiles\?????.mp4.m4a ?????.m4a REN newfiles\??????.mp4.m4a ??????.m4a
If you happen to know a decent explanaton of ffmpeg commands, as in, for dummies, that would be great.
cos I've seen the one baldrick gave and it's not all that user friendly.Last edited by KneeRow; 14th Aug 2014 at 07:55. Reason: procrastination
Looking for subtitles of: Höök tt0997023, Lime tt0269480, La clé sur la porte tt0077348. tt=iMDb.com Found Desideria tt0081724 subtitle! :-) -
This seems inconsistent with: if it's not possible, then how does demuxing work? that produces the original streams, as-is, or as-was.
perhaps I was saying lossless when I should've said stream copy.
Forgive me I was imprecise, but in the grand scheme of things, on average, by the by and largely, all these concepts (demuxing, lossless, stream copy, extracting only audio) seem to boil down to the same thing for me, or even ARE the same.
"Or if you want to remove adts header"
Why would I wanna do that? the relevance of that remark HERE is unclear to me. and why did you add this "-c:a copy -absf aac_adtstoasc" ???
that was the exact opposite of what I asked.
Look, if it can't be done, it can't, it seems stupid to me because, inconsistencies, but hey.
Next question:
can ffmpeg detect the type of audio and use that information as input elsewhere?Last edited by KneeRow; 14th Aug 2014 at 07:21.
Looking for subtitles of: Höök tt0997023, Lime tt0269480, La clé sur la porte tt0077348. tt=iMDb.com Found Desideria tt0081724 subtitle! :-) -
You're kind of making up your own definitions here based on a specific, limited subset of the actual meanings.
It can through scripting, and that's where it gets more complicated than a simple batch command.
And you're probably into a territory where you should start a new thread. -
Beware: muxing with an AAC extension doesn't necessarily mean the audio is AAC. I ran the batch command on an MP4 file with AC3 audio and it produced a file with .AAC as the extension. The audio was still AC3, of course.
-
Looking for subtitles of: Höök tt0997023, Lime tt0269480, La clé sur la porte tt0077348. tt=iMDb.com Found Desideria tt0081724 subtitle! :-)
-
What surprises me is that many programs can demux any stream, but that ffmpeg apparently can't?
It seems as if it can not detect whatever type of audio is in the mp4, and then save it as that.
so, for example if I had an mp4 with an ac3 audio, it should be able to save it as that. telling it what to save it as, seems superfluous for such an advance piece of software.
Why can't Fffmpeg do this?
You can use ffprobe to get information about the file, parse it, then ffmpeg to demux the audio appropriately.Looking for subtitles of: Höök tt0997023, Lime tt0269480, La clé sur la porte tt0077348. tt=iMDb.com Found Desideria tt0081724 subtitle! :-) -
-
I noticed when I was trying to use a batch subtitles were getting dropped. I found a solution:
Code:FOR %%a IN ("*.*") DO ffmpeg -i "%%a" -acodec libvo_aacenc -b:a 112k -vcodec copy -scodec copy "%%a.mp4"
-
Not sure how to do that, because you would need to parse with ffprobe to determine if subs exist
-
I have made a little javascript for ffmpeg helper, other developer can fork or update this script for all users,
this is the idea with video
http://grabanymedia.altervista.org/download-fragments-video-join-ffmpeg/
If you want check only the script you can find it here
http://jsfiddle.net/kjx2Lykg/2/
I hope this help and excuse me for my bad english -
Hello. 2 things.
With Zerano's build is it
-c:v h264
or
-c:v libx264
I'd thought it was the former. Is there any difference ?
I had read somewhere (posts last year) re
-c:a libvo_aacenc
that aac encoding quality was not all that great. Is this a new improved version or something ?
(also, nowadays, don't forget the flags -movflags +faststart to make it webby friendly by placing the MOOV atom at the front of the mp4 file)Last edited by hydra3333; 16th Dec 2014 at 21:52.
-
No difference. There is only 1 AVC encoder
I had read somewhere (posts last year) re
-c:a libvo_aacenc
that aac encoding quality was not all that great. Is this a new improved version or something ?
You need to use libfdk_aac for higher quality, but they are not compiled with zeranoe builds (licensing issues), you have to compile yourself -
I would like to know how to convert an FLV video to an mp4 video without converting the audio portion to AAC, i would much rather have the audio in mp2 or mp3 audio.
I have found out to do the conversion from FLV to MP4 but it converts the audio to AAC and that's not what i want. -
-ar is the audio sampling rate e.g. 22.05Khz . If you wanted to upsample to 44.1 or 48Khz you could change it
-c:a stands for audio codec, so in this case libmp3lame would use lame mp3 to encode mp3
What kind of video did you want ? Not all compression formats used in FLV are compatible in MP4 container, so you might not be able to "copy" the video (you might have to re-encode it). Here is an example of re-encoding the video. If the video used a compatible compression you could just copy it with -c:v copy
ffmpeg -i input.flv -c:v libx264 -c:a libmp3lame -b:a 128k output.mp4
-b:a is the audio bitrate; in this example 128k is 128kbps
-c:v is the video codec. In this example libx264 uses x264 to encode -
Well first off the flv uses x264 so i think i can copy the video but i wanted like mp2 or mp3 audio so i'll have a play around with these options. thanks
EDIT: ok I tried ffmpeg -i input.flv -c:v libx264 -c:a libmp3lame -b:a 128k output.mp4 but it just gave a bunch of crap that i dont understand. Is there a way i can make it so the output is logged in like a TXT file so i can upload it here for further inspection?
I dont know if i mentioned this, the FLV is using x264 codec for video and nellymoser codec for audio if this helps any.Last edited by SouthGaBoy; 28th Dec 2014 at 21:26.
-
How to modify the script to mux out all subtitles in all .mkv videos in a folder?
-
Apologies for digging up an old thread. i will start a new one if needs be.
These batches run great, but I've started adding them to the windows "send to" right click menu. Your batches work great when processing all files in a directory, but what if I want to just run an ffmpeg process on a single file, the one I right clicked on?
As an aside, my goal is an easier way to make framemd5 outputs.
Thanks! -
-
-
The command line you came up with says "for all files that match (the file you selected) do...." Since only one file has that name only that one file is processed. If there are a lot of files in the folder it might take a little longer to process since it has to evaluate the name of each file.
-
Use a batch demuxer like MKVcleaver.
Or do you want to remove the subtitles from the mkv?
Similar Threads
-
Best Way To Batch Convert DVR-MS and WTV Files
By dj4monie in forum Video ConversionReplies: 39Last Post: 25th Jun 2012, 19:17 -
Best way to batch convert xvid/avi files to mkv/x264 files?
By gaikokujinkyofusho in forum Video ConversionReplies: 1Last Post: 13th Jan 2012, 07:31 -
batch convert .mpg (MPEG2) files?
By shun in forum Video ConversionReplies: 2Last Post: 8th Jan 2009, 09:44 -
Hi, need a program to batch multiplex.
By mmdmmd in forum AudioReplies: 2Last Post: 18th Oct 2008, 14:50 -
Hi all, I need program to batch de-multiplex mpg files with 2 audio tracks
By mmdmmd in forum AudioReplies: 4Last Post: 14th Oct 2008, 16:57