Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • What h.264 format loads on android AND IOS ?

    13 février 2017, par JKirchartz

    Theoretically both IOS and ANDROID will play h.264 files, but I can't figure out a setting to encode them so they actually work cross platform. Does anybody know how to encode for both Android and IOS using one file?

    p.s. I know all about html5 video and the fallback sources, I just don't want to encode and host a new video for every device that comes down the pike.

  • Converting Video for Android using FFMPEG

    13 février 2017, par Jebu

    What i am trying to do is convert video into mp4 format that will play in Android.

    I've gone through http://developer.android.com/guide/appendix/media-formats.html

    I am setting the following options

    -vcodec libx264 -vprofile baseline -acodec libfaac -ar 44100 -ac 1 -ab 128k yet I get the error message "Sorry, This Video is not valid for streaming to this device"

    I Played the video in android browser using videoJS http://video-js.zencoder.com/oceans-clip.mp4 and it WORKS fine.

    I download the video oceans-clip.mp4 and tried to convert using minimalist options

    -y -i working.mp4 -vprofile baseline pleasework.mp4

    yet I get the same error message.

    The following is the FFMPEG info dump of the video files

    Working.mp4

    Array
    (
        [0] => ffmpeg version N-40229-g24e3f44-syslint Copyright (c) 2000-2012 the FFmpeg developers
        [1] =>   built on Apr 29 2012 22:01:41 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
        [2] =>   configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
        [3] =>   libavutil      51. 48.100 / 51. 48.100
        [4] =>   libavcodec     54. 17.101 / 54. 17.101
        [5] =>   libavformat    54.  3.100 / 54.  3.100
        [6] =>   libavdevice    53.  4.100 / 53.  4.100
        [7] =>   libavfilter     2. 72.100 /  2. 72.100
        [8] =>   libswscale      2.  1.100 /  2.  1.100
        [9] =>   libswresample   0. 11.100 /  0. 11.100
        [10] =>   libpostproc    52.  0.100 / 52.  0.100
        [11] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'working.mp4':
        [12] =>   Metadata:
        [13] =>     major_brand     : isom
        [14] =>     minor_version   : 1
        [15] =>     compatible_brands: isomavc1
        [16] =>     creation_time   : 2010-05-18 04:24:00
        [17] =>   Duration: 00:00:46.54, start: 0.000000, bitrate: 3342 kb/s
        [18] =>     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x264 [SAR 132:133 DAR 320:133], 3195 kb/s, SAR 127:128 DAR 635:264, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
        [19] =>     Metadata:
        [20] =>       creation_time   : 2010-05-18 04:24:00
        [21] =>       handler_name    : GPAC ISO Video Handler
        [22] =>     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 144 kb/s
        [23] =>     Metadata:
        [24] =>       creation_time   : 2010-05-18 04:24:01
        [25] =>       handler_name    : GPAC ISO Audio Handler
        [26] => At least one output file must be specified
    )
    

    Not Working.mp4

    Array
    (
        [0] => ffmpeg version N-40229-g24e3f44-syslint Copyright (c) 2000-2012 the FFmpeg developers
        [1] =>   built on Apr 29 2012 22:01:41 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
        [2] =>   configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
        [3] =>   libavutil      51. 48.100 / 51. 48.100
        [4] =>   libavcodec     54. 17.101 / 54. 17.101
        [5] =>   libavformat    54.  3.100 / 54.  3.100
        [6] =>   libavdevice    53.  4.100 / 53.  4.100
        [7] =>   libavfilter     2. 72.100 /  2. 72.100
        [8] =>   libswscale      2.  1.100 /  2.  1.100
        [9] =>   libswresample   0. 11.100 /  0. 11.100
        [10] =>   libpostproc    52.  0.100 / 52.  0.100
        [11] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pleasework.mp4':
        [12] =>   Metadata:
        [13] =>     major_brand     : isom
        [14] =>     minor_version   : 512
        [15] =>     compatible_brands: isomiso2avc1mp41
        [16] =>     creation_time   : 2010-05-18 04:24:00
        [17] =>     encoder         : Lavf54.3.100
        [18] =>   Duration: 00:00:46.54, start: 0.000000, bitrate: 1843 kb/s
        [19] =>     Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x264 [SAR 127:128 DAR 635:264], 1715 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
        [20] =>     Metadata:
        [21] =>       creation_time   : 2010-05-18 04:24:00
        [22] =>       handler_name    : VideoHandler
        [23] =>     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 124 kb/s
        [24] =>     Metadata:
        [25] =>       creation_time   : 2010-05-18 04:24:00
        [26] =>       handler_name    : SoundHandler
        [27] => At least one output file must be specified
    )
    

    The metadata looks almost the same yet it doesn't seem to play in android. Any help appreciated.

  • complex ffmpeg command line to Node fluent ffmpeg

    13 février 2017, par Faellor

    I have read the other question on command line input to Node Fluent ffmpeg but the command I am trying to execute is more complex and any ideas are appreciated.

    ffmpeg -i cut2.mp4 -c copy -an nosound2.mp4 && ffmpeg -i nosound2.mp4 -vf reverse reversednosound2.mp4 && ffmpeg -f concat -i inputs.txt -vcodec copy -acodec copy 2sec.mp4
    

    It is far from optimal because I am saving every video created with middle steps. I need to pipe the output of one command to the other command but I have no idea on how to do that with Node fluent-ffmpeg module.

    Any attempts to write this command with Node fluent-ffmpeg is greatly appreciated

  • OpenCV cannot read some mp4 files, converting to avi doesn't help either

    13 février 2017, par Miranda

    I'm trying to read some video files that have mp4 format using OpenCV python. I didn't have any problem with any other mp4 video that I have used so far, but for some reason, videocapture cannot read these mp4 video files. My problem is not like this (I already applied this renaming of mmpeg when I first installed opencv). Besides, as I mentioned earlier videocapture can read other mp4 videos, but not these ones. I also tried to convert the video into avi, but still videocapture cannot read the video (I use other avi files with no problem). The videos that I'm using come from this dataset.

  • ffmpeg copy video in video with a specific time

    13 février 2017, par Alkl

    Im new in this topic (beginner) and Im german... So it's a bit difficult to find the correct words...

    I'll try to explain what I've done and what I want to do:

    1. Extract video area from the original video converted in PRORES codec:

      ffmpeg.exe -i test.mkv -ss 00:06:21.99 -t 00:00:01.94 -async 1 -strict -2 -c:v prores_ks -pix_fmt yuva444p10le -profile:v 4444 -bits_per_mb 8000 -s 1920x1080 cut_video.mov

    2. Edit the cut in After Effects

    3. Convert the PRORES in Matroska

      ffmpeg.exe -i "C:\Users\Alex\Desktop\ffmpeg-20170202-08b0981-win64-static\bin\cut_video\cut_video.mov" -vcodec ffv1 -acodec pcm_s16le temp.mkv

    4. Replace the video area in the originale video file at the time 00:06:21.99...

    I spend 4 hours for the two commands... So I despair at the fourth step. Is it possible? Can you help me?

    I made a picture, so you can understand better what Im doing...: http://i.imgur.com/HqlNxzW.jpg

    Best regards from germany,

    Alex