Giter Club home page Giter Club logo

ffmpeginterop's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeginterop's Issues

Seek causes video to stop playing

Is there any update on the Seek issues described in several other reports? I've tried the Seek Completed event work around and it still screws up when i change the position via code like Postition = Position + TimeSpan.FromSeconds(30);

BTW, i love this capability and its awesome for us UWP devs but so far this doesn't seem to be stable enough for production use.

When we need to force AudioDecode or VideoDecode?

Hi, I was trying to use FFMpegInterop in windows phone 8.1, everything works fine, but in some of videos needs forceAudioDecode to be true (because when I put false in parameter, audio is spoiled)

In videos that didn't need to force AudioDecode to be true, when I true the audio decoding, audio + video playing its very fast, looks like player is in fast forward mode!

With pot player for Windows I found this:
for video that didn't need to force Audio decoding to be true:

General
Unique ID : 60079824637526059836669318900286688400 (0x2D32F40D95D34A41DF13E6E9647B0C90)
Complete name : C:\Users\admin\Downloads\Video\Dark.Matter.S01E06.480p.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 150 MiB
Duration : 42mn 57s
Overall bit rate : 488 Kbps
Movie name : Dark Matter S01E06 - RMTeam
Writing application : Lavf56.40.101
Writing library : Lavf56.40.101
DESCRIPTION : Encoded By RMTeam

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Width : 854 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 146 r109 121396c
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=8 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=24.5 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=10000 / vbv_bufsize=10000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : Yes
Forced : No

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 42mn 57s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Writing library : Lavc56.49.101 aac
Default : Yes
Forced : No

and a video that need force Audio decoding to true:
General
Unique ID : 184677726890362367291245475020848181446 (0x8AEFA2ECF136B19B988E4E2442EF30C6)
Complete name : C:\Users\admin\Downloads\Video\Inside.Out.2015.720p.HDRip.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 702 MiB
Duration : 1h 34mn
Overall bit rate : 1 038 Kbps
Movie name : Inside Out
Encoded date : UTC 2015-09-28 20:01:12
Writing application : mkvmerge v8.3.0 ('Over the Horizon') 64bit
Writing library : libebml v1.3.1 + libmatroska v1.4.2
DURATION : 00:58:26.057000000
NUMBER_OF_FRAMES : 3
NUMBER_OF_BYTES : 276
_STATISTICS_WRITING_APP : mkvmerge v8.3.0 ('Over the Horizon') 64bit
_STATISTICS_WRITING_DATE_UTC : 2015-09-28 20:01:12
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 34mn
Nominal bit rate : 972 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.035
Writing library : x264 core 146 r2538 121396c
Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=972 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : A_AAC
Duration : 1h 34mn
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz / 24.0 KHz
Compression mode : Lossy
Delay relative to video : 31ms
Default : Yes
Forced : No

so When we need to force AudioDecode ?
How can I programmatically know when I need to force Audio decoding to true?

thanks

Unit test framework is needed

FFmpegInterop needs some basic unit test on the public API to prevent regression error and maintain integrity of the project. This can be the smoke test against pull requests in the future.

Clarify target platform for Windows Store Apps

FFmpegInterop is exactly what I was looking for, and my first impressions are great !

Though, I got a question regarding the target platform for Windows Store Apps. Currently I'm using "Any Cpu", and it's not clear to me what version (*.winmd and dlls) I should import : x86 or x64 or both ? Do I have to split my app for each target ? Well, I'm a little lost there...

For Windows Phone, it's kinda obvious, it's ARM...

Thank you for your answer.

Support multi-threaded decoding

Really not an issue, but a request.

Certain codecs, like h264 support multi-threaded decoding. Would this be possible to support?

Here's a quick snip:

///////////////////////////////
pCodecCtx->thread_count = 4;
pCodecCtx->thread_type = FF_THREAD_FRAME;
///////////////////////////////

static int lock_manager(void **mtx, enum AVLockOp op)
    {
        switch(op) 
        {
        case AV_LOCK_CREATE:
            {
            *mtx = new CritSec();
            return 0;
            }
        case AV_LOCK_OBTAIN:
            {
            auto mutex = static_cast<CritSec*>(*mtx);
            mutex->Lock();
            return 0;
            }
        case AV_LOCK_RELEASE:
            {
            auto mutex = static_cast<CritSec*>(*mtx);
            mutex->Unlock();
            return 0;
            }
        case AV_LOCK_DESTROY:
            {
            auto mutex = static_cast<CritSec*>(*mtx);
            delete mutex;
            return 0;
            }
        }
        return 1;
    }
