News for hackers. Stuff that matters.
Re:Show HN: Fileshifter – Easily convert files and videos be... by stevemk14ebr on Saturday April 07, 2018 @07:10PM (#16783585)
Will this be open-sourced? I'd like the idea of a self-hosted version of this. Good work!
Re:Show HN: Fileshifter – Easily convert files and videos be... by bo1024 on Saturday April 07, 2018 @10:15PM (#16784215)
If you run Linux, you can use `ffmpeg` and `convert` to duplicate the functionality of this site locally. For example

    $ convert input-file.jpg output-file.pdf
    $ ffmpeg -i input-file.mov output-file.mp4
Re:Show HN: Fileshifter – Easily convert files and videos be... by ldjb on Sunday April 08, 2018 @04:29PM (#16788167)
For the video, you'd probably want to do a stream copy, which will retain the original quality and save you from having to potentially wait a long time for it to encode:

  $ ffmpeg -i input-file.mov -c copy output-file.mp4
This works if the output container format supports the codecs used by the input file, which should be the case for most mov->mp4 conversions.
Re:Show HN: Fileshifter – Easily convert files and videos be... by khedoros1 on Saturday April 07, 2018 @11:08PM (#16784413)
I've seen you mention those tools a couple times. I'm familiar with ffmpeg. Does convert also cover the MS Office file formats, as this tool purports to?
Re:Show HN: Fileshifter – Easily convert files and videos be... by jncraton on Sunday April 08, 2018 @12:11AM (#16784570)
The convert tool is part of imagemagick and only works on image formats as far as I know. I personally use pandoc to do similar conversions on documents and ssconvert for spreadsheets.
Re:Show HN: Fileshifter – Easily convert files and videos be... by khedoros1 on Sunday April 08, 2018 @12:38AM (#16784638)
That's kind of what I thought. Although I'm aware of imagemagick itself, I didn't know that convert was provided by it. Thanks for the clarification.
Re:Show HN: Fileshifter – Easily convert files and videos be... by systoll on Sunday April 08, 2018 @07:54AM (#16785742)
No. For office formats there's unoconv

https://github.com/dagwieers/unoconv

Re:Show HN: Fileshifter – Easily convert files and videos be... by bo1024 on Sunday April 08, 2018 @01:26AM (#16784761)
I missed the MS formats -- sorry! I don't know off the top of my head, but doubt it. libreoffice should though.
Re:Show HN: Fileshifter – Easily convert files and videos be... by mtusman on Saturday April 07, 2018 @07:22PM (#16783639)
Thanks for your feedback. Really appreciate it. I’m looking into open sourcing some features it in the coming weeks and I’ll post an update on the website when that happens, so just keep checking.
Re:Show HN: Fileshifter – Easily convert files and videos be... by fvargas on Saturday April 07, 2018 @07:25PM (#16783653)
Just curious, why would you want to self-host it?
Re:Show HN: Fileshifter – Easily convert files and videos be... by stevemk14ebr on Saturday April 07, 2018 @09:23PM (#16784027)
Many reasons. Primarily because of security and control of my information. Secondly because services like these tend to be short-lived and unreliable, if i host it myself i can trust it's there when i need it. And i hadn't considered the uploading time issue mentioned in a previous comment, but that is actually a very good point that self-hosting would solve as well.

I also just want to see the code because i think it's cool

Re:Show HN: Fileshifter – Easily convert files and videos be... by natch on Saturday April 07, 2018 @10:16PM (#16784221)
>I also just want to see the code because i think it's cool

This is not "the" code but here's a script. I can't take credit for it... I don't remember but I probably cobbled it together by taking stack overflow code and making it more friendly. First, you need ffmpeg (ymmv.. this assumes macOS, for others installing ffmpeg is also possible but left as an exercise for the reader):

    $ brew install ffmpeg
Then:

[edit: fixed some typos]

    #!/bin/bash

    export OLD_IFS=$IFS
    export IFS=''

    mkdir -p converted
    for a in *.{webm,mkv,ts} 
    do
        ffmpeg -i "$a" -c:v libx264 -preset slow -crf 20 -c:a libvo_aacenc -b:a 128k "$a.mp4"
        if [[ $? == 0 ]]; then
            mv "$a.mp4" converted
        fi
    done
    export IFS=$OLD_IFS
Save as convert-to-mp4.sh then run it in a directory containing files of undesirable types like .webm

Not saying this is perfect. Take it as a proof of concept. And there's no web UI, nor would I want one. Suggestions for tweaks welcome.

Re:Show HN: Fileshifter – Easily convert files and videos be... by josephfrazier on Saturday April 07, 2018 @11:53PM (#16784522)
> First, you need ffmpeg (ymmv.. this assumes macOS, for others installing ffmpeg is also possible but left as an exercise for the reader):

> $ brew install ffmpeg

FWIW, there's a `brew` fork for linux: https://github.com/Linuxbrew/brew

It's not especially useful in this case as ffmpeg is available in linux package managers, but it's handy for tools that aren't.

Re:Show HN: Fileshifter – Easily convert files and videos be... by fvargas on Sunday April 08, 2018 @04:28PM (#16788162)
Yeah, the primary benefit I see is if one fully audits the code and any future updates. Otherwise, self-hosting doesn't confer much in the way of guarantees for security or privacy.
Re:Show HN: Fileshifter – Easily convert files and videos be... by wanderfowl on Saturday April 07, 2018 @09:05PM (#16783971)
For me, often, it's just a bandwidth issue. If a colleague has a 12 GB movie they'd like to transmute, a local app might be a possibility, but an hour long upload followed by a 20 minute long download won't be.
Re:Show HN: Fileshifter – Easily convert files and videos be... by fvargas on Sunday April 08, 2018 @01:22AM (#16784750)
The creator mentions in another post that the service does indeed upload the data to a server for processing. But, in general, it being a web app doesn't mean it uploads your data any more than a locally run application might. A web app can just as well do the processing in the browser without it ever leaving your machine.
Re:Show HN: Fileshifter – Easily convert files and videos be... by metaobject on Sunday April 08, 2018 @09:10AM (#16785931)
Using a web app requires one to upload their file 100% of the time. Using a local app requires one, I'd expect, to upload their file 0% of the time.
Re:Show HN: Fileshifter – Easily convert files and videos be... by fvargas on Sunday April 08, 2018 @11:33AM (#16786544)
On what are you basing these expectations? Uploading means transmitting data to a third party. One could write a CLI that does just that. One could also write a web app where the processing takes place in the browser and the data never leaves the machine.

The difference is the web app runs within the browser sandbox while the CLI executes with user permissions.

Re:Show HN: Fileshifter – Easily convert files and videos be... by khedoros1 on Saturday April 07, 2018 @11:06PM (#16784410)
Well, that, plus whatever the conversion time would be.
Re:Show HN: Fileshifter – Easily convert files and videos be... by croon on Saturday April 07, 2018 @07:35PM (#16783682)
Not op, but for myself, not having any way of knowing if the service reads or retains any information from my files (outside of the core purpose) would limit the amount of data I would be willing to put through the service.