Coder Social home page Coder Social logo

Comments (4)

boypt avatar boypt commented on August 19, 2024

you can do that by wraping what you need in a simple bash script, like this:

#!/bin/bash

if [[ ${CLD_DIR} != "file" ]]; then
  exit 0
fi

VIDEO="${CLD_DIR}/${CLD_PATH}"

ffmpeg -xx -xx -xx -i ${VIDEO} output.xxx.mp4

then make sure the script is excutable and configure the path in the DoneCmd config of simpletorrent.

from simple-torrent.

KabDeveloper avatar KabDeveloper commented on August 19, 2024

There is no built in package on golang?

What about switching time of the video to the last minute for example and torrent not yet fully downloaded?

Thanks again

from simple-torrent.

pataquets avatar pataquets commented on August 19, 2024

@bcashier You meant to transcode after finish downloading or while streaming?
If the latter, I think the script won't work, @boypt (unless I'm missing something). I guess we should reopen the issue, then, in case anyone wants to pick up or provide feedback.
To transcode while streaming, I think there's some code which might be useful from anacrolix/dms, which transcodes on the fly. Specifically in this file if my limited Go-fu is not mistaken.

from simple-torrent.

boypt avatar boypt commented on August 19, 2024

But transcoding needs the data stream to be in the original order, while bittorrent protocol doesn't work this way by default.
I do have an impression that some project achieve this by setting the first data block with higher priority so that the file downloads the the original order, this needs quite a little bit more code.

I found the other project streams torrents in the http stream form: https://github.com/WinPooh32/peerstohttp

maybe it's a better start for your requirement.

from simple-torrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.