Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • FFMPEG concat audio and videos produces only audio

    19 septembre 2019, par justaguytrynabuildawebsite

    Im trying to combine multiple video files with a single audio file. When using only videos without audio, it works fine but when adding a audio track to the beginning of the concat file i get the return below, and the output.mp4 becomes just audio with no video when previewing in browser. FFMPEG command

    ffmpeg -f concat -safe 0 -i /var/www/html/video_tool/edit/out/concat.txt -c copy -flags +global_header /var/www/html/video_tool/edit/out/output.mp4
    

    concat.txt

    #CONCAT FILE
    file '/var/www/html/video_tool/edit/audio/sound.mp3'
    file '/var/www/html/video_tool/edit/vids/frame_0.mp4'
    file '/var/www/html/video_tool/edit/vids/frame_1.mp4'
    file '/var/www/html/video_tool/edit/vids/frame_2.mp4'
    file '/var/www/html/video_tool/edit/vids/frame_3.mp4'
    

    Output

    ffmpeg version 4.1.3-0york1~16.04 Copyright (c) 2000-2019 the FFmpeg developers
      built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
      configuration: --prefix=/usr --extra-version='0york1~16.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libavresample   4.  0.  0 /  4.  0.  0
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    [mp3 @ 0x5635174e08c0] Estimating duration from bitrate, this may be inaccurate
    Input #0, concat, from '/var/www/html/video_tool/edit/out/concat.txt':
      Duration: N/A, start: 0.000000, bitrate: 192 kb/s
        Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
    Output #0, mp4, to '/var/www/html/video_tool/edit/out/output.mp4':
      Metadata:
        encoder         : Lavf58.20.100
        Stream #0:0: Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x5635174e38c0] Auto-inserting h264_mp4toannexb bitstream filter
    [mp4 @ 0x5635174e5080] Non-monotonous DTS in output stream 0:0; previous: 9897984, current: 8976; changing to 9897985. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x5635174e5080] Non-monotonous DTS in output stream 0:0; previous: 9897985, current: 8977; changing to 9897986. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x5635174e5080] Non-monotonous DTS in output stream 0:0; previous: 9897986, current: 8979; changing to 9897987. This may result in incorrect timestamps in the output file.
    [mp4 @ 0x5635174e5080] Non-monotonous DTS in output stream 0:0; previous: 9897987, current: 8980; changing to 9897988. This may result in incorrect timestamps in the output file.
    etc, etc...
    size=    5347kB time=00:03:44.44 bitrate= 195.1kbits/s speed=2.91e+03x    
    video:0kB audio:5311kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.664769%
    
  • How to convert the format of the media source for exoplayer ?

    18 septembre 2019, par Dinu Nicolae

    Is it possible to convert the format of the media source when playing a video with exoplayer? I thought that I could use FFMPEG to convert the format, but I do not really know how exoplayer works and the problem is that the media source is not a file, but a stream. It is avi format, which unfortunately is not supported by exoplayer, and I could not find any working player for android that has avi support.

    I see there is a ffmpeg extension for exoplayer, but I do not know if that will solve my problem and I have no idea about NDK and compiling c++ for android and the instructions are very unclear. If someone could explain how to do it or give me a guide that would be nice. This is the link to the exoplayer extension: ffmpeg extension

  • How to reduce video size with java/kotlin on Android ?

    18 septembre 2019, par Pablo DbSys

    I want reduce the video size at Android Studio and for upload to PlayStore needs to be compatible for 64 bits arquitecture, I tried before with ffmpeg and it compress mp4 succefully but take longer time and this solution with 3gp not include the audio. Theres another option or library to compress mp4 and 3gp with audio and video?

  • I'm trying to build a video editing app for android [on hold]

    18 septembre 2019, par void

    I am trying to build a video editing app and i don't really have any idea to go about it, I've heard of tools like FFmpeg but don't know how to implement it

    trying to trim video. apply effects covert multiple pictures into videos record with camera.

  • The audio disappears from 2/3 of the video after speeding up with ffmpeg

    18 septembre 2019, par AlexZheda

    I have tried to speed up a video file (with the audio stream) 8 times with ffmpeg using the script below. All works well that from a 50 hour video I get a 7-hour video with the audio sped up also, yet in the resulting file the audio lasts for just over 2 hours and silences after that, i.e. there video without audio.

    ffmpeg -i video.mp4 -filter_complex "[0:v]setpts=0.5*PTS,setpts=0.5*PTS,setpts=0.5*PTS[v];[0:a]atempo=2.0,atempo=2.0,atempo=2.0[a]" -map "[v]" -map "[a]" video_x8.mp4
    

    EDIT: video.mp4 file enter image description here

    video_x8.mp4 file (naming is different for the clear picture) enter image description here

    EDIT 1. Here are the full 100MB logs. https://gofile.io/?c=L0Au2e

    EDIT 2: Thank you Gyan. But could you please help me write it in 1 command so that it works in 1 go? enter image description here