Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
360 VR video to static ?
7 octobre 2016, par SuperProwerSo, I have simple 360 (or 180, I'm not really sure since I can't play it) degrees side-by-side VR video, but my phone is so old, so it's can play that kind of video, not matter what player I use (I was able to see few frames from such a video, but they were static or applications was crashing).
Is there any way to convert such video into static one? I understand that I will lost ability to rotate my head, but I don't really care since my phone don't have a gyroscope.
I want to create simple side-by-side video which I could play with any player - I understand that I can lost quality and effect, but as I said, I don't really care, since this is just something fun which I want to try.
-
Failing to convert audio file from M4A to MP3 format using FFmpegWrapper
7 octobre 2016, par Radu MateiI'm trying to convert a M4A audio file to MP3 format using
ffmpeg
in an iOS Project, language: Objective C. To make things easier I try to accomplish this usingFFmpegWrapper
I'm using ffmpeg ver 2.8.3 and FFmpegWrapper 1.0 installed via CocoaPods. On
pod outdated
it shows that I'm using latest versions.This is my code:
- (void) convertMP4ToMP3 { NSString *inputFormat = @"m4a"; NSString *outputFormat = @"mp3"; NSString *inputFileName = @"audio"; NSString *outputFileName = @"outputAudio"; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *inputFilePath = [[NSBundle mainBundle] pathForResource:inputFileName ofType:inputFormat]; NSString *outputFilePath = [documentsDirectory stringByAppendingPathComponent:[outputFileName stringByAppendingPathExtension:outputFormat]]; if ([[NSFileManager defaultManager] fileExistsAtPath:outputFilePath]) { [[NSFileManager defaultManager] removeItemAtPath:outputFilePath error:nil]; } FFmpegWrapper *wrapper = [[FFmpegWrapper alloc] init]; NSDictionary *options = @{kFFmpegInputFormatKey : inputFormat, kFFmpegOutputFormatKey : outputFormat}; [wrapper convertInputPath:inputFilePath outputPath:outputFilePath options:options progressBlock:^(NSUInteger bytesRead, uint64_t totalBytesRead, uint64_t totalBytesExpectedToRead) { } completionBlock:^(BOOL success, NSError *error) { success ? NSLog(@"Success!") : NSLog(@"Error : %@",error.localizedDescription); }]; }
And as result conversion fails with the following logs:
[mp3 @ 0x16a5ca00] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead. [mp3 @ 0x16a5ca00] Invalid audio stream. Exactly one MP3 audio stream is required. Error : Invalid argument
Any help would be appreciated.
-
Video conversion with php ffmpeg not playable on browser
7 octobre 2016, par Guille TerrasaI'm using the PHP FFMPEG Library https://github.com/PHP-FFMpeg/PHP-FFMpeg on a web application to convert some videos uploaded by the users in different formats to MP4 H264 video format, playable on most browsers.
I have a problem with some MP4 videos with an specific codec, this videos are being converted succesfully with PHP FFMPEG but are not playable on the browser.
- Type: Vídeo
- Codec: H264 - MPEG-4 AVC (part 10) (H264)
- Resolution: 320x258
- Screen Resolution: 320x240
- Framerate: 30.000300
- Decoded Format: Planar 4:2:2 YUV full scale
On other similar videos with a different version of the codec, the uploading and conversion process is working and the result is playable on the browser:
- Type: Vídeo
- Codec: H264 - MPEG-4 AVC (part 10) (avc1)
- Resolution: 320x258
- Screen Resolution: 320x240
- Framerate: 30
- Decoded Format: Planar 4:2:2 YUV
The code used to convert the video server side with PHP FFMPEG is this:
$video = $ffmpeg->open($path . '/' . $filename); $video->filters() ->resize(new \FFMpeg\Coordinate\Dimension($destWidth, $destHeight)) ->synchronize(); $video->save(new \FFMpeg\Format\Video\X264('libmp3lame'), $dest);
And on the browser is loaded with a video tag:
Thanks
-
How to play rtsp stream in android using ffmpeg
7 octobre 2016, par msjI want to play rtsp stream using ffmpeg library. I was buid ffmpeg for android and also I try to save rtsp stream to file it's work fine. my command
ffmpeg -i rtsp://@URL -acodec copy -vcodec copy abc.mp4
now I want to view my ip camera live stream video using ffmpeg. Have any ideas.
Thanks for ur time.
-
AWS lambda hitting size limitation with ffmpeg
7 octobre 2016, par GuigI'm playing around with AWS lambda and trying to set up a task based on
node
+ffmpeg
. Apparently Lambda cannot handle zip that are larger than 250Mb (I'm getting the exceptionUnzipped size must be smaller than 262144000 bytes
)I've followed the build guideline from ffmpeg and my final build is 377Mb:
There might be a few things I can prune, but I'm not sure I can get bellow 200+Mb. Is Lambda not fit for ffmpeg tasks? If people have used for video processing, is the only solution to drastically prune
ffmpeg
build?== edit ==
As mentioned in @idbehold's answer, it's likely that I only need the binaries. I first tried with only the binaries in
./bin
, but I was getting errors like:{ "errorMessage": "Command failed: /bin/sh -c ffprobe -v quiet -print_format json -show_format -show_streams test.mp4 ffprobe: error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or directory", "errorType": "Error", "stackTrace": [ "ffprobe: error while loading shared libraries: libva.so.1: cannot open shared object file: No such file or directory", "", "ChildProcess.exithandler (child_process.js:213:12)", "emitTwo (events.js:87:13)", "ChildProcess.emit (events.js:172:7)","maybeClose (internal/child_process.js:821:16)", "Socket.
(internal/child_process.js:319:11)", "emitOne (events.js:77:13)", "Socket.emit (events.js:169:7)", "Pipe._onclose (net.js:469:12)" ] } The lambda is just executing an input command with a
child_process
as in thenode-exec
blueprint aws function. So I thought I'd need to include those other files. I copied the binaries I obtained after following ffmpeg installation guidelines, but maybe they got linked differently in my ubuntu machine. I guess I should focus on fixing that error.