Converted video runs on device in fast motion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Converted video runs on device in fast motion

shimmy
Hi.

I have a device and I have a video that works on it.

I tried to convert a video to match the native video's settings, but the converted file plays in fast motion and the video stops within few seconds (instead of 30 secs).

Here are my attempts:
>ffmpeg -i native.avi
... trimmed ...
Input #0, avi, from 'native.avi':
  Metadata:
    encoder         : MEncoder dev-SVN-r27958-4.2.2
  Duration: 00:01:15.83, start: 0.000000, bitrate: 414 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 160x128 [SAR 1:1 DAR 5:4], SAR 65536:65535 DAR 16384:13107, 15 tbr, 15 tbn, 15 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 44100 Hz, stereo, s16, 128 kb/s
******************************************************************************
>ffmpeg -i avisample.avi -vtag XVID -vcodec libxvid -s 160x128 -aspect 5:4 -r 15 -acodec mp2 -ar 44100 -ac 2 -ab 128k output.avi
******************************************************************************
>ffmpeg -i output.avi
... trimmed ...
Input #0, avi, from 'output.avi':
  Metadata:
    comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music:
Steve Ball
    copyright       : © 2008 Microsoft Corporation
    title           : Wildlife in HD
    encoder         : Lavf54.3.100
  Duration: 00:00:30.17, start: 0.000000, bitrate: 352 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 160x128 [SAR 1:1 DAR 5:4], 15 tbr, 15 tbn, 15 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 44100 Hz, stereo, s16, 128 kb/s

Note the "SAR 65536:65535 DAR 16384:13107" is missing from the converted file.
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

Carl Eugen Hoyos
shimmy <weitzhandler <at> gmail.com> writes:

> I tried to convert a video to match the native video's settings,
> but the converted file plays in fast motion and the video stops
> within few seconds (instead of 30 secs).

Command line and complete, uncut console output missing.

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
Carl Eugen Hoyos wrote
Command line and complete, uncut console output missing.
Carl Eugen
What's missing??
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

Jonathan Isom
On 4/30/12, shimmy <[hidden email]> wrote:
>
> Carl Eugen Hoyos wrote
>>
>> Command line and complete, uncut console output missing.
>> Carl Eugen
>>
>
> What's missing??
>
Nothing about how you encoded the video or the out put of said command
was posted. Also only part of your message made it to the list.

> --
> View this message in context:
> http://ffmpeg-users.933282.n4.nabble.com/Converted-video-runs-on-device-in-fast-motion-tp4598300p4598455.html
> Sent from the FFmpeg-users mailing list archive at Nabble.com.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

Gabri Nurtinaz Shally
In reply to this post by shimmy
On Apr 30, 2012 10:31 PM, "shimmy" <[hidden email]> wrote:
>
> What's missing??

text between "here is my attempt" and "note that..." are missing.
btw, send email using plain text please...

> Carl Eugen Hoyos wrote
> >
> > Command line and complete, uncut console output missing.
> > Carl Eugen
> >

have you open link provided by ffmpeg in signature? it seems some text were
mising, but actually exist in web view.

@shimmy:
IMO, the problem lies in video container.
probably something wrong with framerate information.
have you try comparing the two video using mediainfo?
it may can help b^-^
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
I pasted it on pastebin: http://pastebin.com/fCKTiqBQ
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
In reply to this post by Gabri Nurtinaz Shally
Gabri Nurtinaz Shally wrote
have you try comparing the two video using mediainfo?
it may can help b^-^
Here is the comparison from MediaInfo:

Native file that works on the device: http://pastebin.com/4srRYcxA
Converted file that opens on device but works in fast motion (works fine on computer): http://pastebin.com/ZePuJpEs
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
As you can see the only difference is the bit-rate.
I tried converting specifying a lower bit-rate (-b:v 277k), and it still didn't solve the issue, besides now I see on the device an error message during the playback that say "file type error".

