![]() This is a simple script and will ignore additional video streams if you input has more than one. Only re-encode if video is not H.264: #!/bin/bashĪudioformat=$(ffprobe -loglevel error -select_streams v:0 -show_entries stream=codec_name -of default=nw=1:nk=1 "$f")įfmpeg -i "$f" -c:v copy -c:a aac -movflags +faststart h264vids/"$.mp4" Otherwise, without these options, it will output: of default=nokey=1:noprint_wrappers=1 Select the default output format style and omit the key and wrapper info. ![]() show_entries stream=codec_name Only output the codec_name instead of all stream info. Otherwise the codec_name for all other streams in the file, such as audio, will be shown as well. select_streams v:0 Select only the first video stream. v error Omit extra information except for fatal errors. ![]() Use ffprobe Example command $ ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=nokey=1:noprint_wrappers=1 input.mp4 1 2 ffmpeg -i infile.avi youroutput.mp4 And this command will give you information about your input file the frame size, codecs used, bitrate, etc.: 1 2 ffmpeg -i infile.avi You can also play with the acodec and vcodec options when you generate your output.
0 Comments
Leave a Reply. |