Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Converting large (4gb) avi file to mpeg or mp4 format using C#
16 septembre 2014, par user2330678I have successfully converted avi files to Mpeg using NREco converter http://www.nrecosite.com/video_converter_net.aspx
But, the length (duration) of the converted video is never greater than 2mins, 35 secs. I tried using ffmpeg command line utility (https://www.ffmpeg.org/download.html or http://ffmpeg.zeranoe.com/builds/ ffmpeg 64 bit static for windows) but the length was always less than or equal to 2mins, 35 seconds. How to increase the duration of the ffmpeg converted video?
I tried the -t command but couldn't increase the length (duration) of the converted video. Original video is a 14mins 5 sec avi file.
ffmpeg -i inputAVIfilename outputMPEGfilename ffmpeg -i inputAVIfilename -t 90000 outputMPEGfilename
The video file has only bitmap images. No sound tracks are required.
Please note that my dll would be used with both windows & web applications.
-
Video Editing using html css javascript
16 septembre 2014, par shruI need to edit a video using
HTML5
,Javascript
only. Noflash
orffmpeg
. I need to add title boards, background audio, (transitions, bumpers) borders etc.I have tried
popcorn.js
but it uses css only and does not actually edit the video. I have even experimented with ffmpeg. FFmpeg gets the job done but takes a lot of time.I am looking to build something like this.
-
How to use ffmpeg faststart flag programmatically ?
16 septembre 2014, par Evgeniy KharchenkoI try to convert videos for playback on Android using H264, AAC codecs and mp4 container. Video plays normaly with non-system players. But system player shows error "Can't play this video". I found out that the problem is in moov atom, which is writed in the end of the file. When I use "-movflags +faststart" ffmeg flag to convert video, it plays normal, but when I try to do that programmatically, it gives no result. I use following code:
av_dict_set( &dict, "movflags", "faststart", 0 ); ret = avformat_write_header( ofmt_ctx, &dict );
-
FFMPEG : Merging multiple audio stream of a single video to one stream
16 septembre 2014, par PommyI'm trying to merge this video Input.mxf which have 8 mono audio stream into both a stereo and a 5.1 m4a audio file
This are the data from using ffprobe on the file
Input #0, mxf, from 'Input.mxf':
Metadata: timecode : 00:59:59:00 Duration: 00:19:16.40, start: 0.000000, bitrate: 60154 kb/s Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR 1:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
This is the current ffmpeg code I used for this audio encoding. I got an output file audio1.m4a /audio2.m4a after running it but the sound comes out only from 1 side of the headphone
/For Stereo
FFMPEG -i input.mxf -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6][0:7 [0:8]amerge=inputs=8[aout]" -map "[aout]" -acodec aac -strict 2 -ar 48000 -b:a 64k -ac 2 audio1.m4a
/For 5.1 Channel
FFMPEG -i input.mxf -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6][0:7 [0:8]amerge=inputs=8[aout]" -map "[aout]" -acodec aac -strict 2 -b:a 64k -ac 2 audio2.m4a
Anyone have a suggestion on how to modify the script. I read up on "channel_layout" but tried it with no success. If you need anymore info just tell me.
-
Error in live mp3 ffmpeg encoder using python
16 septembre 2014, par messi fanI have a code like below. i want to record sound and convert each wav frame to mp3 format in real time using ffmpeg
import pyaudio,sys import subprocess command = ['ffmpeg', '-y','-f','wav' , '-i', '-', '-f', 'mp3', '-'] process = subprocess.Popen(command, stdin=subprocess.PIPE) p = pyaudio.PyAudio() CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 1024*10 RECORD_SECONDS = 2 stream = p.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK) mp3 = open("mp3.mp3",'wb') for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) recording_mp3, errordata = process.communicate(data) mp3.write(recording_mp3)
Now my code producing error
pipe:: Invalid data found when processing input
My ffmpeg and audio recording working fine. How can i solve this issue ?