How can I make a converted file to be playable on the device, what's the hidden secret?
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

Carl Eugen Hoyos
In reply to this post by shimmy
shimmy <weitzhandler <at> gmail.com> writes:

> I pasted it on pastebin: http://pastebin.com/fCKTiqBQ

Please post all necessary information on the mailing list,
external resources may disappear.

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy


--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Converted-video-runs-on-device-in-fast-motion-tp4598300p4599321.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
In reply to this post by Carl Eugen Hoyos
Carl Eugen Hoyos wrote
Please post all necessary information on the mailing list,
external resources may disappear.
I only posted pastebin code, it's not meant to be removed ever.
Anyway, here is what I've tried:

>ffmpeg -i native.avi
... trimmed ...
Input #0, avi, from 'native.avi':
  Metadata:
    encoder         : MEncoder dev-SVN-r27958-4.2.2
  Duration: 00:01:15.83, start: 0.000000, bitrate: 414 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 160x128 [SAR 1:1 DAR 5:4], SAR 65536:65535
DAR 16384:13107, 15 tbr, 15 tbn, 15 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 44100 Hz, stereo, s16, 128 kb/s
******************************************************************************
>ffmpeg -i avisample.avi -vtag XVID -vcodec libxvid -s 160x128 -aspect 5:4 -r 15 -acodec mp2 -ar 44100 -ac 2 -ab 128k output.avi
******************************************************************************
>ffmpeg -i output.avi
... trimmed ...
Input #0, avi, from 'output.avi':
  Metadata:
    comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music:
Steve Ball
    copyright       : ┬⌐ 2008 Microsoft Corporation
    title           : Wildlife in HD
    encoder         : Lavf54.3.100
  Duration: 00:00:30.17, start: 0.000000, bitrate: 352 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 160x128 [SAR 1:1 DAR 5:4], 15 tbr, 15 tbn,
15 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 44100 Hz, stereo, s16, 128 kb/s


Here are the MediaInfo comparison between these two:

General
Complete name                            : native.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 3.74 MiB
Duration                                 : 1mn 15s
Overall bit rate                         : 414 Kbps
Writing application                      : MEncoder dev-SVN-r27958-4.2.2
Writing library                          : MPlayer

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Simple@L3
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 1mn 15s
Bit rate                                 : 277 Kbps
Width                                    : 160 pixels
Height                                   : 128 pixels
Display aspect ratio                     : 5:4
Frame rate                               : 15.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.902
Stream size                              : 2.49 MiB (66%)
Writing library                          : XviD 1.1.2 (UTC 2006-11-01)

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 50
Duration                                 : 1mn 15s
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 1.15 MiB (31%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 26 ms (0.39 video frame)
Interleave, preload duration             : 522 ms

***********************************************
General
Complete name                            : output.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 2.32 MiB
Duration                                 : 30s 171ms
Overall bit rate                         : 645 Kbps
Movie name                               : Wildlife in HD
Writing application                      : Lavf54.3.100
Copyright                                : ֲ© 2008 Microsoft Corporation
Comment                                  : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Simple@L3
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 30s 133ms
Bit rate                                 : 505 Kbps
Width                                    : 160 pixels
Height                                   : 128 pixels
Display aspect ratio                     : 5:4
Frame rate                               : 15.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 1.644
Stream size                              : 1.81 MiB (78%)
Writing library                          : XviD 64

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 50
Duration                                 : 30s 171ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 471 KiB (20%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 26 ms (0.39 video frame)
Interleave, preload duration             : 78 ms
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

Carl Eugen Hoyos
shimmy <weitzhandler <at> gmail.com> writes:

> >ffmpeg -i native.avi
> ... trimmed ...

If you want support on this mailing list, you will have to post
the command line you used to produce the output file that
is not correct together with the complete, uncut console output.

The reason I did not ask for complete, uncut MediaInfo output is
that I do not (easily) remember an issue where it helped.

Is the problem also reproducible with the internal ASP encoder?
(Problems that do not depend on external libraries typically are
fixed easier / faster.)

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
Carl Eugen Hoyos wrote
shimmy <weitzhandler <at> gmail.com> writes:

> >ffmpeg -i native.avi
> ... trimmed ...

1)
If you want support on this mailing list, you will have to post
the command line you used to produce the output file that
is not correct together with the complete, uncut console output.

2)
The reason I did not ask for complete, uncut MediaInfo output is
that I do not (easily) remember an issue where it helped.

