Comments (25)
Did you try some other videos like the misc/original.gif in the project folder? Also make sure you are using the following configuration: pytorch 0.4.1 and python 3.6? If you are running on linux then the code hasn't been tested on linux yet. Also can you specify any changes you made to the project files. Look at #7, maybe it will help you.
from super-slomo.
@avinashpaliwal hello avinash i have the same issue,,,i run on linux and set the sf=3x while fps=30
and total number of frames in video 378 which becomes 1134 output frames (as sf=3x), and i have given the save video path as "/media/disk1/s_slomo/output_vid/our_new.mp4" where our_new.mp4 i set as the name of the video to be saved,,,,(here i have question that i should specify the path with video name or not, i mean give my own new name),,,,but, when i open i have only one frame in the out video and the time of video is just 00:00 secs.......
from super-slomo.
@avinashpaliwal continuing from the above question,,,i have seen the code for create video,,,,where you just takes the path of output directory as input
and there is no for loop used to get all the generated frames...is this could be the issue?
from super-slomo.
@avinashpaliwal continuing from the above question,,,i have seen the code for create video,,,,where you just takes the path of output directory as input
and there is no for loop used to get all the generated frames...is this could be the issue?
That's not an issue, ffmpeg
iterates over the consecutive images in the temp folder by specifying the %d
in the command.
Follow this, and look at the files generated in the tmpSuperSloMo
folder. Also if you don't specify the output, it will generate output.mp4 in the project directory. So, you can try that as well.
from super-slomo.
@avinashpaliwal i have all output frames,,,however, when it calls create_video(outputPath),,,the output file has only one frame,,,i have also specified the output path with video name as:
/Users/Documents/Samples/save_vid/output.mp4,,,,,,however the output is single frame only.
output.mp4.zip
Also, in my output frames the frame sizes are changing for every single frame,,,,
Input stream #0:0 frame changed from size:512x1152 fmt:yuvj420p to size:540x1168 fmt:yuvj420p
Input stream #0:0 frame changed from size:540x1168 fmt:yuvj420p to size:512x1152 fmt:yuvj420p
from super-slomo.
@avinashpaliwal i mean the outputPath in create_video(outputPath) is the temporary folder where all the generated frames are, while, the save output path is set to the value above.
from super-slomo.
I have pushed an update to fix the size issue. Can you post the output of your script?
from super-slomo.
@avinashpaliwal what do you mean by output?
from super-slomo.
@avinashpaliwal you mean the output video??
from super-slomo.
@eng100200 When you run the script, all the stuff that it prints out in the terminal. Similar to this.
from super-slomo.
@avinashpaliwal got it you mean changing video size....
from super-slomo.
@avinashpaliwal wait i run and check,,,,while,,,,,i dont know that whether the output video have all the frames!,,,,it is still unsolved
from super-slomo.
@avinashpaliwal you have provided this code now>>
def create_video(dir):
error = ""
print('{} -r {} -i {}/%d.jpg -qscale:v 2 {}'.format(os.path.join(args.ffmpeg_dir, "ffmpeg"), args.fps, dir, args.output))
retn = os.system('{} -r {} -i {}/%d.jpg -crf 17 -vcodec libx264 {}'.format(os.path.join(args.ffmpeg_dir, "ffmpeg"), args.fps, dir, args.output))
if retn:
error = "Error creating output video. Exiting."
return error
however, when i run the code on my saved frames on my mac,,,the output video is still a single frame as i provided you earlier
from super-slomo.
@eng100200 Yes. That update just fixes the size issue with some minor changes. Can you post the terminal output of your script here. Something like this-
bash
ffmpeg version N-92730-g978c935f2f Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 24.101 / 56. 24.101
libavcodec 58. 42.103 / 58. 42.103
libavformat 58. 24.101 / 58. 24.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 46.101 / 7. 46.101
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, gif, from 'misc/original.gif':
Metadata:
comment : Created with ezgif.com video to GIF converter
Duration: 00:00:01.24, start: 0.000000, bitrate: 23630 kb/s
Stream #0:0: Video: gif, bgra, 480x270 [SAR 64:64 DAR 16:9], 25 fps, 25 tbr, 100 tbn, 100 tbc
Stream mapping:
Stream #0:0 -> #0:0 (gif (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0000013aa0851000] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'tmpSuperSloMo\input/%06d.jpg':
Metadata:
comment : Created with ezgif.com video to GIF converter
encoder : Lavf58.24.101
Stream #0:0: Video: mjpeg, yuvj444p(pc), 480x270 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.42.103 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 31 fps=0.0 q=2.0 Lsize=N/A time=00:00:01.24 bitrate=N/A speed=5.92x
video:1852kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
0%| | 0/30 [00:00<?, ?it/s]C:\Users\avina\Anaconda3\envs\PyTorch\lib\site-packages\torch\nn\functional.py:2423: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
C:\Users\avina\Anaconda3\envs\PyTorch\lib\site-packages\torch\nn\functional.py:1332: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
100%|██████████████████████████████████████████████████████████████████████| 30/30 [00:03<00:00, 10.95it/s]
ffmpeg -r 30.0 -i tmpSuperSloMo\output/%d.jpg -qscale:v 2 C:\Users\avina/abcoutput.mp4
ffmpeg version N-92730-g978c935f2f Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 24.101 / 56. 24.101
libavcodec 58. 42.103 / 58. 42.103
libavformat 58. 24.101 / 58. 24.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 46.101 / 7. 46.101
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, image2, from 'tmpSuperSloMo\output/%d.jpg':
Duration: 00:00:02.40, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 480x270 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 000002286bebccc0] using SAR=1/1
[libx264 @ 000002286bebccc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000002286bebccc0] profile High, level 2.1, 4:2:0, 8-bit
[libx264 @ 000002286bebccc0] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1
chroma_qp_offset=-2 threads=8 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:\Users\avina/abcoutput.mp4':
Metadata:
encoder : Lavf58.24.101
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 480x270 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc58.42.103 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 60 fps=0.0 q=-1.0 Lsize= 755kB time=00:00:01.90 bitrate=3253.4kbits/s speed=6.75x
video:753kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.202813%
[libx264 @ 000002286bebccc0] frame I:1 Avg QP:19.43 size: 31548
[libx264 @ 000002286bebccc0] frame P:15 Avg QP:20.33 size: 24325
[libx264 @ 000002286bebccc0] frame B:44 Avg QP:24.05 size: 8501
[libx264 @ 000002286bebccc0] consecutive B-frames: 1.7% 0.0% 5.0% 93.3%
[libx264 @ 000002286bebccc0] mb I I16..4: 0.0% 100.0% 0.0%
[libx264 @ 000002286bebccc0] mb P I16..4: 0.0% 12.2% 1.6% P16..4: 17.1% 38.3% 30.8% 0.0% 0.0% skip: 0.0%
[libx264 @ 000002286bebccc0] mb B I16..4: 0.0% 0.4% 0.1% B16..8: 27.3% 13.5% 7.7% direct:33.5% skip:17.5% L0:15.5% L1:12.8% BI:71.7%
[libx264 @ 000002286bebccc0] 8x8 transform intra:91.6% inter:78.5%
[libx264 @ 000002286bebccc0] coded y,uvDC,uvAC intra: 99.0% 89.7% 31.9% inter: 73.9% 53.6% 12.1%
[libx264 @ 000002286bebccc0] i16 v,h,dc,p: 0% 100% 0% 0%
[libx264 @ 000002286bebccc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 26% 22% 6% 4% 5% 5% 7% 11%
[libx264 @ 000002286bebccc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 30% 13% 6% 7% 8% 7% 6% 9%
[libx264 @ 000002286bebccc0] i8c dc,h,v,p: 55% 26% 15% 4%
[libx264 @ 000002286bebccc0] Weighted P-Frames: Y:13.3% UV:0.0%
[libx264 @ 000002286bebccc0] ref P L0: 50.9% 12.7% 26.8% 8.7% 1.1%
[libx264 @ 000002286bebccc0] ref B L0: 88.9% 9.8% 1.3%
[libx264 @ 000002286bebccc0] ref B L1: 98.5% 1.5%
[libx264 @ 000002286bebccc0] kb/s:3081.86
from super-slomo.
what is this 0%| | 1/376 [03:21<20:59:47, 201.57s/it] ??
from super-slomo.
@avinashpaliwal
what is this status bar for
reading frames from video or generating frames for frames
from super-slomo.
what is this 0%| | 1/376 [03:21<20:59:47, 201.57s/it] ??
That's the progress bar for generating frames. I guess the bar doesn't display properly in MAC. I will also need the output at the end (after the progress bars)
from super-slomo.
@avinashpaliwal i would proovide you as soon as finsihed
from super-slomo.
@Brizel did you resolve the issue of getting video,,,,?
from super-slomo.
@avinashpaliwal can you send me your email?
from super-slomo.
@avinashpaliwal my email [email protected]
from super-slomo.
@avinashpaliwal
what is this status bar for
reading frames from video or generating frames for frames
generating frames for frames.
you need 20hours to compete the job? on CPU?
from super-slomo.
@avinashpaliwal
what is this status bar for
reading frames from video or generating frames for framesgenerating frames for frames.
you need 20hours to compete the job? on CPU?
It depends on factors like the number of frames to be interpolated and resolution of video but yes it is much slower on CPU. In @eng100200 case, it is taking him ~ 20 hours to interpolate between 376 original frames.
from super-slomo.
@avinashpaliwal in your code
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
i have used CUDA_VISIBLE_DEVICES=0 nohup train.py ,,,,,and run the code,,,however the train.py is using cpu only...
i have GPU>0 and free
from super-slomo.
CUDA_VISIBLE_DEVICES=0 nohup train.py
Do you have multiple GPUs? I have never worked with multiple GPUs and have not used the CUDA_VISIBLE_DEVICES variable.
from super-slomo.
Related Issues (20)
- ffmpeg error while running evaluation code. HOT 1
- Output interpolated image frames are of different size then input frames?
- What is the function of transforms.Normalize(mean=negmean, std=std)? Why use a negative mean?
- Error converting file:D:\Coding\JAVASCRIPT\recless\out\4fpsRecording.mkv. Exiting.
- PackagesNotFoundError: torchvision-cpu==0.2.0 HOT 3
- Runtime Error (Traceback Attached) HOT 23
- Frames are not extracted for any input video
- Differences with butterflow
- Slowdown a point of the video HOT 1
- Why Are fps And sf Setting Separate And Update ReadMe HOT 2
- "index 1 is out of bounds for dimension 0 with size 1" HOT 2
- Reference frames are different from the original ones. HOT 1
- sh: /Users/*/Downloads/ffmpeg/ffmpeg: No such file or directory HOT 2
- Add local file to Google Colab?? Or change length??
- How can I find the dataset of 240-fps video from YouTube HOT 1
- Training
- Objective metrics
- Could be faster by not saving PNG frames
- Image edge flicker
- low rate of utilization in test video
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from super-slomo.