Quantcast
Channel: MediaSPIP
Viewing all 117701 articles
Browse latest View live

capture RTSP stream from IP camera ffmpeg

$
0
0

I used the following command to get the frames from RTSP h264 codec. I could not able to get the frames from the ip camera.

$ ffmpeg -i rtsp://xxxx:yyy@192.168.1.yy:xx/tcp/av0_0 -f image2 -vf fps=fps=1/120 img%03d.jpg

My output

ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1) configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --disable-yasm libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 48.101 / 57. 48.101 libavformat 57. 41.100 / 57. 41.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 47.100 / 6. 47.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 [rtsp @ 0x2dba3a0] CSeq 6 expected, 0 received. Last message repeated 5 times [rtsp @ 0x2dba3a0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://xx:yy@192.168.1.xx:yy/tcp/av0_0': Metadata: title : streamed by the RTSP server Duration: N/A, start: 0.000000, bitrate: 64 kb/s Stream #0:0: Video: h264, none, 90k tbr, 90k tbn, 180k tbc Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s Output #0, image2, to 'img%03d.jpg': Output file #0 does not contain any stream Exiting normally, received signal 2.

avfilter: add acrusher filter

$
0
0
avfilter: add acrusher filter
  • [DH] Changelog
  • [DH] doc/filters.texi
  • [DH] libavfilter/Makefile
  • [DH] libavfilter/af_acrusher.c
  • [DH] libavfilter/allfilters.c
  • [DH] libavfilter/version.h

android complie ffmpeg error : Are you sure your NDK_MODULE_PATH variable is properly defined

$
0
0

I already export NDK_MODULE_PATH

export PATH=${PATH}:/Users/sunmeng/Desktop/project_asia/tools/sdk/platform-tools export PATH=${PATH}:/Users/sunmeng/Desktop/project_asia/tools/ffmpeg/android-ndk-r11c export ANDROID_SDK=/Users/sunmeng/Desktop/project_asia/tools/sdk export ANDROID_HOME=/Users/sunmeng/Desktop/project_asia/tools/sdk export NDK_MODULE_PATH=/Users/sunmeng/Desktop/project_asia/tools/ffmpeg/android-ndk-r11c

put ffmpeg in ndk/sources dir

Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := videokit ANDROID_LIB := -landroid LOCAL_LDLIBS += -llog -ljnigraphics -lz -landroid LOCAL_SRC_FILES := fr_enoent_videokit_Videokit.c ffmpeg.c ffmpeg_filter.c ffmpeg_opt.c cmdutils.c LOCAL_SHARED_LIBRARIES := libavformat libavfilter libavcodec libavutil libswresample libswscale include $(BUILD_SHARED_LIBRARY) $(call import-module,ffmpeg/android/arm)

Use fluent-ffmpeg to tell if a file is a video or audio

$
0
0

I am using node-fluent-ffmpeg module in NodeJS. It is very good that fluent-ffmpeg provides functions to get the metadata of a video and audio file.

https://github.com/schaermu/node-fluent-ffmpeg#reading-video-metadata

I have tried on Mac OS to use the "resolution" attribute in the metadata to tell if a file is audio only or video, i.e. if both resolution.w and resolution.h are 0, then this file is an audio. This work fine on Mac OS. But some strange things happened that this doesn't work on Windows platform (I have tried Windows 7 64bit and Windows 2008) using the latest ffmpeg. Even though I put a .mp3 file through fluent-ffmpeg,the result looks something like this:

video:
{ container:'mp3', ... resolution: {w:300,h:300}, resolutionSquare: {w:300,h:300}, aspectString: '1:1', ...
}
audio:
{ codec:'mp3', bitrate:64, sample_rate:44100, stream:0, channels:1
}

I am not why there is a "resolution" since it is a pure audio file. So is there any solid way to find out if the file is audio only or video from the metadata? Or should I use ffmpeg commandline to find it out?

-- https://github.com/schaermu/node-fluent-ffmpeg#reading-video-metadata

how av_freep in ffmpeg works?

$
0
0

I have some questions regarding void pointer in C. I found out the following code, part of ffmpeg that I couldn't understand... Could someone explain to me how it works?

void av_freep(void *arg)
{ void *val; memcpy(&val, arg, sizeof(val)); memcpy(arg, &(void *){ NULL }, sizeof(val)); av_free(val);
}

and later it's called like this:

char *str;
av_freep(&str);

my questions:

  1. how passing address of str (&str) doesn't trigger "incompatible type" warning when it's compiled? Shouldn't &str type is become char**?
  2. what's the meaning of &(void *){ NULL } in one of memcpy parameter?
  3. why it's trying to free "val" which is not allocated?

Thanks!

YUV8_420P - AVFrame conversion hazard (only Y plan)

$
0
0

I'm working on a FFMPEG application. The goal is to convert a picture (YUV input format) to an AVFrame to be able to process it (by applying a specific filter) and then realize the invert conversion to redirect it to the output.

Although some filters as drawgrid or noise are perfectly working, filters which apply some "space transformation" (as a crop or a hflip) seem to be applied only over the Y component. The colors of the output pictures aren't affected by the filter which leads to an unsatisfying result.

I'm asking myself what I have such a result but I didn't reach to find the problem origin.

Here is the part of cod which convert the YUV picture to an AVFrame:

unsigned int i = 0;
int number_common_channels = MIN(IMAGEFORMAT_COMPONENTS, AV_NUM_DATA_POINTERS); // Transfer the image informations (width, height, pitch and data)
if ((av_im->width = yuv_im->width[0]) <= 0)
{ cu_printf(ERROR, "Width of destination picture null or negative"); return -1;
}
if((av_im->height = yuv_im->height[0]) <= 0)
{ cu_printf(ERROR, "Height of destination picture null or negative"); return -1;
}
for (i=0; i < number_common_channels; i++)
{ av_im->linesize[i] = yuv_im->pitch[i]; av_im->data[i] = yuv_im->data[i];
}

If necessary, I can transmit you other parts of the cod where the problem could be. Thanks for your cooperation.

Flow.

How to merge two videos like video conference using ffmpeg in java code?

$
0
0

I want to stitch together two live streams using ffmpeg. If anyone use that before please guide me for that.

Facing issue with video conversion

$
0
0

I am trying to convert a .wmv and .mov video file to MP4 format using below code:

var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ConvertSettings settings = new ConvertSettings(); settings.VideoCodec = " libx264"; ffMpeg.ConvertMedia(savePath, newsavepath, Format.mp4);

Its showing very strange behavior. The .avi format works well. But not working with .wmv and .mov format. When I am trying to convert video into mp4 and embedded this with in tag of HTML5, the video doesn't gets played indicating there is some issue with conversion. However, I am not getting any error message. I also tried by removing settings.VideoCodec = "libx264"; line from the above code mentioned. Could you please suggest if I am missing something?

Thank you in advance.

Regards, Saloni


FFmpeg merge images to a video

$
0
0

How can I create a mpg/mp4 file from let's say 10 images using ffmpeg.

Each image shall stay for 5 minutes, after the 5 minutes are over the next image shall appear and so on....

How can I achieve this?

problems with video compilation?

$
0
0

I am trying to establish a watermark to the video using ffmpeg and execute commands in a terminal : ffmpeg -i pic.mp4 -i logo.png -filter_complex - "overlay=20:20" pic1.mp4

there is such an error:

The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.

If the video is not available then the sound encoding + overlay watermark is successful, but there is an error with sound

avisynth: simplify the pix_fmt check for the newer AviSynth API

$
0
0
avisynth: simplify the pix_fmt check for the newer AviSynth API The values don't need to be hardcoded since the correct values are
returned by avs_bits_per_pixel. Signed-off-by: Michael Niedermayer 
  • [DH] libavformat/avisynth.c

libavformat/http: add support for headers option in listen mode

$
0
0
libavformat/http: add support for headers option in listen mode Instead of silently ignoring the headers option in listen mode, use
the provided headers. Signed-off-by: Moritz Barsnick 
Signed-off-by: Michael Niedermayer 
  • [DH] libavformat/http.c

avformat/id3v2: fix memleak with empty strings

$
0
0
avformat/id3v2: fix memleak with empty strings Signed-off-by: Michael Niedermayer 
  • [DH] libavformat/id3v2.c

avfilter/avf_avectorscope: fix initialization for prev_y in polar mode

$
0
0
avfilter/avf_avectorscope: fix initialization for prev_y in polar mode
  • [DH] libavfilter/avf_avectorscope.c

doc/filters: fix typo in acrusher filter docs

$
0
0
doc/filters: fix typo in acrusher filter docs
  • [DH] doc/filters.texi

avfilter/avf_avectorscope: add scale option

$
0
0
avfilter/avf_avectorscope: add scale option
  • [DH] doc/filters.texi
  • [DH] libavfilter/avf_avectorscope.c

avfilter/af_adelay: make it possible to delay channels by exact number of samples

$
0
0
avfilter/af_adelay: make it possible to delay channels by exact number of samples
  • [DH] doc/filters.texi
  • [DH] libavfilter/af_adelay.c

doc/filters: move hdcd documentation from video section to audio section

$
0
0
doc/filters: move hdcd documentation from video section to audio section
  • [DH] doc/filters.texi

Unable to probe

$
0
0

I'm using php-ffmpeg on windows with cakephp3, and encountered with a issue says: Unable to probe /var/www/blogchild.dev/webroot/uploads/records//Танецдовольноготеннисиста.mp4

MultimediaController

Auth->allow(['index', 'addvideo']); $this->loadModel('Posts'); $this->loadComponent('File'); $this->loadComponent('Flash'); $this->loadComponent('Upload'); } public function addvideo() { $this->viewBuilder()->template('addvideo'); $posts = $this->Posts->newEntity();
// $posts = $this->MsPosts->find()->toArray();
// dump($posts);
// die(); if ($this->request->is('post')) { $data = $this->request->data; $data['mentor_id'] = '1'; $data['nbr_of_views'] = '0'; $data['nbr_of_loves'] = '0'; $data['nbr_of_smiles'] = '0'; $data['mentor_id'] = '1'; $data['child_id'] = '1'; $post = $this->Posts->patchEntity($posts, $data);
// var_dump($data);
// die();
// debug($this->MsPosts->save($post));die(); // $upload = $this->File->uploadFile($this->request->data['file'], $post['id']);
// $post->file = $upload['url']; if (!empty($this->request->data['file']['name'])) { $path = '/uploads' . DS . 'records' . DS . $post->id; $this->uploadFile($_FILES['file'], $path, $post->id); $post->file = $path . DS . $_FILES['file']['name']; $this->Posts->save($post); } else { $this->Posts->save($post); } $this->Flash->success(__('The post saved')); return $this->redirect(['action' => 'addvideo']);

AppController

loadComponent('Security');` * * @return void */ public function initialize() { parent::initialize(); $this->loadComponent('Cookie'); $this->loadComponent('RequestHandler'); $this->loadComponent('Flash'); $provider = $this->request->query('provider'); //if ($provider === null) { $this->loadComponent('Auth', [ 'authenticate' => [ 'Form' => [ 'finder' => 'auth', 'fields' => [ 'username' => 'email', 'password' => 'password' ], 'loginAction' => [ 'controller' => 'Auth', 'action' => 'login' ], 'loginRedirect' => [ 'controller' => 'Auth', 'action' => 'login' ], 'logoutRedirect' => [ 'controller' => 'Auth', 'action' => 'login' ] ], 'ADmad/HybridAuth.HybridAuth' => [ // All keys shown below are defaults 'fields' => [ 'provider' => 'provider', 'openid_identifier' => 'openid_identifier', 'email' => 'email' ], 'profileModel' => 'ADmad/HybridAuth.SocialProfiles', 'profileModelFkField' => 'user_id', // The URL Hybridauth lib should redirect to after authentication. // If no value is specified you are redirect to this plugin's // HybridAuthController::authenticated() which handles persisting // user info to AuthComponent and redirection. 'hauth_return_to' => null, 'loginRedirect' => [ 'controller' => 'Auth', 'action' => 'login' ], 'logoutRedirect' => [ 'controller' => 'Auth', 'action' => 'login' ] ], ], ]);
// } else {
// $this->loadComponent('Auth', [
// 'authenticate' => [
// 'Form',
//
//
// ]
//
// ]);
// } } /** * Before render callback. * * @param \Cake\Event\Event $event The beforeRender event. * @return void */ public function beforeRender(Event $event) { if (!array_key_exists('_serialize', $this->viewVars) && in_array($this->response->type(), ['application/json', 'application/xml']) ) { $this->set('_serialize', true); } if ($this->request->session()->read('Auth.User')) { $this->set('loggedIn', true); } else { $this->set('loggedIn', false); } } protected function uploadFile(array $file, $path, $postId) { $objFile = $file; $path = $_SERVER['DOCUMENT_ROOT'] . $path; //@TODO check file size|Return error $folder = new Folder(); $folder->create($path, 0755); move_uploaded_file($objFile['tmp_name'], $path . DS . $objFile['name']); $ffmpeg = FFMpeg::create( array( 'ffmpeg.binaries' => '/usr/bin/ffmpeg', 'ffprobe.binaries' => '/usr/bin/ffprobe', 'timeout' => 3600, // The timeout for the underlying process 'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use ) ); $temp = explode('.', $objFile['name']); $video = $ffmpeg->open(WWW_ROOT . 'uploads/records' . DS . $postId . DS . $objFile['name']); $frame = $video->frame(TimeCode::fromSeconds(1)); $userPath = 'uploads/records' . DS . $postId . DS . $temp[0] . '.jpg'; $frame->save(WWW_ROOT . $userPath); }

WARNING!!!!! Help me...... enter image description here

-- enter image description here

How can I convert .xm, .mod, and others to .mp3 using avconv?

$
0
0

I recently downloaded a pack of keygen chiptunes (via http://keygenmusic.net/), and most of them are in file formats such as .xm, .mod, etc. I'd like to convert them all to mp3, hopefully using a tool like avconv (so I can batch process them).

However, when I issue avprobe , I get the following error:

avprobe version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2007-2014 the Libav developers built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
2000AD/2000AD - Creatures To The Rescue +3 trn.mod: Invalid data found when processing input
# avprobe output

How can I convert these files to mp3 format?

Also, here is a list of all the filetypes I need to convert:

 24 ahx 2 amd 4 bp 7 d00 4 fc13 15 fc14 6 hsc 217 it 99 mid 5 mo3 989 mod 6 mp3 1 mtm 3 nsf 19 ogg 3 rad 82 s3m 2 S3M 119 sc68 18 sid 124 v2m 9 wav 3116 xm 20 ym
-- http://keygenmusic.net/
Viewing all 117701 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>