-3

Want to batch convert a bunch of different video files from cli instead of Rolands old-and-slow-drag-and-drop-one-file-at-a-time-software. I have used ffprobe in OS X Terminal here. This shows us what the software did to the file and I want to do the same. MJPEG AVI I get but the rest, how would my ffmpeg syntax look to achieve this result efter converting?

Example: My ffprobe give me this

Input #0, avi, from 'P10_0001.AVI': Metadata: comment : encoder : Roland Corporation Duration: 00:03:17.64, start: 0.000000, bitrate: 16694 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 15285 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s

What would the ffmpeg syntax look like to do this with a new file.

I've been trying some simple ones but those are not accepted by the machine (Edirol p-10) and I hope someone can point me in the right direction. :)

Edit: OK. The syntax I want to do is involving 3 files.

  1. File that has the correct codec and everything to work with the machine. P10_0001.AVI

  2. A file that does not have the correct format (codec etc.) softvision.mpg

  3. A new file just as file 2 but with the codec of file number 1. P10_0002.AVI

  • You didn't actually explain what you are trying to do. Which information from `ffprobe` do you want to use in `ffmpeg` and why? What is your OS? – llogan Nov 20 '16 at 02:06
  • I want to convert a bunch of files (different formats) to MJPG AVI:s. I think that is stated in the ffprobe output. I have used OSX here but I have Windows XP or Linux Slackware if that is a better suited solution. Will update. – Margaret Montreux Nov 20 '16 at 09:14
  • Also the title is kind of a generic question which I haven't found answers to anywhere. How can I write it in a different way? – Margaret Montreux Nov 20 '16 at 09:17
  • Perhaps something like, "How to encode videos for Roland Edirol P-10?" Seems like a more direct question to me because that seems to be the actual issue. – llogan Nov 20 '16 at 18:49

2 Answers2

0

ffmpeg -i gradomat.mpg -framerate 25 -vf scale=640:480 -vcodec mjpeg -pix_fmt yuvj422p -b:v 15285k -b:a 1411k -acodec pcm_s16le -ar 44100 -ac 2 -metadata encoder="Roland Corporation" P10_000X.AVI

Think this solved it temporarily but the problem is that I have to write that my self, it would have been better if ffprobe gave me that syntax instead.

  • If these are the settings and format this Roland software outputs why not use this same command for the rest of the videos? `-framerate` is an input option for certain demuxers: use `-r` instead. `pcm_s16le` is uncompressed and will therefore ignore your bitrate so you can remove `-b:a 1411k`. – llogan Nov 20 '16 at 18:48
  • What do you mean? My question is how I generate a command from ffprobe. Now I have to read and try to figure out where and how to get the right option in the right place and was hoping there was a way to copy the settings of a file to create another file. The only answer I really understand is whole commands with full syntax that I can test. Sorry for being stupid. – Margaret Montreux Nov 20 '16 at 22:10
0

This is also a solution, but in python.

https://github.com/cskonopka/rolandp10fp