Video url to Ffmpeg command line converter

Started on the old forum in November 2016 · view the original in the archive · old links redirect here

No replies · 91 views · started 10 years ago · 1 min read

something else Fellow · 2,296 posts #1

I was using ffmpeg to convert a few video's from .m3u8 to .mp4 and needed a quicker way than copy and pasting. So i put together a quick javascript script and thought I would share it, as it may help others:

<input id="in" type="text" onkeyup="convert();"/><br/>
<input id="out" type="text"/>
<script>
var counter = 0;
function convert()
{
    var input = document.getElementById('in');
    var output = document.getElementById('out');
    output.value = 'ffmpeg -i "' + input.value + '" Vid-'+ counter + '.mp4';
    output.focus();
    output.select();
    document.execCommand('Copy');
    input.value = '';
    counter++;
}
</script>

It does copy to clipboard as soon as you have pasted the url in. However I'm not sure the copy function will work on other browser than chrome

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close