Answer the question
In order to leave comments, you need to log in
How to convert webm to flv using ffmpeg?
Hello, the task is to transcode an incoming video stream in webm format into an flv stream broadcast on the nginx rtmp module. There is such preparation but errors fall out. Source code
The solution is implemented on node js but the transcoding is done in a separate thread with a call to the ffmpeg console application
var ops=[
'-vcodec', 'webm','-i','-',
'-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency',
'-an',
'-bufsize', '1000',
'-f', 'flv', rtmp://myrtmpserver.com/live
];
ffmpeg_process=spawn('ffmpeg', ops);
FFMPEG:[buffer @ 0x1f875a0] Unable to parse option value "-1" as pixel format
Stream #0:1(eng): Video: vp8, none, 640x480, SAR 1:1 DAR 4:3, 16.67 tbr, 1k tbn,
var ops = [ '-i','-']
ffmpeg_process=spawn('ffprobe', ops);
Stream #0:1(eng): Video: h264 (Constrained Baseline), yuv420p, 640x480, SAR 1:1 DAR 4:3, 30.30 fps, 16.67 tbr, 1k tbn, 60 tbc (default)
FFMPEG:[matroska,webm @ 0x1f2b560] Could not find codec parameters for stream 1 (Video: vp8, none, 640x480): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from 'pipe:':
Metadata:
encoder : Chrome
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
Stream #0:1(eng): Video: vp8, none, 640x480, SAR 1:1 DAR 4:3, 16.67 tbr, 1k tbn,
FFMPEG:1k tbc (default)
FFMPEG:[buffer @ 0x1f875a0] Unable to parse option value "-1" as pixel format
Last message repeated 1 times
[buffer @ 0x1f875a0] Error setting option pix_fmt to value -1.
[graph 0 input from stream 0:1 @ 0x1f8d7a0] Error applying options to the filter.
FFMPEG:Error opening filters!
Answer the question
In order to leave comments, you need to log in
var ops=[
'-i', '-',
'-c:v', 'libx264', '-preset', 'fast', '-strict', '-2', //'-tune', 'zerolatency'
'-c:a', 'aac', '-b:a', '128k',
'-f', 'flv', socket._rtmpDestination
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question