Karthikeya Vaidya
Karthikeya Vaidya

Reputation: 121

How to specify a path for output file in ffmpeg?

I am trying to give a path for the output file, but ffmpeg is giving an error stating

Unable to find a suitable output format for '/kcs/eng/: Invalid argument.

Whereas it is accepting the full path of the input file.

$in_path = "D:/kcs/kan/video.vob";
$out_path = "E:/kcs/eng/video.mp4";

ffmpeg -i $in_path -loglevel error -c:v libx264 -c:a aac -strict experimental $out_Path 

How to specify the path of the output file?

Upvotes: 6

Views: 31739

Answers (3)

saei.rei
saei.rei

Reputation: 31

Run the code in python file , and use concatenation process

cmd='ffmpeg -i C:/streaming/sample_videos/'+x+' -i logo.png -filter_complex "overlay=10:10" -preset slow -g 48 -sc_threshold 48  -map 0:0 -map 0:1  -s:v:0 640x360 -c:v:0 libx264 -b:v:0  800k -c:a:0 aac -b:a:0 96k   -c:a copy -var_stream_map "v:0,a:0" -profile:v main  -master_pl_name master.m3u8 -f hls -hls_time 20 -hls_list_size 0 -hls_playlist_type vod -hls_segment_filename "'+y+'/stream_%v/file_%03d.ts" '+y+'/stream_%v/playlist.m3u8'
subprocess.call(cmd,shell=True)

Upvotes: 2

pragnesh
pragnesh

Reputation: 1250

The command is not able to understand the output file type. Try -f mp4 option to specify that you want output to be in mp4 format.

One more point is first try to create the file in the same directory from where you are executing the command, so the out_path would be,

$out_path = "video.mp4";

Upvotes: 3

Sanjay Khatri
Sanjay Khatri

Reputation: 4211

@Karthikeya Vaidya Your output path should be

$out_path = "D:/kcs/eng/video.mp4";

Please change the path as above.

Upvotes: 0

Related Questions