///////////////////////////////
av_lockmgr_register(lock_manager);

serious memory leak

There is a pretty hefty memory leak in this project. I am not entirely sure from where, but a spike of 13MB upon opening a file is pretty damn impresive.

There is also a problem in the media stream source initialization. The buffer time needs to be zero to avoid pause/resume issues.

MediaElement.AudioStreamCount is 0 when playing karaoke songs which have multiple audio streams

When I play some karaoke songs, I try to switch audio stream, but I find the audio stream index is set to 0 and AudioStreamCount is 0. However, when I run the
ffprobe.exe -show_streams -select_streams a "@#[email protected]"
I get two streams (See below). It seems that the audio streams info is not passed to MediaStreamSource. Is there a method allow me to set audio stream index? Thanks.

ffprobe version N-75474-g74e4948 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 4.9.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
libavutil 55. 2.100 / 55. 2.100
libavcodec 57. 3.100 / 57. 3.100
libavformat 57. 2.100 / 57. 2.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 6.100 / 6. 6.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpeg, from '@#[email protected]':
Duration: 00:03:49.78, start: 0.369778, bitrate: 6736 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg), 720x576
[SAR 64:45 DAR 16:9], 6000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 320 kb/s
Stream #0:2[0x1c1]: Audio: mp2, 48000 Hz, stereo, s16p, 320 kb/s
[STREAM]
index=1
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=s16p
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=0x1c0
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/90000
start_pts=33280
start_time=0.369778
duration_ts=20615039
duration=229.055989
bit_rate=320000
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=2
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
profile=unknown
codec_type=audio
codec_time_base=1/48000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=s16p
sample_rate=48000
channels=2
channel_layout=stereo
bits_per_sample=0
id=0x1c1
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/90000
start_pts=33280
start_time=0.369778
duration_ts=20679839
duration=229.775989
bit_rate=320000
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]

WPF Support

TLDR; Will this library support WPF easily?

I have not had the opportunity to pull down the code and see if it just works. I assume there'll have to be slight modifications to make the code work with the full .Net library instead of the WinRT library. Any insights on whether this should be easy/hard/impossible?

Audio not working on Windows Phone 8.1 when changing position

