Batch transcoding VP9 and x264

Questions and answers on how to get the most out of FFAStrans
Post Reply
Koati
Posts: 9
Joined: Tue Jun 06, 2017 7:05 am
Location: Kirkkonummi-Finland

Batch transcoding VP9 and x264

Post by Koati »

Hi,

I'm trying to figure out how to batch transcode short, max. 10 seconds DNxHD mxf's to VP9 webm and x264 mp4's in FFAStrans.
I have no glue where to start so could someone help me to get started?
emcodem
Posts: 1631
Joined: Wed Sep 19, 2018 8:11 am

Re: Batch transcoding VP9 and x264

Post by emcodem »

For VP9 you can use the "Custom FFMPEG" processor with these settings in the textbox (and very important, set extension bottom left to webm):
-c:v libvpx-vp9 -b:v 2M
For x264 mp4 you can use the built in "H264" processor.

It is hard to guess for me what you want to do, so i need some more input from you to help you getting started.
Just as a shot in the dark, i can explain what processors you could use for example in a workflow:
Monitor(File) -> encode VP9 -> Deliver to Folder -> encode mp4 -> Deliver to Folder
If you have enough cpu, you could also do the 2 encodes in paralell...
emcodem, wrapping since 2009 you got the rhyme?
Koati
Posts: 9
Joined: Tue Jun 06, 2017 7:05 am
Location: Kirkkonummi-Finland

Re: Batch transcoding VP9 and x264

Post by Koati »

Hi emcodem!

Sorry, I'll try to explain this problem a little bit more precise.

I'm editing multiple, max. duration 10 seconds videos in free version of Davinci Resolve 16 in 720x1280 resolution.
After the editing is finished I export videos in 720x1280 res. from DR16 to DNxHR LB MXF (not to DNxHD as I mentioned in earlier post).

The goal is to view these videos in mobile phone so I need to transcode them to VP9 webm's and x264 mp4's and the maximum allowed file size is 5 Mb.

So I'm trying to figure out a way to batch transcode those MXF-clips to webm (VP9) and mp4 (x264) at once.

Ideal workflow would be a watch-folder to which I drop video_01.mxf, video_02.mxf so on and then there is two encoders which transcodes them to webm and mp4 and delivers to a final folder.

But because I have so little knowledge about FFmpeg I can't figure out which settings I should use in "Custom FFMPEG " processor to get this delivered.
emcodem
Posts: 1631
Joined: Wed Sep 19, 2018 8:11 am

Re: Batch transcoding VP9 and x264

Post by emcodem »

Well i guess setting a bitrate of 4.5MBit/s should keep your output file under 5MB.
I assume you have no problem with using watchfolder and the h264 encoder node and the deliver nodes, so basically all you need is the settings for the custom ffmpeg encoder for webm.

No Audio (-an setting)
-c:v libvpx-vp9 -b:v 4.5M -an

That should do it, this is exactly what you write into the big textbox of the custom ffmpeg proc. As said, make sure you write webm into the extension box in the custom ffmpeg proc.
With above settings, you will get an output file with the same resolution and framerate as your dnxhd input is. The "an" setting defines that you don't want audio in the output stream.
Note that the vp9 encoding will run extremely slow on CPU, most likely at least 2 minutes for the 10 second video.
emcodem, wrapping since 2009 you got the rhyme?
Koati
Posts: 9
Joined: Tue Jun 06, 2017 7:05 am
Location: Kirkkonummi-Finland

Re: Batch transcoding VP9 and x264

Post by Koati »

Hi!

Tried this and got "Encoding failed-no video or audio found in media" error in webm node. Built in "H264" processor works fine.
Do I have to check the video codec box also and write codec to textbox also?
Attached xml-file also for viewing.

MXFtoVP9.xml
(6.26 KiB) Downloaded 358 times
emcodem
Posts: 1631
Joined: Wed Sep 19, 2018 8:11 am

Re: Batch transcoding VP9 and x264

Post by emcodem »

Yeah, the boxes should be unchecked, but to be honest i cannot reproduce your problem, the workflow you uploaded works for me right away... ?
emcodem, wrapping since 2009 you got the rhyme?
Koati
Posts: 9
Joined: Tue Jun 06, 2017 7:05 am
Location: Kirkkonummi-Finland

Re: Batch transcoding VP9 and x264

Post by Koati »

I think I got it! Checked video codec checkbox and wrote libvpx to textbox and now it's working.
Thanks for your help emcodem, I think I'm slowly figuring out how this works.
Post Reply