Hi guys,
I want to merge a number of mp3 files with the same image to create corresponding mp4 files (one mp4 file for each mp3 file). I also want the metadata in the audios to follow to the mp4 files. I also want the image to be in as high quality possible but not to the extent where it leads to ridiculously large files and slow processing.
I have all audio files and the image in the same folder and I'm using the below batch-script but am having some difficulties.
Code:for /R %%g in ("*.mp3") do ( ffmpeg -r 1.0 -loop 1 -i "Main.jpg" -i "%%g"^ -map_metadata 1^ -map_metadata:s:v 1:s:v^ -map_metadata:s:a 1:s:a^ -c:a copy -c:v libx264 -preset superfast -tune stillimage^ -shortest "%%~dpng.mp4" )
I get the following error on some files: "track 1: muxing mp3 at *** is not standard".
Could someone advise on how to best address this in bulk to achieve my objectives without losing audio quality?
Should I re-encode or stream copy all audios first? Can I do it in the same instance as I merge the files?
Any suggestions on scripts?
Many thanks
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 4 of 4
			
		- 
	Last edited by DennisO; 26th Nov 2018 at 17:13. Reason: Code tags 
- 
	Please wrap your command in code tags to get rid of the smilies. 
- 
	As far as I know, MP4 container normally accepts only one AVC video stream and one AAC audio stream, anything else (including MP3) is non standard. 
 I still consider myself a beginner with ffmpeg, and this is something I've never attempted, but perhaps the same command would work with a .mkv output. MKV container can accept almost anything (including MP3). If the MP4 format is a requirement, transcoding the audio would seem mandatory.
 
 What particular metadata ?I also want the metadata in the audios to follow to the mp4 files.
 
 That can be affected by the -crf parameter. Apparently (see x264 --fullhelp) the default value is -crf 23, which is medium quality {*}. For a still picture it should be quite good, but it could be slightly better with -crf 18 for instance. The file sizes would be larger but not by an excessive amount, while the processing speed would be similar (I guess). The -preset switch affects the processing speed – from what I understand, a slower processing preset reduces the size of the encoded file at the same quality settings, or improves the quality at the same average bitrate setting. So if you want speed and quality, a combination of -preset superfast and a lower CRF value (lower CRF means higher quality) should do the trick.I also want the image to be in as high quality possible but not to the extent where it leads to ridiculously large files and slow processing.
 
 {*} Although this may be different in ffmpeg. Under “libx264 AVoptions” I see :
 “-crf <float> E..V..... Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)”
 I don't know what “-1” means here.
 (With ffmpeg -h full >"E:\ffmpeg_help_full.txt" you can get the complete integrated help – and I mean complete, that's a 800KB text file, about as big as a phone book...)
 
 
 (This thread would be better placed in “Video conversion” or “Audio conversion”.)Last edited by abolibibelot; 28th Nov 2018 at 08:21. 
Similar Threads
- 
  How do I create a video file with a directly accessible audio track?By risingSilence in forum Video ConversionReplies: 1Last Post: 1st May 2018, 17:26
- 
  Audio track drops when i use AAC passthru to convert a video with mp3 or dtBy lalit.jindal885 in forum Video ConversionReplies: 4Last Post: 27th Apr 2017, 02:26
- 
  How to create a "neutral sequence" at the beginning of a video track ?By csosog in forum EditingReplies: 0Last Post: 7th Aug 2015, 08:24
- 
  Merge mp3+png into a video file format?By denart5 in forum Video ConversionReplies: 3Last Post: 27th Nov 2014, 16:49
- 
  Software for syncing and muxing audio track with video track?By uranometria in forum Video ConversionReplies: 1Last Post: 21st Jul 2014, 02:52


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote
