I want to start by saying that i don't know how to use FFMPEG in C#. I have a program that reads the information of a media file, I use this code about resolution, bitrate var player = new WindowsMediaPlayer(); var clip = player.newMedia(file.FullName); lblLenght_.Text = (TimeSpan.FromSeconds(clip.duration)).ToString(); ShellFile shellFile = ShellFile.FromFilePath(file.FullName); lblFPS_.Text = (shellFile.Properties.System.Video.FrameRate.Value / 1000).ToString(); lblHeight_.Text = shellFile.Properties.System.Video.FrameHeight.Value.ToString() + " px"; lblWidth_.Text = (...)
I told my server to upgrade to latest version of ffmpeg and they told me they did and I have the latest version that is 2.2.1 . I test several codes to convert a video to x264 , here is the one ; passthru("$ffmpegpath -i aatest/a.AVI -c:v libx264 -c:a libfaac -preset veryslow -qp 0 aatest/output.mp4 2>&1");
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include (...)
(a) start Red5 server in Terminal 1
(b) feed a stream to the Red5 server in Terminal 2 ffmpeg -re -i '/usr/share/red5/webapps/oflaDemo/streams/avatar.flv' -vcodec libx264 -ab 128k -ac 2 -ar 44100 -r 25 -s 320x240 -vb 660k -f flv 'rtmp://localhost/oflaDemo/streamTest'
Terminal 2 shows some messages that it is streaming.
(c) play the stream I use Movie Player: rtmp://localhost/oflaDemo/streamTest
[Result] An error occured. Stream contains no (...)
I have a video file with a video and audio stream on it (6.flv) I need to merge an audio with with the video file that is already having an audio. But I am getting an error "Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument" # ffmpeg -i 6.flv Stream #0:0: Video: flv1, yuv420p, 426x240, 279 kb/s, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc Stream #0:1: Audio: mp3, 22050 Hz, stereo, s16p, 65 kb/s[/color] And an audio mp3 file(2.mp3). # ffmpeg -i 2.mp3 Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s And i need to mix (add) this mp3 file to the (...)
I've basically exhausted myself searching Google and trying to address an error I get when compiling ffmpeg-php on a CentOS / 6.4-64 with PHP 5.4.20 and Apache v2.2.25 (cgi-fcgi).
I end up getting the following when trying to compile. Does anyone have any ideas on how to fix/address this? /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: âlist_entryâ undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: (Each undeclared identifier is reported only once /usr/local/src/ffmpeg-php-0.6.0/ffmpeg_movie.c:311: error: for each function it (...)
I am using FFMPEG in C# and have the following function prototpe: public static extern AVIOContext* avio_alloc_context(byte* buffer, int buffer_size, int write_flag, void* opaque, IntPtr read_packet, IntPtr write_packet, IntPtr seek);
In C/C++ this function is declared as follows: avio_alloc_context (unsigned char *buffer, int buffer_size, int write_flag, void *opaque, int(*read_packet)(void *opaque, uint8_t *buf, int buf_size), int(*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t(*seek)(void *opaque, int64_t offset, int whence))
In C/C++ I can do the following to call (...)
I'm new to the ffmpeg library and Im working on a custom directshow filter. I decided to use the ffmpeg library for the encoding of what I need to achieve. I'm a little confused with some of the parameters and the correct values with what ffmpeg is expecting.
I'm currently working on the ac3 part of the custom filter. I've looked through the example of the encoding audio ( for MP2 encoding ) in the ffmpeg doc and I understand it, but I don't understand how I should adapt it to my specific needs.
The incoming samples are at 48K samples per second 16bit per sample and are stereo (...)
Im using ffmpeg to re-stream, only thing is im trying to add a watermark as well, here is my code:
ffmpeg -i - -isync -maxrate 300k -vcodec copy -b 150k -acodec copy -b 48k -s 640x380 -vcodec libx264 -preset veryfast -vf "movie=img.png [watermark]; [in][watermark] overlay=10:10 [out]" -f flv "rtmp://xxx.xxx.xxx/live/stream flashver=FME/3.0\\20(compatible;\\20FMSc/1.0)"
The problem im getting is that the quality of the stream is terrible, compltetly unwatchable, audio is great but the video quality is madly bad, so how would i improve it please, im useless at this type of thing so if (...)
I want to build a voice recorder using HTML5 same as one found in gitHub JSSoundecorder, but what I want is for the user to be able to choose the file format before recording the voice.I can do this using ffmpeg. In other words the user must be able to select the audio format by check box (mp3,wma,pcm) and in the background code, the .wav file usually created by the program instead of displaying it, it should be converted by the format selected then displayed in the new format.this is the ffmpeg code we can use ,but I don't know how to get the .wav audio file to convert it and show (...)
I am sorry in advance if question might look a little bit silly, but I am very new to the current topic so hope you understand.
Our current video streaming is performed with red5, and the client that receives the video is the flash client.
My goal is to get the stream address of my red5 stream and programmatically send notification to nginx-rtmp to pull it.
So let's say I have the following nginx-rtmp configuration: application big live on; exec_pull /home/stan/bin/ffmpeg -i rtmp://22.214.171.124/$app/$name -vcodec flv -an -f flv rtmp://localhost:1937/anotherapp/$name; application (...)
My ffmpeg command in php is echo $cmd_thumbnail_create = ("\\"$ffmpeg\\" -i \\"" . $dir.$videopath . "\\" -an -ss $getFromSecond \\"" . $dir.$thumbnailpath ."\\""); exec($cmd_thumbnail_create);
Output of which is
"C:\\FFMPEG\\bin\\ffmpeg" -i "C:/xampp/htdocs/final/uploaded_videos/intro_en.mp4" -an -ss 6 "C:/xampp/htdocs/final/thumbnail/intro_en.jpg"
This when copied and executed on the command prompt creates the thumbnail at proper location with proper name.
I have FFMPEG installed on an Apache server (installed via WHM RPM installer) but it is severally out of date.
I downloaded a static build (much more up-to-date!) and put it in a folder in the root of the drive.
However, the command 'ffmpeg' is tied to the old version (which I cannot seem to delete via WHM...).
How can I either re-direct this command to the new version, or create a new "global" command again for the new version?
Also, is there a way to delete the RPM installed version via WHM or a way to update (...)
I've looked for this issue since a while but I didn't find out any solution... I want to create a video from pictures with javacv (great, it works). But now I want to put in a sync way audio into my video. I heard I had to make a byte array with the sound data and then record() according to the audiobitrate/8 = audiobyterate but i didn't find a simple sample...I'm not the first asking this question but all the same questions are still unanswered IplImage Image = cvLoadImage("data/photo.jpg"); FrameRecorder recorder = FFmpegFrameRecorder.createDefault("out.avi", 1920, 1080); (...)
I have a WMV video which is only 2.5 seconds long, but ffmpeg (and VLC media player for that matter) think that it is closer 34 seconds in length. When I run: ffmpeg -i 206.wmv 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,//
I get: 00:00:33.82
But when I convert it to another format (mp4 or flv) and then try read the duration again I get the actual length: 00:00:02.50
The problem is that I'm grabbing a thumbnail for the video 20% of the way through, but with the wrong video duration I'm trying to grab it a frame that doesn't exist.
It seems that ffmpeg grabs the length from (...)
I want to make use of ffmpeg for converting an audio file from wav to pcm.upon searching I know that there is a command line to be executed in the php form,and that I need an ajax to execute that command line.but I don't know what to write in the ajax form nor in the php page.I only know that this is the command line used to convert from wav to pcm ffmpeg -i file.wav -f s16be -ar 8000 -acodec pcm_s16be file.raw
can please somebody help me build my ffmpeg php file and its ajax.thank you in advance.note that i'm very new in (...)
I've just started working on video editing application for IOS.
What i am trying to do:
Trying to create a typical Video Editing application with the following features. Frames split-up(thumbnails) Adding/merging videos Adding audio to the video. Audio/Video Fadeouts. Zoom in and Zoom out functionalities Adding subtitles/Titles Audio Filtering.
What have i done so far:
Put a detail pre development study and found that FFMPEG can do the job. I have taken the latest version of FFMPEG and built for IOS as .a files.
However, i feel extremely hard to create a sample programs as i am (...)
We are using FFmpeg libraries git-ee94362 libavformat v55.2.100. Our purpose is to mux two streams (video and audio) into M3U8 playlist using HLS. We are using AV_CODEC_ID_H264 output encoder, AV_PIX_FMT_YUV420P output video pixel format and CODEC_FLAG_GLOBAL_HEADER flag for the encoder. The last causes us to use "h264_mp4toannexb" bit stream filter. So, here is the code snippet: AVPacket outpkt = 0; int isGotVideoPacket = 0; av_init_packet(&outpkt); // convert time in stream time base units, so that the encoder will fill the packet appropriately out_video_frame->pts = (int64_t) (...)
I want to connect DSLR camera with Android phone using OTG cable please Help Help and then I want to show live video in Android device screen.
I posted an same question to another community Video Production that I've found later, and which seems to be a better place for this question:
See: http://video.stackexchange.com/questions/12156/how-can-i-convert-mts-file-avchd-to-mp4-by-ffmpeg-without-re-encoding-h264-v/ 1. What I tried
I have some .MTS (AVCHD format) files recoreded with my AVCHD camera. Its specification is as shown below: $ ffprobe 140612_Canon-00000.MTS ffprobe version 2.2.1 Copyright (c) 2007-2014 the FFmpeg developers (snip) Input #0, mpegts, from '140612_Canon-00000.MTS': Duration: 00:48:58.40, start: 0.800300, (...)
I am using FFMPEG to make a video editor. I stuck when selecting a folder:
1/ I will show "File Manager" to user. They can choose a folder then return a path. How can choose a folder and get its path. For example: /sdcard/videokit/.
Here is my code, I must choose a mp4 file (not a folder I want). public void openFolder() Intent intent = new Intent(Intent.ACTION_GET_CONTENT); Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath() + "/sdcard/"); intent.setDataAndType(uri, "folder|video/mp4"); startActivityForResult(Intent.createChooser(intent, "Select (...)
I am using IMediaWriter, to write out about 20 video frames into an independent .mp4 file and creating a new writer to write a new file. This is a logic (not so efficient one), I've used to chunk the web-cam feed into chunks. I am able to successfully able to create multiple .mp4 video files and when opened then in a VLC player, they can be played back.
However, when I try to open one of the chunked file into a new IContainer object (see below code snippet), my program: Gets stuck at the container.open() call ( see * below), and the CPU utilization shoots above 100%. Sometimes it throws (...)
i want to encode to mp4(h.264 codec) from avi,mpg..... for wowza streaming.
encode mp4 using ffmpeg, jave.
encode is success, but wowza streaming is not work on android and iphone OS. (it's play successfully on my PC)
please help me.
ps. i'm sorry. i'm poor at english.
[using jave] File source = new File("D://temp/20140704_163504.mp4"); File target = new File("D://temp/jave.mp4"); AudioAttributes audio = new AudioAttributes(); audio.setCodec("libmp3lame"); audio.setBitRate(new Integer(64000)); audio.setChannels(new Integer(1)); audio.setSamplingRate(new Integer(22050)); (...)