3)
Is the problem also reproducible with the internal ASP encoder?
(Problems that do not depend on external libraries typically are
fixed easier / faster.)
1)
Here is ALL the info you need: http://pastebin.com/ieL8UUFG
2)
The MediaInfo info is not cut, it's complete
3)
What's internal ASP encoder?

Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

bat guano




> >
> > 3)
> > Is the problem also reproducible with the internal ASP encoder?
> > (Problems that do not depend on external libraries typically are
> > fixed easier / faster.)
> >
>

> 3)
> What's internal ASP encoder?
>

Hi
I think this means use FFmpeg's internal mpeg4 encoder instead of the external libxvid encoder.

To me, your command looks good:-
ffmpeg -i avisample.avi -vtag XVID -vcodec libxvid -s 160x128 -aspect 5:4 -r 15 -acodec mp2 -ar 44100 -ac 2 -ab 128k output.avi

But try this command instead:-
ffmpeg -i avisample.avi -vtag XVID -vcodec mpeg4 -s 160x128 -aspect 5:4 -r 15 -acodec mp2 -ar 44100 -ac 2 -ab 128k output.avi
     
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
This post was updated on .
I tried that.
Now it plays for half a second and shows an error message on the device.

Here is the MediaInfo for the converted file:

General
Complete name                            : output.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 1.34 MiB
Duration                                 : 30s 171ms
Overall bit rate                         : 372 Kbps
Movie name                               : Wildlife in HD
Writing application                      : Lavf54.3.100
Copyright                                : ֲ© 2008 Microsoft Corporation
Comment                                  : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Simple@L1
Format settings, BVOP                    : No
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 30s 133ms
Bit rate                                 : 232 Kbps
Width                                    : 160 pixels
Height                                   : 128 pixels
Display aspect ratio                     : 5:4
Frame rate                               : 15.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.754
Stream size                              : 852 KiB (62%)
Writing library                          : Lavc54.15.100

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 50
Duration                                 : 30s 171ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 471 KiB (34%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 26 ms (0.39 video frame)
Interleave, preload duration             : 78 ms

Here is the ffmpeg info for the converted file:

>ffmpeg -i output.avi
ffmpeg version N-40126-ga4b58fd Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 26 2012 03:33:03 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschro
edinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 47.100 / 51. 47.100
  libavcodec     54. 15.100 / 54. 15.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.100 /  2. 72.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from 'output.avi':
  Metadata:
    comment         : Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music:
Steve Ball
    copyright       : ┬⌐ 2008 Microsoft Corporation
    title           : Wildlife in HD
    encoder         : Lavf54.3.100
  Duration: 00:00:30.17, start: 0.000000, bitrate: 372 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 160x128 [SAR 1:1 DAR 5:4], 15 tbr, 15 tbn,
15 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 44100 Hz, stereo, s16, 128 kb/s
At least one output file must be specified

>
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

bat guano




>
> I tried that.
> Now it plays for half a second and shows an error message on the device.
>
Hi
I don't have a solution...

just some suggestions...

Maybe your source file "avisample.avi" is no good/not suitable.
Repeat the libxvid/mpeg4 runs with some different videos.

Maybe there is something peculiar about the *device*.
Research manufacturers' website/forum/helpline.
Also scour google to see if other people have good settings for FFmpeg or MEncoder or whatever.

Good luck ;-)
     
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
There is no info on this device. I tried looking for any info and I found this
post.
I have no clue on how to use MEncoder, btw, that native.avi was creaed with mencoder as you can see.