Hello, I have faced a bug, when trying to play video file (avi, video codec: xvid, audio codec: ac3) on Windows Phone 8.1.
If I change position in MediaElement, audio is not working.
Code example (C#):

  1. I get MediaStreamSouce:
    IRandomAccessStream readStream = await file.OpenAsync(FileAccessMode.Read);
                // Instantiate FFmpeg object and pass the stream from opened file
                FFmpegMSS = FFmpegInteropMSS.CreateFFmpegInteropMSSFromStream(readStream, true, true);
                MediaStreamSource mss = FFmpegMSS.GetMediaStreamSource();

myMediaElement.SetMediaStreamSource(mss);

  1. myMediaElement is MediaElement. It has MediaOpened event.
    And if I want to play my file not from the start, I can set myMediaElement.Position in MediaOpened event.
    So do I:
    private void myMediaElement_MediaOpened(object sender, RoutedEventArgs e)
    {
    Media.Position = TimeSpan.FromMinutes(5);
    }
  1. The result: video starts playing from the time I wanted (in this example - 5 minutes from the start), FPS is OK, but there is no sound.
    If I set myMediaElement.Pause and then myMediaElement.Play again several times, sound would appear. But new bug would appear too - FPS is dropping, so now I see not video, but a slideshow.

If I use Play and Pause again several times more, it would become OK (sound - ON, FPS - normal).

PS. If I start playing video from the very beggining (not setting myMediaElement.Positon), everything would be OK - video would play smooth and audio would work.

FFMPEG with libx264

Hi, could you guys please put out a note on how to compile ffmpeg with libx264 for video encoding? FFMPEGInterop currently gives decoding feature. I would like to integrate encoding into it. But the WinRT component I built is not able to find the H264 encoder. I am new to the ffmpeg altogether. I followed this link http://trac.ffmpeg.org/wiki/How%20to%20quickly%20compile%20FFmpeg%20with%20libx264%20(x264%2C%20H.264) on how to compile x264. But the MSYS is throwing error "could not identify OS" . But FFMPEG is compiling fine. I am using Windows 10 x64.

Problem running config..

Hi there,
I am currently on the section labelled
Windows Store 8.1 x64 (Windows 8.1 x64 in Visual Studio)
After creating the directories I have the following : FFmpegInterop>ffmpeg>Output>Windows8.1>x64
When I try the following:
$ ../../../configure \

--toolchain=msvc
--disable-programs
--disable-dxva2
--arch=x86_64
--enable-shared
--enable-cross-compile
--target-os=win32
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603"
--extra-ldflags="-APPCONTAINER"
--prefix=../../../Build/Windows8.1/x64
I get the following error:
c99wrap cl is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

I have tried updating the ffmpeg file using the following git clone git://source.ffmpeg.org/ffmpeg.git
but I still get the same error?
Is this something I am doing wrong or is there currently a problem?
Thanks

After changing the position video stops

When I change the position in the MediaElement video stops. Error appears on video files that do not have audio streams + video decoding must be done on the FFmpeg side (ie. when using UncompressedVideoSampleProvider).

How to stream rtmp ?

I try used CreateFFmpegInteropMSSFromUri to stream rtmp but it cannot load and stream m3u8 is not good.
how to fix it ?

Windows 10 ARM + ffmpeg + openssl

Hi.
How can play https link on a Windows 10 ARM?
Perhaps can compile ffmpeg on a Windows 10 (ARM) with openssl?
For example a video located at dropbox or yuotube.

Thanks.

AvUtil-54.dll throws exception on Windows RT device

Hi,

i having trouble running my app on my Surface (Windows RT). My app crashes if i start playing a movie. On any other platform (x86,x64) it runs fine. Windows Eventviewer shows the following message:

Application error:
faulty modul: avutil-54.dll
Exceptioncode: 0xc000001d
Offset: 0x0000200b

I googled and found that Code "0xc000001d" can mean "illegal instruction". Maybe avutil uses some instructions which are not supported on arm devices?

Mechanism to specify FFmpeg options is needed

FFmpeg libraries can take specific parameters to control certain protocols as described in https://www.ffmpeg.org/ffmpeg-protocols.html

This feature is very useful in many scenarios and it makes sense for FFmpegInterop API to pass down the specific options to the underlying FFmpeg API.

For example an application may want to stream a video from a specific URI when TCP is highly preferred or certain timeout value is needed.

Dll's to pass Windows Certification

Hello everyone,

We have been trying to build dll's following the steps provided by the team but we couldn't get proper working dll's to pass Windows Store Certification.

If anybody achieved this step, please would you mind to send us your dll's (x86,x64) so we can continue our testing project, we are stuck at this step.

Thanks a lot for your great work

FFmpegInteropMSS.CreateFFmpegInteropMSSFromUri returns null on Windows Phone 8.1

When I use the FFmpegInteropMSS.CreateFFmpegInteropMSSFromUri method to play a remote file or RTSP stream it returns null on Windows Phone 8.1. I found out that in the FFmpegInteropMSS::CreateMediaStreamSource method, the avformat_open_input call returns an error code -9 and that causes the failiure but I dont know what that code means. When I try to do the same on Windows 8.1 the file or RTSP stream opens up without any error.

NativePlatform not detected in the C# project

In the SamplesWin8.1\MediaPlayerCS project, the ffmpeg DLLs are not found due to the fact that the platform is always AnyCPU, therefore, the path to libraries are not correct:

E.g:

  • Expected: ffmpeg\Build\Windows81\ARM\bin\avcodec-56.dll
  • Actual: ffmpeg\Build\Windows81\bin\avcodec-56.dll

This is available for both Windwos 8.1 and Windows Phone 8.1 projects, for all ffmpeg DLLs

The CPP and JS project detect the libraries correctly.

swr_convert fails after frame is passed through a filter graph

So I've encountered this particular issue when trying to add effects to this project.
The filter graph looks like this

Source -> biquad filter -> biquad filter ->...-> sink.

The issue only happens when dealing with files that are already in the format swr_convert should convert to (AV_SAMPLE_FMT_S16).

The problem can not be reproduced when the input file is AV_SAMPLE_FMT_S16P for example, or if the filter graph looks like this:

Source->sink (i.e no biquads).

Any ideas? the crash is access violation 0x00000C5 or something like that.

Build error: av_free_packet deprecated

I just pulled the current code of both this project and ffmpeg, finished building ffmpeg but now get the following error when trying to build FFmpegInterop:

C4996: "av_free_packet": was declared as deprecated

I could fix it by adding 4996 to Properties > Configuration Properties > C/C++ > Advanced > Disable Specific Warnings, but this shouldn't be the way to go, right?

Latest version of ffmpeg certification issues

I get the following errors from the certification kit tests

This API is not supported for this application type - Api=avcodec_is_open. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avcodec_open2. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avcodec_pix_fmt_to_codec_tag. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avcodec_register_all. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avcodec_string. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpicture_get_size. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_aac_parse_header. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_ac3_channel_layout_tab. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_ac3_parse_header2. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_align_put_bits. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_bprint_to_extradata. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_copy_bits. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_copy_pce_data. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_dca_convert_bitstream. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_dca_sample_rates. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_dirac_parse_sequence_header. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_dnxhd_get_frame_size. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_dnxhd_get_interlaced. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_exif_decode_ifd. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_find_pix_fmt. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_find_start_code. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_get_raw_pix_fmt_tags. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_h264_has_num_reorder_frames. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_bits_ac_chrominance. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_bits_ac_luminance. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_bits_dc_chrominance. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_bits_dc_luminance. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_val_ac_chrominance. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_val_ac_luminance. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mjpeg_val_dc. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mpa_bitrate_tab. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mpa_decode_header. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mpa_freq_tab. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mpeg4audio_get_config. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mpeg4audio_sample_rates. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_mpegaudio_decode_header. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_pix_fmt_bps_avi. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_pix_fmt_bps_mov. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_split_xiph_headers. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_tak_parse_streaminfo. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=avpriv_toupper4. Module=avcodec-57.dll. File=avformat-57.dll.
This API is not supported for this application type - Api=av_get_pcm_codec. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=av_init_packet. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=av_new_packet. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=av_packet_new_side_data. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=av_packet_unref. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=avpicture_get_size. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=avpicture_layout. Module=avcodec-57.dll. File=avdevice-57.dll.
This API is not supported for this application type - Api=av_free_packet. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.
This API is not supported for this application type - Api=av_init_packet. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.
This API is not supported for this application type - Api=avcodec_close. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.
This API is not supported for this application type - Api=avcodec_decode_audio4. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.
This API is not supported for this application type - Api=avcodec_decode_video2. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.
This API is not supported for this application type - Api=avcodec_flush_buffers. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.
This API is not supported for this application type - Api=avcodec_open2. Module=avcodec-57.dll. File=ffmpegWindowsPhone.dll.

Issue with ts files and two uncompressed audio issues solved

Hi,

I encountered some issues while testing various files and hopefully I was able to figure out what was wrong. One of my fixes actually changes the signature of a method. That's why I don't submit a pull request right away, there are many ways this issue can be solved but I took the easy one.

Sample files can be found here: http://1drv.ms/1fmUZxd
1-Files having an audio stream whose bit depth is not 16 bits won't play correctly. The wav file I provide is 8 bits. The fix is provided by this commit: reego-fr@3d0a3d5
It is worth mentioning that my desktop is actually able to play audio at 32 bits per samples while my phone is limited to 16 bits only. I don't know if it's possible to retrieve this capability at runtime to deliver the best quality and give the phone hardware/software a chance to support 32 bits in the future but for now it does the job.

2-Some audio streams may not render correctly when decoded by ffmpeg depending on the number of samples per frame. I encountered the issue on dvd_pcm streams. Two of the files I provide exhibit this issue on their pcm stream : the dts sparks vob and vts_04_04 vob. I fixed it in this commit: reego-fr@fb41be9

3-Some files may start at a timestamp greater than 0 but Media Foundation most probably expects samples to be delivered within the start (0) and media duration range. Even though it shows as quite tolerant regarding sample timestamps, the issue becomes critical when it comes to seeking in the media's range.
The sample files to reproduce the issue are the vts_04_04 vob file I provide, and any other vts_xx_02+.vob, as well as ts files but I can't share one of these yet.
The fix I chose is in this commit: reego-fr@a21b3f2

Please let me know what you think about it and if you want me to submit pull requests.

Kind regards

video is pixelated

Hi
I was able compile both in Windows 10 and Windows 8.1 Works. But the video is pixelated and audio is garbled. Any idea ? I have tried .wmv and .ts files.
thanks

MPEG-PS seek problem

I'm having troubles opening an Mkv file with MPEG-PS format on Windows 10. I can open the file and play it but at first it doesn't show any frames just a blank white space and I can only see the progress on the seekbar. If I try to seek using the seekbar it jumps to the very end and stays there while the video starts to play from the beginning (in perfect quality). Any other attempt to seek restarts the video playback and it doesn't jump to the desired point.

The video file is from a Foscam IP camera and I now that it's format might have some problems because other players (VLC, KMPlayer) can open it but they all have playback issues after seeking (but at least they can seek). I've also tried PotPlayer and it works fine, even seeking.

I've tried to set all of the video codecs listed here with the parameters option but still no luck.
https://www.ffmpeg.org/ffmpeg-codecs.html

Any idea what might be the problem?
Thanks

Here's the file in question:
http://1drv.ms/1l6eSvF

and here's the file info:

General
Complete name : D:\Music\alarm_20151025_051811.mkv
Format : MPEG-PS
File size : 2.30 MiB
Duration : 36s 682ms
Overall bit rate : 527 Kbps

Video
ID : 224 (0xE0)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=60
Duration : 36s 682ms
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive

Audio
ID : 192 (0xC0)
Format : AAC
Format/Info : Advanced Audio Codec
Compression mode : Lossy

Question: location for compiled libraries

I've successfully compiled FFmpeg for Windows 10 x86 and x64 via the compilation guide for WinRT, but I can't seem to figure out where to put the compiled library so I can actually build the FFmpegInterop project (VS 2015 spits out a lot of errors along the lines of "Cannot open include file: 'libavformat/avformat.h': No such file or directory").

Here's where I currently have FFmpeg:

FFmpegInterop\FFmpegSample\FFmpegInterop\Win10\FFmpeg\Build\

Inside of that Build directory at the end of the above path are the following directories (each copied directly from the Build directory generated during the compilation process):

Win32
x64

I'm relatively new to Windows development and library compilation, so I'm sure this is just a simple matter of placing the compiled library in the right place (and making sure its directories are named appropriately). I didn't find anything in this repo's readme, the compilation instructions, or the Windows blog post about it. I have done some Windows app development in the past (Windows 8.x, and now Windows 10) with HTML/JS, but haven't messed around much with WinRT components until now.

Any guidance would be appreciated! Unless I've somehow missed it in all my reading, this might be something worth adding to the readme.

Compilation fails on Windows 10 x64

HI there,

I was following the instructions provided in https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT for
Windows 10 x64. I intstalled all of the required dependencies (e.g. yasm) and checked their location.

When I run

../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=x86_64 \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" \
--extra-ldflags="-APPCONTAINER WindowsApp.lib" \
--prefix=../../../Build/Windows10/x64

I get the following error:

cl is unable to create an executable file.
C compiler test failed.

These are the last lines of config.log file:

zoompan_filter_deps=swscale
WARNING: pkg-config not found, library detection may fail.
mktemp -u XXXXXX
cx2bM3
check_ld cc
check_cc
BEGIN ./ffconf.toPsa9fQ.c
    1   int main(void){ return 0; }
END ./ffconf.toPsa9fQ.c
cl -nologo -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00 -c -Fo./ffconf.9ghOJ6lK.o ./ffconf.toPsa9fQ.c
ffconf.toPsa9fQ.c
link -APPCONTAINER WindowsApp.lib -nologo -out:./ffconf.66UshOWN.exe ./ffconf.9ghOJ6lK.o
LINK : fatal error LNK1181: cannot open input file 'WindowsApp.lib'
C compiler test failed.

Any ideas what could be wrong?

RTSP support?

Is there RTSP support ? I found this link and it doesn't work:
rtsp://media1.law.harvard.edu/Media/policy_a/2012/02/02_unger.mov

And another question - do you have any live video links that I can test? The only video I got to work was rabbit trailer.

FFMpegSupport class?

Hello! Can you provide some documentation and samples with using FFMpegSupport class?
How can we use it?

Cannot Include .dll

Hi,

I want to built FFmpegInterop.WindowsPhone c++ library and when I try to include built .dll to different project I get message:

" A refference to (...) could not be added. Please make sure that file is accessible and that it is a valid assembly or COM component".

Cannot run config file

Hi
Following the compilation instructions I've installed verything (msys2 yasm etc..), set up the environment variables, checked with "which" where the cl command was pointing at, check my PATH but nothing worked. I keep on getting

WARNING: pkg-config not found, library detection may fail.
mktemp -u XXXXXX
ZYw84V
WARNING: Unknown C compiler cl, unable to select optimal CFLAGS
check_ld cc
check_cc
BEGIN ./ffconf.oc8wxDOw.c
1 int main(void){ return 0; }
END ./ffconf.oc8wxDOw.c
cl -MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603 -c -o ./ffconf.T0zVIMc6.o ./ffconf.oc8wxDOw.c
../../../configure: line 822: cl: command not found
C compiler test failed.

I just want to compile ffmpeg without even the interop part as I don't really need it. Could you please give me any hint on what could be going on ?

Thanks

background sound

Hi,
I have modified my app in order to add sound when you minimize the app and I have a problem with this tool. I use your tool on W8.1, WPH8.1 and UWP with the player FrameWork. I have set the property AudioCategory="BackgroundCapableMedia" on the player, and I have created a second task of audio. And when I minimize the app, it Works 7 seconds approximately and then it stops. I have revised the throughput of internet (the app works with streams) and it Works but the player doesn't work. Other plugins as SmoothStreaming Works correctly, so I think that there is a small bug, is it correct? Or Have I do some extra thing? Could you help me?
Thanks you!

Can't manage to get audio files working - Unhandled exception

Hi,

I had great results playing MKV H.264 files and other formats using the ffmpegInterop sample, but can't get any audio file to work (mp3, aac, flac...).
I traced everything back to detecting the audio stream and decoder, but everything seems fine.
Also, the OnStarting and OnSampleRequested events get fired, as we can see in the Debug Output (running on Windows Phone 8.1 Device):

GetNextSample
Ignoring unused stream
 - PushPacket
 - PopPacket
GetNextSample
 - PushPacket
 - PopPacket
[...]
GetNextSample
 - PushPacket
 - PopPacket
'MediaPlayer.exe' (Win32): Loaded 'C:\Windows\System32\EN-US\mscorlib.debug.resources.dll'. Module was built without symbols.
First-chance exception at 0x770635FB (KERNELBASE.DLL) in MediaPlayer.exe: 0xE0434352 (parameters: 0x80070057, 0x00000000, 0x00000000, 0x00000000, 0x6E100000).
First-chance exception at 0x770635FB (KERNELBASE.DLL) in MediaPlayer.exe: 0xE0434352 (parameters: 0x80070057, 0x00000000, 0x00000000, 0x00000000, 0x6E100000).
First-chance exception at 0x770635FB (KERNELBASE.DLL) in MediaPlayer.exe: 0xE0434352 (parameters: 0x80070005, 0x00000000, 0x00000000, 0x00000000, 0x6E100000).
First-chance exception at 0x770635FB (KERNELBASE.DLL) in MediaPlayer.exe: 0xE0434352 (parameters: 0x80070005, 0x00000000, 0x00000000, 0x00000000, 0x6E100000).
First-chance exception at 0x770635FB (KERNELBASE.DLL) in MediaPlayer.exe: 0x40080201: WinRT originate error (parameters: 0x80070005, 0x000001D3, 0x031FE140).
First-chance exception at 0x770635FB (KERNELBASE.DLL) in MediaPlayer.exe: 0x40080201: WinRT originate error (parameters: 0x80070005, 0x00000047, 0x031FE478).
Unhandled exception at 0x7732062F (COMBASE.DLL) in MediaPlayer.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0677D898, 0x00000002).


