#7380 closed defect (invalid)

FFMPEG is not taking s3 bucket signed url

Reported by: ahmedsharief Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I am trying to create thumbnails from an amazon s3 bucket signed url. I am able to generate thumbnails when i run the command in terminal

I am running the above command in terminal and its working fine but when i try to implement the same in node js its showing "no such file or directory error". Though i am encoding the url with double quotes then also its showing same error. The following is the code

var resUrl = "\""+result+"\"";

var args = [

'-i', resUrl,
'-ss', '00:00:02',
'-vframes', '1',
'-f','image2',
'output.jpg'

]
console.log(args)
var ffmpeg = require('child_process').spawn('ffmpeg', args);

ffmpeg.on('error', function (err) {

console.log(err);

});

ffmpeg.on('close', function (code) {

});

ffmpeg.stderr.on('data', function (data) {

var tData = data.toString('utf8');
var a = tData.split('\n');
console.log("A",a);

});

ffmpeg.stdout.on('data', function (data) {


});

And the following is error

A [ 'ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg
developers' ]
A [ ,

' built with Apple LLVM version 9.1.0 (clang-902.0.39.2)',
' configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-

shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --
enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
opencl --enable-videotoolbox --disable-lzma',

' libavutil 56. 14.100 / 56. 14.100',
' libavcodec 58. 18.100 / 58. 18.100',

' libavformat 58. 12.100 / 58. 12.100',
' libavdevice 58. 3.100 / 58. 3.100',
' libavfilter 7. 16.100 / 7. 16.100',
' libavresample 4. 0. 0 / 4. 0. 0',
' libswscale 5. 1.100 / 5. 1.100',
' libswresample 3. 1.100 / 3. 1.100',
' libpostproc 55. 1.100 / 55. 1.100',
'"https://test-s3-bucket.s3.ap-south-1.amazonaws.com/user_gallery_assets/5b6936069ac2bf0602085367/gallery/images/5b7be08527641dee8c1f8134.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxx%2F20180821%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20180821T095101Z&X-Amz-Expires=900&X-Amz-Signature=d7f81f4eed3d6c87c04dc1b0ad06beeb946afa33d417585f57fad72aeadb3ac0&X-Amz-SignedHeaders=host": No such file or directory',
]

ffmpeg exited with code 1

Change History (11)

comment:1 Changed 13 months ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Keywords no such file or directory s3 bucket signed url removed
  • Priority changed from critical to normal

comment:2 Changed 13 months ago by ahmedsharief

May i know why priority status has been changed

comment:3 Changed 13 months ago by richardpl

Because priority is not going to fix your problem ASAP.

comment:4 Changed 13 months ago by ahmedsharief

But i want to know how to resolve this issue

comment:5 follow-ups: Changed 13 months ago by oromit

  • Resolution set to invalid
  • Status changed from new to closed

This is an issue with your JavaScript? code or whatever framework you are using. As it works when you do the same on a normal commandline, it clearly isn't an issue with ffmpeg.
You should read up on how to properly pass arguments from that.

From the looks of it, you have quotes inside of your parameter, and they are clearly not part of the URL, thus breaking it.

In any case, it's out of the scope of this tracker for issues of ffmpeg itself.

comment:6 Changed 13 months ago by ahmedsharief

But when i open that url in browser its working fine

comment:7 in reply to: ↑ 5 Changed 13 months ago by ahmedsharief

But when i open that url in browser its working fine

comment:8 in reply to: ↑ 5 Changed 13 months ago by ahmedsharief

I had tried with npm packages also its showing me the same error as no such file or directory for that url

comment:9 Changed 13 months ago by ahmedsharief

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:10 in reply to: ↑ 5 Changed 13 months ago by ahmedsharief

If i use some other url its working fine only for s3 bucket signed url its happening like this

comment:11 Changed 13 months ago by oromit

  • Resolution set to invalid
  • Status changed from reopened to closed

This is not the nodejs support forum. Please seek help with your code in a more appropriate place.
It is _not_ an issue with ffmpeg, as you yourself demonstrated in the very first comment.

Note: See TracTickets for help on using tickets.