axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
1.92k stars 105 forks source link

FFmpeg Options > ProRes convert? #593

Closed gordingus closed 7 months ago

gordingus commented 8 months ago

Tartube is such a great tool! Very feature-rich in a way that I haven't found yet. I'm curious if there's a way to tell FFmpeg to convert to ProRes 422 within its options? I see H264, Gif, Video clip,... etc. in the Output section of the Settings tab in the FFmpeg Options window.

What I'd like is an option to convert to ProRes .mov, which should be possible with FFmpeg according to this page in their documentation.

Alternatively, is there a way to custom edit the system command? Not to add extra using the text box above, but alter the command below?

I know there are alternate ways to convert to 422. Currently I take Tartube's outputs and run them through Shutter Encoder to get them all into ProRes 422. But I downloaded Tartube to fit the whole pipeline into one solution. And it's so close! The functionality is there, I just don't see the option (maybe I'm missing something though!)

axcore commented 8 months ago

I'm curious if there's a way to tell FFmpeg to convert to ProRes 422 within its options?

The FFmpeg options window is limited, because I literally copied the interface from another project; I wouldn't have been able to design it myself. For that reason, I would be hesitant to start adding new features that I don't understand. (It would be OK if someone with a deep understanding of video would design the changes, leaving me just to add the code.)

With that warning out of the way, it should be possible to add any options you like. In this screenshot I have added -c:v prores_ks - now there are two -c:v switches, but the second one should override the first one, so the first one doesn't matter.

("Should" means "I haven't actually tested that".)

prores

If you're talking about an option for "writing my own FFmpeg command, and ignoring everything else in all of this window's tabs", I think that's not possible at the moment, but would be simple enough to add.

If what you're really looking for is a one-step solution, then you can pass FFmpeg commands directly to yt-dlp, which will apply them to the videos it downloads. This bypasses Tartube's FFMpeg options window completely.

See the yt-dlp documentation, the switch you want is --postprocessor-args. I haven't used this very often so I wouldn't be confident in writing the command for you; the Reddit youtube-dl page is an excellent place to find help with questions such as these.

To give Tartube the --postprocessor-args, either use Edit > General download options... > Post-processing > Arguments to pass to the post-processor, or just add it to the Additional download options box in the Name tab.

(Note: if you can't see a Post-processing tab, then you need to click the Show advanced download options button, also in the Name tab.)

gordingus commented 8 months ago

Wow, you are fantastic! Thank you for the quick, thorough, multi-pronged answer. The first solution seems to have nailed it! I added that to the extra command lines, and then I also had to add ".mov" to the Change file extension and we're in business :)

I'll reference the --postprocessor-args section if I want to go deeper. Much appreciated!

axcore commented 8 months ago

Hopefully you've noticed that, in Tartube's Videos tab, you can select multiple videos, then right-click to open the FFmpeg options window, and the operation you set up will be performed on all the selected videos.

You might also note that yt-dlp also behaves like FFmpeg. If you specify --something X --something Y, then --something X is ignored - with a few exceptions, one of which happens to be --postprocessor-args.

gordingus commented 8 months ago

Yes, I love the option to batch process through FFmpeg! One thing I've run into after a few videos is that .webm files seem to error when I try processing them. That may be where I poke around in the postproccesor args (unless you know a reason they aren't friendly with ffmpeg)!

axcore commented 8 months ago

No idea about that, I'm afraid. Try processing a specified set of videos from a specified URL, so that I can try converting the same set of videos.