do u believe there is soemthign mencoder can do that ffmpeg cant?
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

bat guano




> I have no clue on how to use MEncoder, btw, that native.avi was creaed with
> mencoder as you can see.
>
> do u believe there is soemthign mencoder can do that ffmpeg cant?
>
> --
Yes, I noticed that your working video was created with MEncoder.

And no, I don't really believe that MEncoder can do anything that FFmpeg can't.

But if you want to try it out...

This command might be OK:-

mencoder avisample.avi -ffourcc XVID -vf scale=160:128 -aspect 5:4 -ofps 15 -ovc lavc -lavcopts vcodec=mpeg4 -oac lavc -lavcopts acodec=mp2:abitrate=128 -o output.avi

And this is the result:-

General
Complete name           : output.avi
Format                  : AVI
Format/Info             : Audio Video Interleave
File size               : 1.65 MiB
Duration                : 30s 0ms
Overall bit rate        : 462 Kbps
Writing application     : MEncoder SVN-r34842-4.5.2
Writing library         : MPlayer

Video
ID                      : 0
Format                  : MPEG-4 Visual
Format profile          : Simple@L1
Format settings, BVOP   : No
Format settings, QPel   : No
Format settings, GMC    : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID                : XVID
Codec ID/Hint           : XviD
Duration                : 30s 0ms
Bit rate                : 322 Kbps
Width                   : 160 pixels
Height                  : 128 pixels
Display aspect ratio    : 5:4
Frame rate              : 15.000 fps
Color space             : YUV
Chroma subsampling      : 4:2:0
Bit depth               : 8 bits
Scan type               : Progressive
Compression mode        : Lossy
Bits/(Pixel*Frame)      : 1.049
Stream size             : 1.15 MiB (70%)
Writing library         : Lavc54.12.100

Audio
ID                      : 1
Format                  : MPEG Audio
Format version          : Version 1
Format profile          : Layer 2
Codec ID                : 50
Duration                : 29s 962ms
Bit rate mode           : Constant
Bit rate                : 128 Kbps
Channel(s)              : 2 channels
Sampling rate           : 44.1 KHz
Compression mode        : Lossy
Stream size             : 468 KiB (28%)
Alignment               : Aligned on interleaves
Interleave, duration    : 26 ms (0.39 video frame)
Interleave, preload duration             : 522 ms

     
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

Gabri Nurtinaz Shally
On May 3, 2012 9:40 AM, "bat guano"
> I don't really believe that MEncoder can do anything that FFmpeg can't.
>

yes, there is
mencoder can join multiple video into one file while transcoding, even
using 2pass mode
mencoder can use vfw based codec to encode video
b^-^

@shimmy:
i still believe that the avi container is the fault
so, before trying guano's suggestion, do you care to try this first?
it doesn't transcode the video just remux it, so it should be fast ;)

mencoder -oac copy -ovc copy -o output.avi filefromffmpeg.avi
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Converted video runs on device in fast motion

shimmy
bat guano wrote
This command might be OK:-

mencoder avisample.avi -ffourcc XVID -vf scale=160:128 -aspect 5:4 -ofps 15 -ovc lavc -lavcopts vcodec=mpeg4 -oac lavc -lavcopts acodec=mp2:abitrate=128 -o output.avi

And this is the result:-

General
Complete name           : output.avi
Here is what happens: http://pastebin.com/EkVyrdSU, and it doesn't work on the device.

Gabri Nurtinaz Shally wrote
i still believe that the avi container is the fault
so, before trying guano's suggestion, do you care to try this first?
it doesn't transcode the video just remux it, so it should be fast ;)

mencoder -oac copy -ovc copy -o output.avi filefromffmpeg.avi
It didn't work, there is still the same problem (fast playback).
12