Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: Help with FFMPEG, have been researching for 7 hours....

Help with FFMPEG, have been researching for 7 hours.... 1 week, 4 days ago #204633

Hi everyone, basic skills here but the ability to learn, quickly... Have been trying for the last 8 hours to solve a Handbrake problem with FFMPEG.

PROBLEM>>>Handbrake is adding a few black frames at the front of almost every video I run through it. Essentially what I'm trying to do is convert and compress videos to a single format, settings, etc. We shoot mixed device and have to merge and collect all the content for post-production.

I've tried changing Handbrake to "seconds" ver "chapters" but cannot seem to get that to work in batch. So I moved on to FFMPEG.

I have been trying to very simply trim 1 to 2 seconds of ALL the videos in a single folder and cannot make it work. This is what I've been using for command from within the folder in Terminal on OSX.

>>> or i in *.MP4; do ffmpeg -ss 2 -i "$i" -y "${i%}.MXF"; done

Which is basically my trying to combine two commands that work individually. One for a single file and one for a folder.

>>> -ss 2 -i filename.mp4 -c copy filenameoutput.mp4

and

>>> for i in *.MP4; do ffmpeg -i "$i" -r 50 -c:v mpeg2video -pix_fmt yuv422p -profile:v 0 -level:v 2 -b:v 50000k -maxrate 50000k -bufsize 3835k -minrate 50000k -c:a pcm_s24le -ar 48000 -y "${i%}.MXF"; done

Ultimately, if there is a way I can ditch Handbrake and set up some sort of watch script that sits on a folder using FFMPEG that converts whatever is dumped into that folder, that's what I want to do. If that cannot be done I'd settle for going through Handbrake, separating the videos that have the added black and then trimming with FFMPEG.

Thank you in advance!

Re: Help with FFMPEG, have been researching for 7 hours.... 1 week, 4 days ago #204636

  • RWAV
  • Moderator
    Pro User
  • OFFLINE
  • Moderator
  • Posts: 6292
  • 1 week, 4 days ago
Ffastrans is ff based and does have a watchfolder capability.

With the volume work described - perhaps a non-free professionally focused application like
Intertake from Acrovid - would allow presets for all the acquisition variants used and easy access to efficient high quality edit friendly codecs.

www.ffastrans.com

acrovid.com
BETA System
Microsoft Windows 7 Professional 64BIT
HP Z800 Workstation

Re: Help with FFMPEG, have been researching for 7 hours.... 1 week, 4 days ago #204638

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 20559
  • 1 week, 4 days ago
Hello,

First, if your footage, the camera recorded material, is importable and playable in Lightworks, there's no need to convert. Second, if even the originals should show some black frames on the very beginning, it would be much easier and faster to trim them in Lightworks than with ffmpeg or Handbrake, because with Lightworks you see what you do, whereas with ffmpeg or Handbrake you don't.

Thus, my question: Why do you convert?
It's better to travel well than to arrive...
Last Edit: 1 week, 4 days ago by hugly.

Re: Help with FFMPEG, have been researching for 7 hours.... 1 week, 4 days ago #204639

Converting because I have to normalize different file types from many devices all to 1080p60 MP4. I have to solve it this way because I need to ultimately set up a watch folder so this is done automatically.

Re: Help with FFMPEG, have been researching for 7 hours.... 1 week, 4 days ago #204641

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 20559
  • 1 week, 4 days ago
Ah, ok.

From your command lines above, I suspect that you run Linux or OSX.

I think, FFtrans linked to by RWAV is a tool which is designed to automate conversion workflows, including watch folders, but sames as this software from Intertake, it's Windows only and I don't know if they will run under Wine.

If you don't need complicated decisions on the fly and have one source and one destination folder, together with one ffmpeg command line, some shell script controlled by a cron job might be sufficient?
As described for a file copy here:
superuser.com/questions/678191/copy-new-files-from-a-monitored-folder-to-another-in-debian

The line ' cp -vu "$source"/* "$target"/ ' would have to be replaced with a ffmpeg command line.
It's better to travel well than to arrive...
Last Edit: 1 week, 4 days ago by hugly.
  • Page:
  • 1
Time to create page: 0.32 seconds
Scroll To Top