Serious problem: write_trailer() corrupts the file

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Serious problem: write_trailer() corrupts the file

SyRenity
Hi.

I'm trying to capture live video to disk in WMV format.

For the last week I'm struggling with the write_trailer() function:

1) When I write about ~75 packets, then write the trailer, the
produced file plays fine in Windows Media, VLC, etc...

2) When I write more then 80 packets, then write the trailer, the
produced movie is unplayable on any player.

This simply drives me nuts, so I will appreciate anyone assisting on the matter.

I uploaded both files to then Internet (~150K each one), so they would
provide a better example:

Good  - http://www.avivmeshulam.com/good.wmv
Bad  - http://www.avivmeshulam.com/bad.wmv

Thanks for any help or idea.
_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Serious problem: write_trailer() corrupts the file

wl2776
Administrator
Do you use unix of win32?
If unix, then try
$ dd if=/dev/your_device of=some_file count=20480

If win32, then find some other way to store raw data from the device to a file.

Then, once you've got the data in the file try

$ ffmpeg -i some_file output.wmv  <-- and play with command line switches in order to get proper WMV file.

Stas Oskin-2 wrote
This simply drives me nuts, so I will appreciate anyone assisting on the matter.
I perfectly understand you. That's a feature of this software, so I would recommend to relax.
Reply | Threaded
Open this post in threaded view
|

Re: Serious problem: write_trailer() corrupts the file

wl2776
Administrator
Sorry, I have shown incorrect place for switches, they should appear before output file name
Vladimir Eremeev wrote
$ ffmpeg -i some_file output.wmv  <-- and play with command line switches in order to get proper WMV file.
$ ffmpeg -i some_file [switches] output.wmv  
Reply | Threaded
Open this post in threaded view
|

Re: Serious problem: write_trailer() corrupts the file

SyRenity
In reply to this post by wl2776
Hi.

>  Do you use unix of win32?
>  If unix, then try
>  $ dd if=/dev/your_device of=some_file count=20480
>
>  If win32, then find some other way to store raw data from the device to a
>  file.
>
>  Then, once you've got the data in the file try
>
>  $ ffmpeg -i some_file output.wmv  <-- and play with command line switches in
>  order to get proper WMV file.

Thanks for the explanation, but how it's related to my question? I'm
not using any command line tools but rather the libavcodec directly.

> I perfectly understand you. That's a feature of this software, so I would
>  recommend to relax.

:) this one way to see things...
_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Serious problem: write_trailer() corrupts the file

SyRenity
Hi.

Any ideas on this matter?

Regards,
_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Serious problem: write_trailer() corrupts the file

wl2776
Administrator
In reply to this post by SyRenity
Stas Oskin-2 wrote
>  Then, once you've got the data in the file try
>
>  $ ffmpeg -i some_file output.wmv  <-- and play with command line switches in
>  order to get proper WMV file.

Thanks for the explanation, but how it's related to my question? I'm
not using any command line tools but rather the libavcodec directly.
So do I.
However, making ffmpeg command line to produce the desired result is the best way to get into the internals of libav* Producers of ffmpeg also recommend this.

Then, you can add some printfs in the ffmpeg.c to see which variables it sets, and set them in your application accordingly.
I'm not familiar with WMV format, so this is just the general approach to the application development using ffmpeg API.

You can also add some printf's to the source of write_trailer() and see what's happening.
Reply | Threaded
Open this post in threaded view
|

Configure

stefanofala
In reply to this post by SyRenity
I am trying to configure and compile ffmpeg for wince. I followed these
instructions:

http://www.craigshaw.com/2008/04/23/BuildingFFMpegForWindowsCEWindowsMobile.
aspx

But when I try to configure with this command:

$ ./configure --enable-mingwce --cross-compile
--cross-prefix=arm-wince-mingw32ce- --arch=arm --disable-static
--enable-shared --disable-parsers --enable-memalign-hack --disable-ffmpeg
--disable-ffplay --disable-debug

I receive the error:
Unknown option "--enable-mingwce".

I am using last version of ffmpeg.

Any body can help me ?

thanks

Stefano

_______________________________________________
libav-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user