Coder Social home page Coder Social logo

Comments (6)

msslava avatar msslava commented on June 23, 2024

PreDeToR, I also wanted to realize this. Have you found a solution?

from bmdtools.

PreDeToR avatar PreDeToR commented on June 23, 2024

Hi @msslava

Yes I found a bit of a work-around, not the prettiest of solutions but it works.

What I Did was
1)Capture the stream and stream it to a file using mpegts (This allows reading and timestamping of the file while its being written to), This file/process is reset once a day.
2)I then have a script that gets the duration of the above file and starts as new ffmpeg process to stream using the timestamp so that I am always starting at the end of the file, I have two of these processes as I needed to stream to two different locations and pull the audio out the source stream differently as the one channel as english and the other french.

This works perfectly fine, it just uses some extra cpu.

from bmdtools.

msslava avatar msslava commented on June 23, 2024

Hi, PreDeToR! Thanks for you reply.
An interesting idea with a temporary file. I want to record video from SDI and for me the main quality video. The mpegts can not this. How to be in this case?
Can you share your scripts for reference?, for me it would be very useful. Thank you!

from bmdtools.

PreDeToR avatar PreDeToR commented on June 23, 2024

@msslava

you can adjust the quality, my feeds aren't hd so its easy:

  1. /root/bmdtools/bmdcapture -C 5 -m 1 -A 2 -V 4 -M 2 -F nut -d 1 -v -f pipe:1 | ffmpeg -loglevel error -i pipe:0 -y -c:a mp3 -strict -2 -ac 2 -ar 44100 -ab 128k -deinterlace -pix_fmt yuv420p -vcodec libx264 -preset slow -coder 1 -bf 3 -x264opts nal-hrd=none -g 25 -b:v 3500k -bufsize 8500k -f mpegts "/root/Streams/5.mp4"

The above script restarts once a day, and streams to the single file all day, so you just need to know how long the stream is , using ffprobe, to make sure you set the start time for your 2nd process

  1. ffmpeg -loglevel info -re -ss 57 -t 43200 -i "/root/Streams/5.mp4" -map_channel 0.1.1 -c:a mp3 -strict -2 -ac 2 -ar 44100 -ab 128k -af "volume=4" -pix_fmt yuv420p -vcodec libx264 -preset slow -coder 1 -bf 3 -x264opts nal-hrd=none -g 50 -b:v 3500k -bufsize 5500k -f flv 'rtmp://xxx/xxx'

from bmdtools.

msslava avatar msslava commented on June 23, 2024

I mean, when we 1) write to mp4 and then 2) want to get from it in ProRes (for example) - it's wrong, I think.
Thank you for sharing

from bmdtools.

PreDeToR avatar PreDeToR commented on June 23, 2024

Ah, not sure about that i know ffmpeg can handle it for me, you might need something like a rtmp stream that you need to send to

from bmdtools.

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.