#1 2015-02-22 19:41:23

cjm51213
Member
2014-12-31
39

Videos

Hi Folks,

I have some videos of various formats: mp4, avi, and 3gp. What add-ons do I need to play these? Is this a function of the server or the viewing client?

Thanks for the help,

Chris.

Piwigo version: 2.7.3
PHP version: 5.4.23
MySQL version: 5.5.40-MiriaDB
Piwigo URL: http://media.tryx.org

Offline

 

#2 2015-02-22 20:54:48

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7280

Re: Videos


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2015-02-24 01:05:25

cjm51213
Member
2014-12-31
39

Re: Videos

Hi ddtddt,

I have VideoJS plug-in already installed. I synchronized, but videos still do not play.

Here's an example: https://media.tryx.org/picture.php?/680/category/47

... sound plays, but the video does not. 

Here's another example: https://media.tryx.org/picture.php?/158/category/88

...but this one is avi, not mp4. It does not even play sound.

Thanks for the help,

Chris.

Offline

 

#4 2015-02-24 13:27:24

xbgmsharp
Member
1970-01-01
215

Re: Videos

Hello,

MP4 file are normally supported depending on your browser/OS.
By using MediaInfo or the photo-edit page, you can check the metadata of the video.

Code:

General
Complete name                            : M4V00997.MP4
Format                                   : MPEG-4
Format profile                           : Sony PSP
Codec ID                                 : MSNV
File size                                : 59.2 MiB
Duration                                 : 2mn 52s
Overall bit rate mode                    : Constant
Overall bit rate                         : 2 875 Kbps

You might want to read:
https://github.com/xbgmsharp/piwigo-vid … t-you-know
http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles

As refer per the wiki, you can see that your video format profile is not standard (Sony PSP), therefor it is not being play.
The audio is a standard format and therefor only play the audio track.

Your video file need to be transcode your video in H.264/MPEG-4 AVC codec.
A good tools for video conversion is https://handbrake.fr/
Using a real MPEG-4 standard codec will reduce your file size.

Regarding your AVI file, same issue, you need to convert it as the video format (MJPEG) is not supported by the browser neither by the plugin.

Code:

Complete name                            : 00029.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 101 MiB
Duration                                 : 29s 0ms
Overall bit rate                         : 29.2 Mbps

I hope this helps and please let me know if you have additional questions.

Offline

 

#5 2015-07-07 22:32:43

cjm51213
Member
2014-12-31
39

Re: Videos

Hi Folks,

Site:media.tryx.org

I tried to read: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles but I find it is simply a bewildering array of facts and I don't understand their application.

I have read and I believe understood, https://github.com/xbgmsharp/piwigo-vid … t-you-know but it is quite likely that I missed something.

I have a set of videos recorded as AVI and trans coded to mp4, which play the sound, but not the images. I'm running my Google Chrome browser on a Fedora desktop.




I transcoded the AVIs as follows:

Code:

ffmpeg -y -i <file.avi> -strict -2 <file.mp4>

One of the articles above suggested:

Code:

ffmpeg -i <file.avi> -threads 4 -c:v libx264 -preset slow -profile:v high -c:a libfdk_aac -vf scale=-1:720 <file.mp4>

... which complains about "Unknown decoder libfdk_aac".  I have not been able to fix that despite building ffmpeg from source. Regardless, mediainfo tells me that h264 and aac were used, and I think that is what I am trying to accomplish. After transcode with ffmpeg, I optimized with

Code:

mp4file --optimize <file.mp4>

mediainfo tells me the following:

Code:

> mediainfo /var/www/vhost/media.tryx.org/piwigo/galleries/Projects/Dogs/DSCF0797.mp4
General
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 7.91 MiB
Duration                                 : 11s 24ms
Overall bit rate                         : 6 022 Kbps
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Writing application                      : Lavf55.19.104

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:2:2@L3.2
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 11s 0ms
Bit rate                                 : 5 897 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:2
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.213
Stream size                              : 7.73 MiB (98%)
Writing library                          : x264 core 138 r2363 c628e3b
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / 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=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Color range                              : Full

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 11s 24ms
Duration_LastFrame                       : -6ms
Bit rate mode                            : Constant
Bit rate                                 : 129 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 173 KiB (2%)
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

* * *
I have subsequently learned that I have no problem with Firefox, so this is Chrome specific, but I think I'd still like to know why and fix it.

Code:

Chrome  43.0.2357.81 (64-bit)
FireFox 26.0

* * *


Can anybody suggest an improvement in my technique? Maybe explain my mistake...

Thanks for the help,

Chris.

Last edited by cjm51213 (2015-07-07 22:42:53)

Offline

 

#6 2015-07-08 13:51:21

xbgmsharp
Member
1970-01-01
215

Re: Videos

If you are unsure on how to transcode you video to a correct format, you should use Handbrake.
To easily convert your video in a supported format, you can use HandBrake.

Code:

# HandBrakeCLI --optimize --encoder x264 --x264-profile high -i <input_video_file> -o <output_video_file>

MP4 is a container and there is a lot of variant inside it.
There can be different Video format as well as audio.
While desktop player (eg: VLC) will more likely read any of those, the browser have limited support.

Fraunhofer FDK AAC Codec is a library external to FFMEPG, to use this library on Debian/Ubuntu system you need to install libfdk-aac0, https://packages.debian.org/jessie/libfdk-aac0

Code:

This video format details is play by all browser natively in HTML5:

Format                                   : MPEG-4
Format profile                           : Base Media
Video Format/Info                        : Advanced Video Codec
Video Format profile                     : High@L3.1

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact