Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (53)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (5229)

  • Converting .3gp file into mp4 file in android using ffmpeg

    8 août 2013, par user2171513

    I want to convert .3gp file into .mp4 file with resolution modified in Android using ffmpeg.
    I want to increase the resolution of the video from its standard resolution to 1920x1080.

    So far I have been successful in
    1) extracting .h264 video file from .3gp file and increase its resolution
    2) extracting .aac audio file from .3gp file.

    Now I want to combine them back into .mp4 file. The commands that I have used to extract this .h264 and .aac files are :

    ./ffmpeg -i 1.3gp -vbsf h264_mp4toannexb -s 1920x1080 1.h264
    ./ffmpeg -i 1.3gp -ab 160k -ac 2 -ar 48000 -vn -strict -2  1.aac

    The command that I have tried to merge them back is

    ./ffmpeg -i 1.h264 -i 1.aac -map 0:0 -map 1:0 -strict -2 1.mp4

    The 1.mp4 that gets generated at the end basically has audio only at few sync frames of video. (Thats what I feel , because the audio is present at specific intervals within the video)

    Can anyone please help in figuring out what am I missing here.

    EDIT :
    So basically I want to concat 4 different videos of 4 different resolution and type.

    1)

    ./ffmpeg -i 1.mp4
    Video: h264 (High), yuv420p, 1920x1080, 16959 kb/s, 29.85 fps, 90k tbr, 90k tbn, 180k tbc
    Audio: aac, 48000 Hz, stereo, s16, 106 kb/s

    2)

    ffmpeg -i 2.mp4
    Video: h264 (Constrained Baseline), yuv420p, 640x480, 3102 kb/s, 29.99 fps, 90k tbr, 90k tbn, 180k tbc
    Audio: aac, 48000 Hz, stereo, s16, 93 kb/s

    3)

    ffmpeg -i 3.3gp
    Video: h263, yuv420p, 1408x1152 [PAR 12:11 DAR 4:3], 2920 kb/s, 15 fps, 15 tbr, 15360 tbn, 29.97 tbc
    Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s

    4)

    ffmpeg -i 4.3gp
    Video: h264 (High), yuv420p, 352x288 [PAR 12:11 DAR 4:3], 216 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc
    Audio: aac, 44100 Hz, stereo, s16, 92 kb/s

    So I am converting them to mpegts using following commands

    ./ffmpeg -i 1.mp4 -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 1.ts
    ./ffmpeg -i 2.mp4 -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 2.ts
    ./ffmpeg -i 3.3gp -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 3.ts
    ./ffmpeg -i 4.3gp -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 4.ts

    then concatenating the .ts files into f.ts and then creating a final .mp4 file from it using

    cat 1.ts 2.ts 3.ts 4.ts > f.ts
    ./ffmpeg -i f.ts -c copy -bsf:a aac_adtstoasc output.mp4

    But my f.ts also doesnt seem to play correctly in VLC on linux, it plays first 2 mp4's video + audio and it plays last .3gp's audio only.(Same for output.mp4 too) Could you please help me in figuring out what am I missing ?

    Thanks

  • Tools/Techniques for investigating video corruption — ffmpeg / libavcodec

    17 juillet 2013, par Gopherkhan

    In my current work I'm trying to encode some images to h264 video using the FFMPEG's C library. The resulting video plays fine in VLC, but has no preview image. The video can play in VLC and Mplayer on ubuntu, but won't play on Mac or PC (in fact, it causes a "VTDecoderXPCService quit unexpectedly" error on Mac).

    If I run the resulting file through FFMPEG using the command line, the resulting file has a preview image, and plays correctly everywhere.

    Apparently the file that I get out of the program is corrupt in some weird place, but I don't have any output during my compilation or run to indicate where. I can't share my code at the moment (work code isn't open source yet :-( ), but I have tried a number of things :

    1. Writing only header and trailer data (av_write_trailer) and no frames
    2. writing frames only minus the trailer (using avcodec_encode_video2 and av_write_frame)
    3. Adjusting our time_base and frame pts values to encode only one frame per second
    4. Removing all variable frame rate code
    5. Numerous other variants that I won't bother you with here

    In creating my project, I've also followed the following tutorials :

    And consulted the deprecated ffmpeg functions list

    And compiled FFMPEG on ubuntu according to the official doc

    And consulted numerous StackOverflow questions :

    But every run of the program runs into the exact same problem.

    My question is, is there anything obvious that causes a programmatic run of FFMpeg to differ from a console run (e.g., an incomplete finalization, some threading issues, etc.) ? Like some obvious reason that a console run could repair a corrupted file ? Or is there a decent tool/method for inspecting a video file and finding the point of corruption ?

  • Running ffmpeg command on Android results in "Unable to find a suitable output format for ' -map 0:v:0 -map 1:a:0'"

    5 juin 2017, par Akash Dubey

    I am using this command for replacing audio of video and genrate new video having new audio. Here file1 is my video.mp4, file2 is my audio.mp3 and output would be the output.mp4 :

    complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-c", "copy", " -map 0:v:0 -map 1:a:0", rootPath + "/output.mp4"};

    Below is My code :

       private void changeAudioofVideo(String selectedUri, String videoPath) {

       String[] complexCommand;


       File f = new File("/storage/emulated/0");
       if (!f.getParentFile().exists())
           f.getParentFile().mkdirs();
       if (!f.exists())
           try {
               f.createNewFile();
           } catch (IOException e) {
               e.printStackTrace();
           }

       file1 = new File(videoPath);
       if (file1.exists()) {
           Log.d("yes", "File 1 exists");
       } else {
           Log.d("no", "File 1 not exists");
       }

       file2 = new File(selectedUri);
       if (file2.exists()) {
           Log.d("yes", "File 1 exists");
       } else {
           Log.d("no", "File 1 not exists");
       }

       String rootPath = f.getPath();

       complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-c", "copy", " -map 0:v:0 -map 1:a:0", rootPath + "/output.mp4"};

       FFmpeg ffmpeg = FFmpeg.getInstance(this);

       try {
           //Load the binary
           ffmpeg.loadBinary(new LoadBinaryResponseHandler() {

               @Override
               public void onStart() {
               }

               @Override
               public void onFailure() {
               }

               @Override
               public void onSuccess() {
               }

               @Override
               public void onFinish() {
               }
           });
       } catch (FFmpegNotSupportedException e) {
           // Handle if FFmpeg is not supported by device
           Toast.makeText(getApplicationContext(), "Not Supported by Device", Toast.LENGTH_LONG).show();
       }

       try {

           final String finalRootPath = rootPath;
           ffmpeg.execute(complexCommand, new FFmpegExecuteResponseHandler() {
               @Override
               public void onSuccess(String message) {
                   Log.d("Success", message);

                   Toast.makeText(getApplicationContext(), "Successful" + finalRootPath.toString(), Toast.LENGTH_LONG).show();
                   Uri path = Uri.parse(finalRootPath + "/output.mp4");
                   playVideo(path.toString());

               }

               @Override
               public void onProgress(String message) {
                   Log.d("progress", message);
                   pd.show();
               }

               @Override
               public void onFailure(String message) {
                   Log.d("failure", message);
                   pd.dismiss();

               }

               @Override
               public void onStart() {
                   Log.d("Start", "merge started");
               }

               @Override
               public void onFinish() {
                   Log.d("finish", "merge finish");
                   pd.dismiss();
               }
           });
       } catch (FFmpegCommandAlreadyRunningException e) {
           e.printStackTrace();
       }


      }

    Below is my output :

      05-26 18:39:35.533 29188-29188/com.example.codal.videotm D/failure: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
                                                                     built with gcc 4.8 (GCC)
                                                                     configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-and    roid/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
                                                                     libavutil      55. 17.103 / 55. 17.103
                                                                     libavcodec     57. 24.102 / 57. 24.102
                                                                     libavformat    57. 25.100 / 57. 25.100
                                                                     libavdevice    57.  0.101 / 57.  0.101
                                                                     libavfilter     6. 31.100 /  6. 31.100
                                                                     libswscale      4.  0.100 /  4.  0.100
                                                                     libswresample   2.  0.101 /  2.  0.101
                                                                     libpostproc    54.  0.100 / 54.  0.100
                                                                   Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/videokit/out2.mp4':
                                                                     Metadata:
                                                                       major_brand     : isom
                                                                       minor_version   : 512
                                                                       compatible_brands: isomiso2mp41
                                                                       encoder         : Lavf56.23.100
                                                                       comment         : Courtesy of National Geographic.  Used by Permission.
                                                                     Duration: 00:00:04.20, start: 0.046440, bitrate: 577 kb/s
                                                                       Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 160x120 [SAR 9:16 DAR 3:4], 521 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default)
                                                                       Metadata:
                                                                         handler_name    : VideoHandler
                                                                       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 50 kb/s (default)
                                                                       Metadata:
                                                                         handler_name    : SoundHandler
                                                                   [mp3 @ 0xb86ade60] Skipping 0 bytes of junk at 132692.
                                                                   [mjpeg @ 0xb86c9980] Changing bps to 8
                                                                   [mp3 @ 0xb86ade60] Estimating duration from bitrate, this may be inaccurate
                                                                   Input #1, mp3, from '/storage/emulated/0/Download/01 Kaari Kaari - Dobaara.mp3':
                                                                     Metadata:
                                                                       album           : Dobaara (SongsMp3.Co)
                                                                       artist          : Arko , Asees Kaur
                                                                       album_artist    : Arko & Asees Kaur
                                                                       composer        : Arko
                                                                       performer       : SongsMp3.Co
                                                                       copyright       : SongsMp3.Co
                                                                       disc            : 1/1
                                                                       encoded_by      : iTunes 12.6.0.100
                                                                       genre           : Bollywood
                                                                       TEXT            : SongsMp3.Co
                                                                       TPE4            : SongsMp3.Co
                                                                       TRSN            : SongsMp3.Co
                                                                       TOPE            : SongsMp3.Co
                                                                       TOLY            : SongsMp3.Co
                                                                       publisher       : SongsMp3.Co
                                                                       title           : Kaari Kaari (SongsMp3.Co)
                                                                       track           : 1/1
                                                                       date            : 2017
                                                                     Duration: 00:03:46.72, start: 0.000000, bitrate: 324 kb/s
                                                                       Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
                                                                       Stream #1:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 600x600 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
                                                                       Metadata:
                                                                         comment         : Cover (front)
                                                                   [NULL @ 0xb86cab70] Unable to find a suitable output format for ' -map 0:v:0 -map 1:a:0'
                                                                    -map 0:v:0 -map 1:a:0: Invalid argument
    05-26 18:39:35.543 29188-29188/com.example.codal.videotm D/ViewRootImpl: #3 mView = null
    05-26 18:39:35.543 29188-29188/com.example.codal.videotm D/finish: merge finish