Coder Social home page Coder Social logo

Comments (11)

jacek-marchwicki avatar jacek-marchwicki commented on May 7, 2024

I see that this file does not have Audio content is it?
now my player do not support video files without audio stream.

from androidffmpeg.

Rrod8607 avatar Rrod8607 commented on May 7, 2024

Can the player be extended to handle files without audio streams?
would it be a modification of player.c ?
Right now I'm not building your project from source, just using the JAR & .so's

from androidffmpeg.

jacek-marchwicki avatar jacek-marchwicki commented on May 7, 2024

Yes, you have to modify synchronization in player.c.
Afaik there is some guy who working on this, but im not sure. If you want I
can try send him address to you?
On Nov 21, 2012 3:27 PM, "Rrod8607" [email protected] wrote:

Can the player be extended to handle files without audio streams?
would it be a modification of player.c ?
Right now I'm not building your project from source, just using the JAR &
.so's


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-10598775.

from androidffmpeg.

sweetLou42 avatar sweetLou42 commented on May 7, 2024

I'd like the address of the guy working on modifying player.c to support no audio stream also please

from androidffmpeg.

Rrod8607 avatar Rrod8607 commented on May 7, 2024

Jacek is this a modification you have on your to do list ?
Or should I start looking into doing it myself ?

from androidffmpeg.

jacek-marchwicki avatar jacek-marchwicki commented on May 7, 2024

@Rrod8607 No i do not have this in my working plan - is not needed for my propose.
I contacted with Simon Robinson and he is not working on solution either.

It would be glad if you can do it by yourself or maybe with @sweetLou42 .

from androidffmpeg.

jacek-marchwicki avatar jacek-marchwicki commented on May 7, 2024

It would be much simpler to do this when using version: https://review.appunite.com/#/c/3807/

from androidffmpeg.

myrmidon-media avatar myrmidon-media commented on May 7, 2024

@jacek-marchwicki

I have been looking into this, take a look at this patch:

struct Player {
.....
+ int no_audio;
....
}

int player_set_data_source(struct State *state, const char *file_path,
        AVDictionary *dictionary, int video_stream_no, int audio_stream_no,
        int subtitle_stream_no) {

...

-if ((player->audio_stream_no = player_find_stream(player,
-           AVMEDIA_TYPE_AUDIO, audio_stream_no)) < 0) {
-       err = player->audio_stream_no;
-       goto error;
-}


+if ((player->audio_stream_no = player_find_stream(player,
+           AVMEDIA_TYPE_AUDIO, audio_stream_no)) < 0) {
+       player->no_audio = TRUE;
    }
+   else{
+       player->no_audio = FALSE;
+   }


-if ((err = player_create_audio_track(player, state)) < 0)
-       goto error;

+ if (player->no_audio == FALSE && ((err = player_create_audio_track(player, state)) < 0))
+       goto error;

...
}


void jni_player_resume(JNIEnv *env, jobject thiz) {
....

-(*env)->CallVoidMethod(env, player->audio_track,
-           player->audio_track_play_method);

+if(player->no_audio == FALSE){
+     (*env)->CallVoidMethod(env, player->audio_track,
+           player->audio_track_play_method);
+   // just leave exception
+   }
....
}

Also substitute all:

-player_create_audio_track_free(player, state);

+if(player->no_audio == FALSE)
+       player_create_audio_track_free(player, state);

from androidffmpeg.

bhollosi avatar bhollosi commented on May 7, 2024

This addon has saved my life, thanks! Why not patch it into the main branch? Nice job!

from androidffmpeg.

jacek-marchwicki avatar jacek-marchwicki commented on May 7, 2024

Sorry... But I did not have time to watch on that. You can do a pull request.

from androidffmpeg.

jacek-marchwicki avatar jacek-marchwicki commented on May 7, 2024

Fixed

from androidffmpeg.

Related Issues (20)

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.