Video url to Ffmpeg command line converter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Video url to Ffmpeg command line converter

    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:
    PHP Code:
    <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
Working...
X