Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Convert RTSP stream to MP4
11 février 2017, par edua_glzI have a IP Camera that supports RTSP, and I need to display this stream to multiple clients using HTML5.
Since HTML Video tag doesn't support RTSP, I'm calling ffmpeg to encode it to a WEBM stream, but the result is very glitchy and distorts the original stream.
The command im using is the following:
ffmpeg -i my_RSTP_URL -vcodec libvpx -f webm -
To distribute the stream I'm using a Node.js instance that calls the rtsp stream via ffpmeg when needed.
The solution looks like such:
Camera --Via RSTP--> ffmpeg --Encodes to WEBM--> Node.js --Via HTML5 Video--> Client
Node.js code:
var request = require('request'); var http = require('http'); var child_process = require("child_process"); var stdouts = {}; http.createServer(function (req, resp) { switch (params[0]) { case "LIVE": resp.writeHead(200, {'Content-Type': 'video/mp4', 'Connection': 'keep-alive'}); // Start ffmpeg var ffmpeg = child_process.spawn("ffmpeg",[ "-i","my_RSTP_URL", // Capture offset "-vcodec","libvpx", // vp8 encoding "-f","webm", // File format "-" // Output to STDOUT ]); ffmpeg.on('exit', function() { console.log('ffmpeg terminado'); }); ffmpeg.on('error',function(e) { console.log(e); }) ffmpeg.stdout.on('data',function(data) { console.log('datos'+data); }); ffmpeg.stderr.on('data', function(data) { console.log('stderr'+data); }); stdouts[params[1]] = ffmpeg.stdout; // Pipe the video output to the client response ffmpeg.stdout.pipe(resp); console.log("Initializing camera"); break; } }).listen(8088); console.log('Server running at port 8088');
Am I using the wrong library codec? Or why Am I getting such a weird result?
-
Which Dedicated Server for FFMPEG ?
11 février 2017, par OarSmaNMy website converts video to audio and video to video using FFMPEG (full Centos 64bit install). Mostly i got multiple conversions (10-20) real time. I use cache for already converted audios/videos. I am currently moving to a dedicated server and i need to know which configuration would be best for my situation.
Which of the below servers is better for FFMPEG;
SINGLE Intel® Xeon® Processor E3-1270 v5, 8M Smart Cache, 3.60 GHz, 8 GT/s DMI3 (4 Cores-8 Threads) / 32GB DDR4 2133 / 240GB S3500 Intel Wolfsville SSD + 1TB Enterprise Grade HDD (for caching)
DUAL Intel® Xeon® Processor E5-2620, 15M Smart Cache, 2.00 GHz, 7.20 GT/s Intel® QPI (12 Cores-24 Threads) / 32GB DDR3 1333 / 120GB S3500 Intel Wolfsville SSD + 1TB Enterprise Grade HDD (for caching)
thanks for your ideas.
-
Crashing adobe premier cc pro when importing h264 mp4 file
11 février 2017, par rpoI am screencasting with kazam in Ubuntu which is h264.
To edit the video i tried to use vegas pro latest version. It only play the audio without any video.
Then i tried to edit it with adobe premier 2017. Whenever i import the file(mp4) the premier pro just crash without any useful message.
I installed quicktime for the codecs but no luck. I also converted the media with Format Factory(http://www.pcfreetime.com/) to MOV ... but premier just crash.
How can i solve this ?
here is the MediaInfo:
General Complete name : C:\Users\user\Desktop\vdo.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 (mp42/mp41/isom/iso2) File size : 23.0 MiB Duration : 9 min 20 s Overall bit rate : 344 kb/s Encoded date : UTC 2017-02-11 06:43:57 Tagged date : UTC 2017-02-11 06:43:57 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High 4:4:4 Predictive@L4 Format settings, CABAC : No Format settings, ReFrames : 1 frame Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 9 min 20 s Bit rate : 343 kb/s Maximum bit rate : 2 097 kb/s Width : 1 674 pixels Height : 858 pixels Display aspect ratio : 1.951 Frame rate mode : Constant Frame rate : 15.000 FPS Color space : YUV Chroma subsampling : 4:4:4 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.016 Stream size : 22.9 MiB (100%) Writing library : x264 core 148 r2643 5c65704 Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=6 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=150 / keyint_min=15 / scenecut=0 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=15 / ip_ratio=1.40 / aq=0 Language : English Encoded date : UTC 2017-02-11 06:43:57 Tagged date : UTC 2017-02-11 06:43:57
-
soft subtitles showing by default when video is played
11 février 2017, par dexterIs it possible to create a video file that contains a soft subtitle and shows it by default (as soon as you open it in VLC - without the need to activate the subtitle track) from an original video file and the appropriate subtitle file?
I have tried the following:
ffmpeg -i input.mp4 -i input.ass -c:v copy -c:a copy -c:s copy -map 0:0 -map 0:1 -map 1:0 -y out.mkv
The resulting out.mkv does contain the subtitle but it does not show by default. Thanks for your help.
-
Burn in delayed subtitles
11 février 2017, par sygiI would like to burn subtitles into a video file using a console program. Previously I used
ffmpeg
to do that:ffmpeg -i input.mkv -vf subtitles=sub.srt -strict -2 out.mp4
However, I am having problems when my subtitles are delayed with regard to the movie. I looked into
-ioffset
option andsetpts
filter, but they allow me move the video, but I'd like the video timing to stay unchanged and only burn in the subtitles in a delayed manner.Is there a way to do it in
ffmpeg
(I suppose no, as burning subtitles is a filter and I don't see a way to "change" a behavior of filters, but I haven't looked at all of them)? If not, is there an easy-to-use console program which would delay the subtitles before burning them in?