Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • MediaController / VideoView can't play mp4 on certain phones

    29 août 2017, par Nicholas Muir

    From within my app I create a video from images that the user has taken using Ffmpeg. I the play this using MediaController and a VideoView. When I run the app using the Genymotion emulator for a Google Nexus 4 the video file plays without issue. When I use the Genymotion emulator for a Samsung Galaxy S4 I get an error from the VideoView on error listener say "Can't play video".

    Thanks for your help.

  • Can ffmpeg extract the motion vectors from VP9 videos ?

    29 août 2017, par John Allard

    And if it can, are the motion vectors similar to how they are in H264?

    I ask because I can run a command like

    ffmpeg -y -loglevel error -flags2 +export_mvs -i "$1" -vf codecview=mv=pf+bf+bb /tmp/mot
        ion_vectors.mp4
    

    then view it with VLC and see the motion vectors superimposed upon the video. If I try this with a VP9 encoded video I'm unable to see them.

  • How can I play .g726 file with ffplay ?

    29 août 2017, par user8531025

    I have encoded sound file in .g726 file format. Now I want to play this sound file in my windows 10 (64bit) pc. For that, I have downloaded the ffmpeg for windows and try to play it using ffplay command. I don't get the options to play it with .g726 audio file. However, I have pcm (raw buffer file) audio file. For that, I have execute ffplay command as per below. But I cant hear any voice.

    ffplay -f s16le -ar 16k -ac 1 console.pcm

    So please, Can anybody tell me why I cant hear voice?

    What command should be executed to play .g726 audio file

  • FFmpeg only reading one channel

    29 août 2017, par AbstractDissonance

    Trying to read a stereo wav file and ffmpeg is only reading one channel. ffprobe returns 2 channels.

    I have used -ac 2 and then added -channel_layout stereo but all return 1 channel(or basically filling half the buffer I created).

    Basically the output size of ffmpeg is about half the wav file size.

    What I would like is for it to return every channel in

    Channel1_sample1, channel2_sample1, ..., ChannelN_sample1, channel1_sample2, etc...

    But, in reality, I'd rather just have it work with stereo ;) I'm giving it plenty large enough buffer to read to, so that isn't the problem either.

    Here is the output

    ffprobe.exe -hide_banner -v quiet -print_format flat -show_streams -i temp.wav
    streams.stream.0.index=0
    streams.stream.0.codec_name="pcm_s16le"
    streams.stream.0.codec_long_name="PCM signed 16-bit little-endian"
    streams.stream.0.profile="unknown"
    streams.stream.0.codec_type="audio"
    streams.stream.0.codec_time_base="1/44100"
    streams.stream.0.codec_tag_string="[1][0][0][0]"
    streams.stream.0.codec_tag="0x0001"
    streams.stream.0.sample_fmt="s16"
    streams.stream.0.sample_rate="44100"
    streams.stream.0.channels=2
    streams.stream.0.channel_layout="unknown"
    streams.stream.0.bits_per_sample=16
    streams.stream.0.id="N/A"
    streams.stream.0.r_frame_rate="0/0"
    streams.stream.0.avg_frame_rate="0/0"
    streams.stream.0.time_base="1/44100"
    streams.stream.0.start_pts="N/A"
    streams.stream.0.start_time="N/A"
    streams.stream.0.duration_ts=14200200
    streams.stream.0.duration="322.000000"
    streams.stream.0.bit_rate="1411200"
    streams.stream.0.max_bit_rate="N/A"
    streams.stream.0.bits_per_raw_sample="N/A"
    streams.stream.0.nb_frames="N/A"
    streams.stream.0.nb_read_frames="N/A"
    streams.stream.0.nb_read_packets="N/A"
    streams.stream.0.disposition.default=0
    streams.stream.0.disposition.dub=0
    streams.stream.0.disposition.original=0
    streams.stream.0.disposition.comment=0
    streams.stream.0.disposition.lyrics=0
    streams.stream.0.disposition.karaoke=0
    streams.stream.0.disposition.forced=0
    streams.stream.0.disposition.hearing_impaired=0
    streams.stream.0.disposition.visual_impaired=0
    streams.stream.0.disposition.clean_effects=0
    streams.stream.0.disposition.attached_pic=0
    streams.stream.0.disposition.timed_thumbnails=0
    ffmpeg.exe -i temp.wav -loglevel quiet -f s16le -ac 2 -channel_layout stereo -
    

    temp.wav is just a standard stereo wav file.

  • nodejs get mp4 file thumbnail quickly

    29 août 2017, par user1590595

    I want to have a thumbnail of 0.0 sec of a video. Currently I am using node-fluent-ffmpeg to generate thumbnail. Following is the code:

    ffmpeg(tempLocalFile)
              .screenshots({
                timestamps: [0.0],
                filename: 'xx.png',
                folder: tempFilePath
              }).on('end', function() {
                console.log('done');
              });
    

    But the problem is, it is taking too much of time to do the process. It is normally taking 30sec to generate the thumbnail. Which keeps increasing if the mp4 file size increases.

    So my question is, Is there any fast way to generate the thumbnail. Can we improve above code to improve the performance.

    ps: The machine this code is running is 512MB RAM 800MHz