Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • FFMPEG not extracting all the frames from a video

    19 mai 2018, par Jonathan Huang

    I am trying to extract all the frames from a video in order to get some training data for a tensor flow project. However whenever I run

    ffmpeg -i one.mp4 -r 1/1 "$filename%03d.jpeg"
    

    I only get 15 pictures. My phone films in 30fps, and the video was 13 seconds long, so shouldn't I get roughly 490 pictures?

    Is there an error in my understanding or am I using the wrong function?

  • Use ffmpeg to time-dilate and resample audio without changing frequencies

    18 mai 2018, par Adisak

    I have some audio (wave file) that is sampled at a rate of 48000 samples per second.

    This audio was created to match a 30 FPS video. However, the video actually plays back on the target at the NTSC framerate of 29.97 (30 X 1000/1001).

    This means that I need to time-dilate the audio so that there are 48048 samples where there were previously 48000 samples (it plays back 1.001 times slower) but still maintains that the final audio file's rate is 48000 samples per second.

    Ideally, also, I'd like to do this resample using the sox library option for FFMPEG since I hear it has much higher quality.

    Can anyone help me with the command line necessary to process a file in this manner?

  • Downloading a specific segment of a YouTube video

    18 mai 2018, par BlueStone

    I normally download files or parts of them using ffmepg command.

    ffmpeg -ss 00:05:00 -i "video url here "   -t 100 -c copy   -avoid_negative_ts 1 out.mkv  
    

    Now, downloading a YouTube video is not problem using youtube-dl, but I want to download specific part of a video (1080p+), I thought I could use youtube-dl to grab the link of the video and pass it to ffmpeg to do the cutting with the previous code, but could not figure how to do this.

    Searched and tried many commands and stuff here and there, but nothing worked.

  • Adding audio to mp4 using ffmpeg at certain offset gives output file #0 does not contain any stream

    18 mai 2018, par Armand

    I am attempting to add audio to a MP4 file using ffmpeg at a specific time, eventually I also want the audio to only play until a certain point, so if you can help with that also that would be great, otherwise if you can just assist me in figuring out what is causing this error.

    The arguments I use

    -y "E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4" -itsoffset  -i "E:\Downloads\wetransfer-250b26\05 Call of Love.mp3" -map 0:0 -map 1:0 -c:v copy -shortest "E:\Documents\Content Bar\Photo Booth\PhotosDrop\2018-05-15 14-01-16OUTOUT.mp4"
    

    This results in the following error:

    ffmpeg version N-81646-gc19da0c Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
      libavutil      55. 29.100 / 55. 29.100
      libavcodec     57. 55.101 / 57. 55.101
      libavformat    57. 48.103 / 57. 48.103
      libavdevice    57.  0.102 / 57.  0.102
      libavfilter     6. 62.100 /  6. 62.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    Output #0, mp4, to 'E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4':
    Output file #0 does not contain any stream
    
  • Extract video thumbnail using PHP without ffmpeg

    18 mai 2018, par SharpAffair

    The question is similar to: Is there any way to create a video thumbnail through PHP without ffmpeg? However, that thread is 6-year old and technologies have evolved since then.

    Any way to extract a thumbnail from uploaded MP4 file using PHP?

    Ffmpeg is great, but unfortunately unsupported on shared hosting accounts, requiring a dedicated server. And it's a kinda overkill to use ffmpeg's power just to generate a video preview picture.

    Any other simple solution?