I have parts of one image like
0x0_img1.jpg
100x200_img1.jpg
300x0_img1.jpg
360x420_img1.jpg
1080x720_img1.jpg
I just want to know how to merge these into a single image.
Image name has quadrants details (0x0 , 100x200... etc,.), which are the start position of the parts to the orginal image
Now how do I merge these parts of images using the FFMPEG c lib
You can use hstack filter here
ffmpeg -i 1.jpg -i 2.jpg -filter_complex hstack output
Related
I'm using FFmpeg wasm in the browser (React.js).
When I want to adjust the colors of a video using the colorbalance videofilter it always produces a washed out image.
await ffmpeg.run("-i", "test.mov", "-vf", "colorbalance=-0.4:-0.2:0.2:-0.4:-0.2:0.2:0:0:0.0", "-pix_fmt", "yuv420p", "test.mp4");
I'm usig the exact same command as in FFmpeg in my terminal (where it works correctly)
ffmpeg -i test.mov -vf colorbalance=-0.4:-0.2:0.2:-0.4:-0.2:0.2:0:0:0.0 -pix_fmt yuv420p output02.mp4
Has someone experienced the same issue?
Washed-out image attached
I want to analyze a compressed video (h264).
I'm encoding using this command:
ffmpeg -i in_path -vf scale=340:256,setsar=1:1 -q:v 1 -c:v h264 -f
rawvideo out_path
now I want to see how the P&B frames look like, so I'm using this command in order extract only the b frames:
ffmpeg -ss 0 -i in_vid -t 2 -q:v 2 -vf
select="eq(pict_type\,PICT_TYPE_B)" -vsync 0 frameb%03d.jpg
The extraction went well, no errors, and the number of frames extracted makes since by theory.
But, I Don't know how to "show" the image, when I'm doing:
eog frameb001.jpg
I'm getting a normal picture and not what I expected from a B frame, now I understand why doing "eog" won't be good, but I have no idea how to "show" the frame so that it will be meaningful (saw some articles that use HSV to show the frame).
One more thing the fact that I got a meaningful image from the B frames, maybe the extraction wasn't good.
Any help will be great, Thanks a lot!
After a conversion process I've thousands files like so:
VideoFolderName0001 - Introduction
video
videostream.avi
audio
audiostream.mp3
VideoFolderName0002 - History of stackoverflow
video
videostream.avi
audio
audiostream.mp3
VideoFolderName003 - Before Asking
video
videostream.avi
audio
audiostream.mp3
How can we merge (or join or combine or mux ..etc) *.avi and *.mp3 files according to (up 2) foldername.
I tried with avidemux one by one. But you know it takes a long time. There should be a cool script to automate that.
At first, merge all files:
for /d %%a in (VideoFolderName*) do ffmpeg -i "%%~a\videostream.avi" -i "%%~a\audiostream.mp3" -c copy "%%~a\videofile.avi"
next build the concatenate file:
(for /d %%a in (VideoFolderName*) do echo(file '%%~a\\videofile.avi')>"concat.txt"
and last build the concatenated video:
ffmpeg -f concat -i concat.txt -c copy video.avi
You must take care for the correct sequence of the avi files to concatenate.
ffmpeg manual
I have followed all several instructions on the internet but not results for a while now , i would like to explore D3 for choropleth maps, the topojson being generated cannot be rendered in the browser using d3 am stack at this point,
so far , i have downloaded and installed ogr2ogr , Nodejs
the commands am running to generate the topo json are
ogr2ogr -f GeoJSON -s_srs EPSG:4199 -t_srs EPSG:4199 districts.json "uganda distriscts.shp"
followed by
topojson --id-property district_i -p district=DIST_2010 -p AREA -p HECTAREAS -o ug.json districts.json
Am totally New to D3 and TopoJSON and Not a GIS expert either. Please help me get over this huddle attached are the shapefiles i would like to generate topojson and render this on a choropleth map using d3 . i will be glad if any one could provide me with pointers on how to generate the correct topojson formats for uganda since most examples are with USA and other regions. your help will be highly appreciated
First - what is "uganda distriscts.shp"? Why you have space in filename and quotes in command. You should have all files without spaces like uganda_distriscts.shp or ugandaDistriscts.shp, and no need in quotes!
Second - You should convert your map to WGS84 like so:
ogr2ogr -f GeoJSON -s_srs uganda_distriscts.prj -t_srs EPSG:4326 uganda_distriscts_wgs84.json uganda_distriscts.shp
Here uganda_distriscts.prj is projection file you should have, maybe it has another name, so look in folder for file with extension .prj.
Next you should create TopoJSON file like this:
topojson -o ug.json --id-property district_i -p district=DIST_2010 -p AREA -p HECTAREAS uganda=uganda_distriscts_wgs84.json
And examine this thread Map with d3.js and TopoJSON, Albers Siberia projection. I hope this will help you.
I execute the following command line
ffmpeg.exe
-i C:\Beema\video-source\DO_U_BEEMA176x144short.avi
-i C:\Beema\video-source\DO_U_BEEMA176x144short.avi
-i C:\Beema\temp\9016730-51056331-stitcheds.avi
-i C:\Beema\video-source\GOTTA_BEEMA176x144short.avi
-y -ac 1 -r 24 -b 25K
C:\Beema\video-out\9a062fb6-d448-48fe-b006-a85d51adf8a1.mpg
The output file in video-out ends up having a single copy of DO_U_BEEMA. I do not understand why ffmpeg is not concatenating.
Any help is dramatically appreciated,
mencoder -oac copy -ovc copy file1 file2 file3 … -o final_movie.mpg
Have you tried with mencoder?
Also are all of the files the same bitrate and dimensions? If not your going to need to make sure all of the video files are identical in these two areas before attempting to combine. It also appears your attempting to combine .avi's with a single .mpg, you'll most likely want to convert the .mpg to a similar format when re-encoding.
Hope this helps.
If it has C:\, it's Windows. use:
copy video1 + video2 + video3
and add more + videoN instances until you get there.
Here is the command that will work for you first cat the files then pipe to ffmpeg
cat C:\Beema\video-source\DO_U_BEEMA176x144short.avi C:\Beema\video-source\DO_U_BEEMA176x144short.avi C:\Beema\temp\9016730-51056331-stitcheds.avi
C:\Beema\video-source\GOTTA_BEEMA176x144short.avi | ffmpeg -f mpeg -i - C:\Beema\video-out\9a062fb6-d448-48fe-b006-a85d51adf8a1.mpg
-i - is important "-" this is the piped input to ffmpeg
Cheers.
I guess ffmpeg cann't do that. It usually takes only one input file. Trying to cat files to input may result in a lump togather, but i guess it won't stitch properly.
Best bet is mencoder or using transcode