+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 16 of 16
			
		
- 
	http://skwire.dcmembers.com/fp/?page=playtime 
 Try it if it works for you.
 But it only shows you if there is audio or not in file. And bitrate and number of channels. Nothing more.
 
 Bernix
- 
	thank you but seems don't load .mxf video files. And if possible I need to change a state of a variable directly inside a batch: e.g. 
 
 HasAudioOrNot=YES
 
 HasAudioOrNot=NOT
- 
	for example Code:@ffprobe -v -8 -i "%1" -show_format -show_streams > "%~n1_format_streams.txt" 
- 
	Then perhaps https://trac.ffmpeg.org/wiki/FFprobeTips ? 
 Basically you searching something able to create dynamical script - perhaps you should investigate some scripting language? Python? Ruby?Code:@ffprobe -v error -select_streams a:? -show_entries stream=codec_type,channel_layout -of default=noprint_wrappers=1:nokey=1 "%1" 
- 
	Why don't you look through your dozen other batch files that do something similar and modify one of them? 
- 
	Is it some coincidence that the word 'batch' has the letters c.a.t. inside ? 
- 
	thank you pandy, your batch working and return for example: 
 
 everytime ffprobe find any Audio stream.Code:Audio Stereo 
 But now I have do some some prooof in partucular cases in witch unfortunately ffprobe may be unsuccessful because it fails totally the audio "seen" into the source file.
 
 For example in the case of this P2 camera source:
 
 https://www.dropbox.com/s/lzeesqc3kpgi0ko/PanasonicP2.MXF?dl=0
 
 in witch I cannot extract any audio because both ffmpeg (and ffprobe) and avisynth (with FFMS2 and LSmashSource) can not read any audio tracks.
 
 Meanwhile a vulgar way to determine if anyAudio is present or not, it might be to find any phrase called:
 
 by using theCode:Sampling rate : 
 
 inside the medianfo.txt responseCode:findstr /c:"Sampling rate :" "mediainfo.txt" IF NOT ERRORLEVEL 1 (set "ProbableAudio=1")
 
 In this case however I can know that any Audio is present, but I still did not find the way to extract it in a .wav at least Audio Channel 1 and 2
- 
	this will make stereo from two channels in mxf file: 
 so you can run this to get mkv:Code:ffmpeg -i video.mxf -map 0:1 -map 0:2 -c:a:0 pcm_s16le -c:a:1 pcm_s16le -filter_complex amerge audio.wav 
 Or just use mp4box to get MP4, not sure what you need or if Wav is ok in MP4, or just encode that wav into AACCode:ffmpeg -i video.mxf -c:v copy -an -sn video.m2v ffmpeg -i video.mxf -map 0:1 -map 0:2 -c:a:0 pcm_s16le -c:a:1 pcm_s16le -filter_complex amerge audio.wav mkvmerge -o video.mkv video.m2v audio.wav 
- 
	That was tested with Canon MXF, so perhaps. Or try other tracks 3, 4 , not sure how it is built. 
- 
	If you are still interested in Mediainfo CLI then it can give you what you wish also. Detailed instructions and functions are included with the zip when you download the CLI. Then pick any of the hundreds of audio attributes and create a template.txt with such as: 
 
 create a batch file with:Code:Audio;Audio Codec = "%CodecID%" Format = "%Format%"\r\n 
 
 You can of course incorporate variables and %%a, etc. for drag and drop, but what you will get is:Code:mediainfo.exe --Inform=file://C:\Users\Bud\Desktop\mp3video\template.txt C:\Users\Bud\Desktop\mp3video\PanasonicP2.MXF > output.txt pause 
 
 [Attachment 43620 - Click to enlarge]
 
 [Attachment 43621 - Click to enlarge]
 
 You can parse and import this information into batch variables. (https://stackoverflow.com/questions/3068929/how-to-read-file-contents-into-a-variable-...n-a-batch-file)
 
 This is only a rough outline but you should be able to adapt for what you want to do.Last edited by Budman1; 5th Nov 2017 at 01:30. 
Similar Threads
- 
  AutoBatcher: Batch file generator (AU3 source code)By tugshank in forum ProgrammingReplies: 0Last Post: 28th May 2017, 02:39
- 
  Would source file determine whether or not a file will playbackBy mdon in forum Video ConversionReplies: 5Last Post: 21st Jul 2015, 13:29
- 
  MeGUI help - Can't determine source typeBy kkiller23 in forum Newbie / General discussionsReplies: 11Last Post: 3rd Sep 2014, 14:30
- 
  Batch conversion with output to source locationBy scott488 in forum Video ConversionReplies: 6Last Post: 6th Dec 2013, 10:36
- 
  Determine original framerate of progressive sourceBy bobp127001 in forum Video ConversionReplies: 8Last Post: 2nd Mar 2013, 16:52


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

 Quote
 Quote 
			

 
			 
			