The MediaFailed Event gets fired with the following message: MF_MEDIA_ENGINE_ERR_DECODE : HRESULT - 0xC00D4E87
If I had to speculate what the cause is, I would say that the Media Element does have a problem with the ffmpeg-decoded stream, but i wouldn't rule out i just did something wrong.

I hope someone can help me with this issue.

Can't use FFmpegInterop.Windows.dll on my Windows Store App project

Hello,

I downloaded this project example and when I start the testing MediaPlayerCS sample everything goes fine and I can launch the app. MediaElement player works well with MKV files.

I have developed another app for Windows 8.1 which uses MediaElement and when I try to import the FFmpegInterop.Windows.dll an alert is raised about "this dll is not a valid assembly or COM component". I tried to import the .wimd file of the example and it seemed to correctly load, Intellisense allows me to to call methods on FFmpegInteropMSS object but when launching the app and trying to play the same MKV file Visual Studio 2013 Community Update 4 crashed saying that FFmpeg is not registered (exception when calling method FFmpegInteropMSS.CreateFFmpegInteropMSSFromUri). Probably I am missing some step to properly load and use FFmpegInterop on my project.

I am stuck at this point and can't find a solution, hope you could help me.

Many thanks

Exception thrown after calling FFmpegInteropMSS.Dispose()

