ultramango / gear360pano

Simple script to create equirectangular panorama by stitching images from Samsung Gear 360
MIT License
225 stars 55 forks source link

On Ubuntu 16.04 "xargs: run_command: No such file or directory" #50

Closed spamrefuse closed 6 years ago

spamrefuse commented 6 years ago

Hi,

I'm running the video script on Ubuntu LTS 16.04 with bash, using the "master.zip" as of yesterday. Something is wrong with "xargs" and possibly "ffmpeg":

$ ./gear360video.cmd -s -t ./tmp/ 360.mp4
DEBUG: Output filename: ./html/data/360_pano.mp4
DEBUG: Running command:  notify-send -a ./gear360video.cmd Starting panoramic video stitching..
Extracting frames from video (this might take a while)...
DEBUG: Running command:  ffmpeg -y -i 360.mp4 tmp/tmp.PihX3Qdgm7/image%05d.jpg
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
[...cut...]
DEBUG: Input video size: 2560:1280
DEBUG: PTO template: gear360video2k.pto
Stitching frames...
xargs: run_command: No such file or directory
Recoding the video...
DEBUG: Stream: 0 FPS: 30000/1001
DEBUG: Input video FPS: 30000/1001
DEBUG: Running command:  ffmpeg -y -f image2 -i tmp/tmp.0MpP9oRFLX/image%05d_pano.jpg -r 30000/1001 -s 2560:1280 -vcodec libx264 tmp/tmp.0MpP9oRFLX/tmpvideo.mp4
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
[...cut...]
[image2 @ 0xca6940] Could find no file with path 'tmp/tmp.0MpP9oRFLX/image%05d_pano.jpg' and index in the range 0-4
tmp/tmp.0MpP9oRFLX/image%05d_pano.jpg: No such file or directory
Error while running ffmpeg
DEBUG: Running command:  notify-send -a ./gear360video.cmd Error while running ffmpeg
Removing temporary directories...
DEBUG: Removing frames directory: tmp/tmp.PihX3Qdgm7
DEBUG: Removing output directory: tmp/tmp.0MpP9oRFLX

The xargs line in the script is this:

if [ -z "${USEPARALLEL+x}" ]; then
  # No parallel
  find $FRAMESTEMPDIR -type f -name '*.jpg' | xargs -Ipanofile run_command "$DIR/gear360pano.cmd" -r -m -o "$OUTTEMPDIR" "panofile" "$PTOTMPL"
else

The ffmpeg error occurs in this line:

run_command ffmpeg -y -f image2 -i "$OUTTEMPDIR/$IMAGETMPLENC" -r "${SRCFPSSTR}" -s "${SRCVIDEOSIZE}" $FFMPEGQUALITYENC "$OUTTEMPDIR/$TMPVIDEO"`

Any ideas how this can be fixed?

RL.

impca commented 6 years ago

Can you try the fix mentioned here?

https://github.com/ultramango/gear360pano/pull/44#issuecomment-361947139

ultramango commented 6 years ago

Should be fixed now - I didn't check properly xargs "fix".

Note: I've noticed, as someone already noted, extra frames being added to video - I don't know yet why it happens. Every second extra 6 frames are added.

Please reopen if problem persists.