WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.89k stars 971 forks source link

Encoding issue #1076

Closed jeanfrancoisvarin closed 5 years ago

jeanfrancoisvarin commented 5 years ago

Hi,

Let me explain what I'm facing. I have some issues regarding the encoding.

When I send large batches to the encoder (roughly 200 files), I find a very strange behavior in the clean_title in the videos table. It is getting so big that I suspect it to generate some of the error messages I receive as the field is limited.

I changed the field size to 500 and the error appeared as well but later.

Is it normal or is there any fix ?

Thanks for your answer.

Example : thormontbou-2018123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102

Plus image

and image

DanielnetoDotCom commented 5 years ago

I never saw this before.

the clean title add a number at the end automatically in case the clean title is already in use.

I don't know how is the file names you are submitting. but maybe is regarding it.

jeanfrancoisvarin commented 5 years ago

Hello Daniel,

What I understand is that instead of incrementing the clean_title field, the number concatenates.

After a while, the field being too short, it pops up in an error, which makes sense to me and was proven by resizing the field.

According what you say, the clean_title should be the file name ?

So what I see is that when in the Encoder page in the From File tab I type in Title, Description and choose the category, the title goes in the clean_title field, the description goes nowhere and the category is fine.

It all I can describe to you.

Thanks anyway for your quick answer.

Best regards,

Jean-François

De : YouPHPTube notifications@github.com Envoyé : dimanche 16 septembre 2018 15:34 À : DanielnetoDotCom/YouPHPTube YouPHPTube@noreply.github.com Cc : Jean-François Varin jfvarin@karefil.org; Author author@noreply.github.com Objet : Re: [DanielnetoDotCom/YouPHPTube] Encoding issue (#1076)

I never saw this before.

the clean title add a number at the end automatically in case the clean title is already in use.

I don't know how is the file names you are submitting. but maybe is regarding it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/DanielnetoDotCom/YouPHPTube/issues/1076#issuecomment-421766245, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApPUQMGm-l9TGKGNyPWt2EGiFCvNDqTwks5ublM5gaJpZM4WqTRg.

DanielnetoDotCom commented 5 years ago

According what you say, the clean_title should be the file name ?

Yes, should be the filename after remove special chars

jeanfrancoisvarin commented 5 years ago

I can ensure you, this is not the case. File name is replaced by Title and instead of item number incrementation there is a incremented number concatenation.

My file names are : DJI_nnnn or 100_nnnn or 2018_09_02_12_02_48

As you can see in the result thormontbou-20181234567891011121314 : Thormontbou-2018 is the title (in put in the encoder form) and the rest is the concatenation (in this case, up to 14).

I hope it helps.

DanielnetoDotCom commented 5 years ago

I am confused,

can you please give us couple concrete samples? with the full filename and full result?

jeanfrancoisvarin commented 5 years ago

Ok Daniel, I'll try to do my best. Let's start.

I want to download a bunch 14 of MP4 files

fichiers selectionnes

To index them under the name Essai with a description Essai de transfert d'un lot (test of a batch transfer)

image

During the encoding it seems to be fine

during encoding

And when I connect to check my new videos they all have the same title

image

When I edit the first one it sounds good

image except the description which is not there

When I open the second one, idem for description and seems still good

image

Openning the 3rd one shows essai12 (I was expecting Essai3)

image

And The other one to the end of the batch...

image ....

To 14

image

If you need access to my system, drop me a mail.

JF

jeanfrancoisvarin commented 5 years ago

I did some other tests by downloading a Youtube video and everything is fine. I also tried to make some changes in the Encoder.php files adding 'XYZ' as description. and wether or not the description field is empty, it puts 'XYZ' in the description field. Which tells me that it never reaches teh $_POST['description'] line.

If it helps. JF

static function sendFile($file, $videos_id, $format, $encoder = null, $resolution = "") {
    global $global;
    global $sentImage;

    $obj = new stdClass();
    $obj->error = true;
    $obj->format = $format;
    $obj->file = $file;
    $obj->resolution = $resolution;
    $obj->videoDownloadedLink = $encoder->getVideoDownloadedLink();

    $duration = static::getDurationFromFile($file);
    if (empty($_POST['title'])) {
        $title = $encoder->getTitle();
    } else {
        $title = $_POST['title'];
    }
    if (empty($_POST['description'])) {
        if (!empty($obj->videoDownloadedLink)) {
            $description = $encoder->getDescriptionFromLink($obj->videoDownloadedLink);
        } else {
            $description = "XYZ";
        }
    } else {
        $description = $_POST['description'];
    }
    if (empty($_POST['categories_id'])) {
        $categories_id = 0;
    } else {
        $categories_id = $_POST['categories_id'];
    }
DanielnetoDotCom commented 5 years ago

I see the problem,

it is clear now, I am sending a fix, can you please test it for me?

jeanfrancoisvarin commented 5 years ago

With pleasure ;-)

DanielnetoDotCom commented 5 years ago

Also I just send some bug fix, just in case you already update

jeanfrancoisvarin commented 5 years ago

Didn't receive anything yet.

I'm I normal ?

DanielnetoDotCom commented 5 years ago

You need to update your files https://github.com/DanielnetoDotCom/YouPHPTube/wiki/How-to-Update-your-YouPHPTube

jeanfrancoisvarin commented 5 years ago

Hello Daniel, I just git pulled and replayed my tests. Numbering works now fine. Description field is still empty even after filling it in the encoder form.

But, as I did some manual changes in the Encoder.php file, I recieved the "Please, commit your changes or stash them before you can merge" message and applied the procedure.

As my Encoder folder was renamed to Tube-Encode, how can I check the pull request was complete.

Thanks for your patience, I'm a bit of a newbie.

DanielnetoDotCom commented 5 years ago

About your manual changes you will loose them https://github.com/DanielnetoDotCom/YouPHPTube/wiki/How-to-Update-your-YouPHPTube#problems

jeanfrancoisvarin commented 5 years ago

Merci Daniel,

I followed up your how-to and it worked fine for the file numbering (could be more easy to read with a "-" after the name and before the number). But it works and that's cool.

The only remaining issue is that when you fill the description in the encoder form, it doesn't go to the description field of the database (it works when you import a Youtube video).

Many thanks in advance for your help.

JF

DanielnetoDotCom commented 5 years ago

@jeanfrancoisvarin I Agree with you about the "-", I just sent a fix.

Also thanks for the donation. :)

jeanfrancoisvarin commented 5 years ago

You're welcome.

I hope it can help you a bit ;-)

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.