I'm streaming files in my C# player project, here is related code:

private FFmpegInteropMSS ffmpeg;

private void setMediaStreamSource(string url)
{
    mediaElement.Stop();

    ffmpeg?.Dispose();
    ffmpeg = FFmpegInteropMSS.CreateFFmpegInteropMSSFromUri(url, false, false);
    mediaElement.SetMediaStreamSource(ffmpeg.GetMediaStreamSource());
}

But after calling ffmpeg?.Dispose();, sometimes an exception is thrown, here is the exception info:

0xC0000008 occurred
Message: Exception thrown at 0x25DC764A in Player.exe: 0xC0000008: An invalid handle was specified.
>   avformat-57.dll!tcp_read(URLContext* h, unsigned char* buf, int size) Line 199  C
    avformat-57.dll!retry_transfer_wrapper(URLContext* h, unsigned char* buf, int size, int size_min, int (URLContext*, unsigned char*, int) * transfer_func) Line 326  C
    avformat-57.dll!ffurl_read(URLContext* h, unsigned char* buf, int size) Line 357    C
    avformat-57.dll!http_buf_read(URLContext* h, unsigned char* buf, int size) Line 1161    C
    avformat-57.dll!http_read_stream(URLContext* h, unsigned char* buf, int size) Line 1251 C
    avformat-57.dll!http_read(URLContext* h, unsigned char* buf, int size) Line 1362    C
    avformat-57.dll!retry_transfer_wrapper(URLContext* h, unsigned char* buf, int size, int size_min, int (URLContext*, unsigned char*, int) * transfer_func) Line 326  C
    avformat-57.dll!ffurl_read(URLContext* h, unsigned char* buf, int size) Line 357    C
    avformat-57.dll!fill_buffer(AVIOContext* s) Line 480    C
    avformat-57.dll!avio_r8(AVIOContext* s) Line 532    C
    avformat-57.dll!flv_read_packet(AVFormatContext* s, AVPacket* pkt) Line 805 C
    avformat-57.dll!ff_read_packet(AVFormatContext* s, AVPacket* pkt) Line 672  C
    avformat-57.dll!read_frame_internal(AVFormatContext* s, AVPacket* pkt) Line 1322    C
    avformat-57.dll!av_read_frame(AVFormatContext* s, AVPacket* pkt) Line 1480  C
    FFmpegInterop.dll!FFmpegInterop::FFmpegReader::ReadPacket() Line 45 C++
    FFmpegInterop.dll!FFmpegInterop::MediaSampleProvider::GetNextSample() Line 79   C++
    FFmpegInterop.dll!FFmpegInterop::FFmpegInteropMSS::OnSampleRequested(Windows::Media::Core::MediaStreamSource ^ sender, Windows::Media::Core::MediaStreamSourceSampleRequestedEventArgs ^ args) Line 469 C++

Maybe a race condition has happened?

Opus playback

Has anyone managed to play opus files with this project?

I always get a division by zero in the opus decoder on ffmpeg's part. I googled around a bit and noticed nobody seems to be having this issue. My other opus decoder players the file just fine.

Maybe there is an issue in this particular port?

FFmpeg Encoding

Are there functions available to support the file encoding system of FFmpeg?

Changing audio/video properties mid stream

Sometimes digital TV from an antenna (live or recorded) will change key properties mid stream.

Audio might switch from 5.1 to 2 channel between a show and advertising, or the video might switch from 1080i (1920x1080x30fps) to 720p (1280x720x60fps) between shows.

The audio path uses swr_convert() to convert from floating point to S16 samples - this API segfaults internally when audio changes from 5.1 to 2 channel. I fixed the interop code to reinitialize the swr_convert context to 2/5.1 channel as needed - this fixes the segfault but now I need to tell the MediaFoundation layer that the PCM data I am passing it is now only 2 channel without interrupting playback.

Can you suggest a way to update the MediaFoundation properties mid-stream without interrupting playback?

(Currently focused on the audio change. Guessing the video size/framerate changing mid stream will have a similar solution).

Nick

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.