ultramango / gear360pano

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

Audio Video async (solved) #10

Closed OWKenobi closed 7 years ago

OWKenobi commented 7 years ago

Hi,

I realized that the output videos had a slight AV-Desync problem. I figured out that the ffmpeg parameters were wrong; the -r 30 was ignored, and the videos only had 25 frames per second.

The following commands work as expected; you might consider using one of the "cheaper" codecs, cause using the h264 codec, even my Quadcore pc cannot play back the videos in real time using the GoProVRPlayer. (Any suggestions are welcome!)

Anyways: these are the variants I tested:

full size, full quality. No Idea how to play back the video file.

run_command ffmpeg -f image2 -framerate 30 -i "$OUTTEMPDIR/$IMAGETMPL" -s 3840:1960 -vcodec libx264 "$OUTTEMPDIR/video.mp4"

medium size with 264 compression - small video, choppy playback

run_command ffmpeg -f image2 -framerate 30 -i "$OUTTEMPDIR/$IMAGETMPL" -s 1920:960 -vcodec libx264 "$OUTTEMPDIR/video.mp4"

cpu-friendly codec; bigger files, but runs smooth on a quadcore cpu. RECOMMENDED

run_command ffmpeg -f image2 -framerate 30 -i "$OUTTEMPDIR/$IMAGETMPL" -s 2880:720 -vcodec mpeg2video -qscale:v 4 "$OUTTEMPDIR/video.mp4"

cpu friendly low resolution: runs on a netbook.

run_command ffmpeg -f image2 -framerate 30 -i "$OUTTEMPDIR/$IMAGETMPL" -s 1920:960 -vcodec mpeg2video -qscale:v 4 "$OUTTEMPDIR/video.mp4"